import SwiftUI public extension View { @ViewBuilder func idpGlassChrome() -> some View { if #available(iOS 26, macOS 26, *) { self.glassEffect(.regular) } else { self.background(.regularMaterial) } } } struct IdPGlassCapsule: View { let padding: EdgeInsets let content: Content init( padding: EdgeInsets = EdgeInsets(top: 12, leading: 16, bottom: 12, trailing: 16), @ViewBuilder content: () -> Content ) { self.padding = padding self.content = content() } var body: some View { content .padding(padding) .background( Capsule(style: .continuous) .fill(.clear) .idpGlassChrome() ) .overlay( Capsule(style: .continuous) .stroke(Color.white.opacity(0.16), lineWidth: 1) ) } }