import SwiftUI struct MediaControlSurface: ViewModifier { @Environment(\.colorScheme) private var colorScheme @Environment(\.colorSchemeContrast) private var contrast @Environment(\.displayScale) private var displayScale func body(content: Content) -> some View { let shape = RoundedRectangle(cornerRadius: 12, style: .continuous) content .foregroundStyle(.primary) .background( Color(uiColor: colorScheme == .dark ? .secondarySystemGroupedBackground : .tertiarySystemFill), in: shape ) .overlay { if colorScheme == .light { shape.strokeBorder( Color(uiColor: contrast == .increased ? .secondaryLabel : .separator), lineWidth: contrast == .increased ? 2 : 1 / displayScale ) .allowsHitTesting(false) .accessibilityHidden(true) } } .contentShape(shape) } }