/*
 * iOS Web App Optimizations
 * Optimized for iPhone and iPad - Native-like experience
 */

/* ========================================
   iOS Safe Area Support (iPhone X+, Dynamic Island)
   ======================================== */

:root {
    /* Safe area insets for notched devices */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-right: env(safe-area-inset-right);
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-left: env(safe-area-inset-left);
}

/* Safe area insets - global variables */
:root {
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-right: env(safe-area-inset-right);
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-left: env(safe-area-inset-left);
}

/* Extend HTML/body to fill screen including safe areas */
html {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    /* NO padding on body - handled by individual components */
    margin: 0;
    padding: 0;
}

/* Apply safe area padding to page containers (not conversation) */
.page-container,
.dashboard-container,
.settings-container {
    padding-top: max(var(--safe-area-top), 20px);
    padding-right: max(var(--safe-area-right), 20px);
    padding-bottom: max(var(--safe-area-bottom), 20px);
    padding-left: max(var(--safe-area-left), 20px);
}

/* iOS Glassmorphic Top Bar (status bar area)
   Scoped to app pages only — standalone pages (landing, login) don't need
   safe-area overlays and the fixed+backdrop-filter combo breaks body scroll */
body[data-page]::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9998;
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    body[data-page]::before {
        background: rgba(28, 28, 30, 0.72);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

/* Glassmorphic Bottom Bar */
body[data-page]::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-bottom);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9998;
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    body[data-page]::after {
        background: rgba(28, 28, 30, 0.72);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

/* ========================================
   iOS Touch Optimizations
   ======================================== */

/* Remove tap highlight on iOS */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Smooth scrolling with iOS momentum */
body,
.container,
.scrollable {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Prevent text selection on buttons/controls */
button,
.btn,
.icon-btn,
a.button,
.clickable {
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

/* Allow text selection in inputs and content */
input,
textarea,
.selectable,
p,
span {
    -webkit-user-select: text;
    user-select: text;
}

/* Improve touch target sizes for iOS (minimum 44x44px) */
button,
.btn,
.icon-btn,
a,
input[type="checkbox"],
input[type="radio"] {
    min-height: 44px;
    min-width: 44px;
}

/* Make small icons have larger touch targets */
.icon-btn {
    padding: 12px;
    position: relative;
}

.icon-btn::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
}

/* ========================================
   iOS Native-like Animations
   ======================================== */

/* iOS-style spring animations */
.ios-spring {
    transition: all 0.4s cubic-bezier(0.17, 0.67, 0.3, 1.33);
}

/* iOS-style ease-out */
.ios-ease {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Bounce effect on tap (like iOS buttons) */
.ios-bounce:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* Apply bounce to all buttons - exclude workflow buttons */
button:not(.filter-pill):not(.btn-browse-templates):not(.btn-create-workflow):not(.ios-filter-tab):active,
.btn:not(.filter-pill):not(.btn-browse-templates):not(.btn-create-workflow):active {
    transform: scale(0.97);
}

/* ========================================
   iOS Input Optimizations
   ======================================== */

/* Remove iOS input shadows and styling */
input,
textarea,
select {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 10px; /* iOS-style rounded corners */
}

/* Prevent iOS zoom on input focus */
input,
textarea,
select {
    font-size: 16px !important; /* iOS won't zoom if font-size >= 16px */
}

/* iOS-style focus state */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

/* Prevent iOS autocomplete styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg, white) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ========================================
   iOS Responsive Breakpoints
   ======================================== */

/* iPhone SE / Small phones (320px - 374px) */
@media only screen and (max-width: 374px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 28px !important;
    }

    .container {
        padding: 16px !important;
    }

    .btn {
        font-size: 15px;
        padding: 12px 20px;
    }
}

/* iPhone 12/13/14 Mini (375px - 389px) */
@media only screen and (min-width: 375px) and (max-width: 389px) {
    .container {
        padding: 20px;
    }
}

/* iPhone 12/13/14/15 Standard (390px - 428px) */
@media only screen and (min-width: 390px) and (max-width: 428px) {
    .container {
        padding: 24px;
    }
}

/* iPhone 12/13/14/15 Pro Max (428px - 767px) */
@media only screen and (min-width: 429px) and (max-width: 767px) {
    .container {
        padding: 32px;
    }
}

/* iPad Portrait (768px - 1023px) */
@media only screen and (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
    .container {
        max-width: 700px;
        margin: 0 auto;
        padding: 40px;
    }

    h1 {
        font-size: 48px !important;
    }
}

/* iPad Landscape (768px+) */
@media only screen and (min-width: 1024px) and (orientation: landscape) {
    .container {
        max-width: 980px;
        padding: 60px 40px;
    }
}

/* ========================================
   iOS Dark Mode Support
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1C1C1E;
        --bg-tertiary: #2C2C2E;
        --text-primary: #FFFFFF;
        --text-secondary: #EBEBF5;
        --text-tertiary: #EBEBF599;
        color-scheme: dark;
    }

    html, body {
        background-color: #000000 !important;
        color: rgba(255, 255, 255, 0.85) !important;
    }

    /* Form inputs in dark mode */
    input,
    textarea,
    select {
        background-color: #1C1C1E !important;
        color: #FFFFFF !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }

    input::placeholder,
    textarea::placeholder {
        color: rgba(255, 255, 255, 0.4) !important;
    }

    /* Autofill in dark mode */
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px #1C1C1E inset !important;
        -webkit-text-fill-color: #FFFFFF !important;
    }
}

/* ========================================
   iOS Gesture Support
   ======================================== */

/* Pull-to-refresh prevention (when needed) */
.prevent-pull-refresh {
    overscroll-behavior-y: none;
}

/* Enable horizontal swipe */
.horizontal-swipe {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.horizontal-swipe > * {
    scroll-snap-align: start;
}

/* ========================================
   iOS Home Screen Web App Optimizations
   ======================================== */

/* PWA standalone mode */
@media all and (display-mode: standalone) {
    :root {
        --header-safe-area: max(env(safe-area-inset-top), 44px);
    }

    /* Status bar height for standalone apps */
    .ios-status-bar-spacer {
        height: var(--header-safe-area);
        background: var(--bg-primary);
    }
}

/* ========================================
   iOS Performance Optimizations
   ======================================== */

/* Hardware acceleration */
.accelerated,
button,
.btn,
.card,
.modal {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Smooth font rendering */
body,
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========================================
   iOS Bottom Sheet / Modal Optimization
   ======================================== */

.ios-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    padding-bottom: max(var(--safe-area-bottom), 20px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.ios-bottom-sheet.active {
    transform: translateY(0);
}

/* iOS-style handle */
.ios-sheet-handle {
    width: 36px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin: 8px auto 16px;
}

/* ========================================
   iOS-Style Loading Indicators
   ======================================== */

.ios-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #007AFF;
    border-radius: 50%;
    animation: ios-spin 0.6s linear infinite;
}

@keyframes ios-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   iOS Haptic Feedback Hint (Visual)
   ======================================== */

.haptic-feedback:active {
    animation: haptic-pulse 0.2s ease;
}

@keyframes haptic-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
}

/* ========================================
   iOS-Style Cards and Containers
   ======================================== */

.ios-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    .ios-card {
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
    }
}

/* ========================================
   iOS 17+ Depth & Shadow System
   Modern elevation system for cards and components
   ======================================== */

:root {
    /* iOS 17+ Shadow tokens - subtle depth */
    --ios-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    --ios-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
    --ios-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
    --ios-shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.16), 0 0 0 0.5px rgba(0, 0, 0, 0.1);

    /* Dark mode shadows - more pronounced */
    --ios-shadow-dark-sm: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.05);
    --ios-shadow-dark-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    --ios-shadow-dark-lg: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    --ios-shadow-dark-xl: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 0.5px rgba(255, 255, 255, 0.12);

    /* Elevation levels */
    --ios-elevation-0: none;
    --ios-elevation-1: var(--ios-shadow-sm);
    --ios-elevation-2: var(--ios-shadow-md);
    --ios-elevation-3: var(--ios-shadow-lg);
    --ios-elevation-4: var(--ios-shadow-xl);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ios-elevation-1: var(--ios-shadow-dark-sm);
        --ios-elevation-2: var(--ios-shadow-dark-md);
        --ios-elevation-3: var(--ios-shadow-dark-lg);
        --ios-elevation-4: var(--ios-shadow-dark-xl);
    }
}

/* Settings cards with depth */
.ios-settings-card {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 16px;
    box-shadow: var(--ios-elevation-2);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ios-settings-card:hover {
    box-shadow: var(--ios-elevation-3);
    transform: translateY(-1px);
}

.ios-settings-card:active {
    box-shadow: var(--ios-elevation-1);
    transform: translateY(0);
}

/* Grouped list style (like Settings.app) */
.ios-grouped-list {
    background: rgba(28, 28, 30, 0.6);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--ios-elevation-2);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
}

.ios-list-item {
    background: transparent;
    border-bottom: 0.5px solid rgba(84, 84, 88, 0.65);
    padding: 12px 16px;
    transition: background-color 0.2s ease;
}

.ios-list-item:last-child {
    border-bottom: none;
}

.ios-list-item:active {
    background: rgba(255, 255, 255, 0.05);
}

/* Form group with depth */
.ios-form-group {
    background: rgba(28, 28, 30, 0.5);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 12px;
    padding: 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), var(--ios-elevation-1);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    margin: 12px 0;
}

/* Button elevation system */
.ios-button-elevated {
    box-shadow: var(--ios-elevation-2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ios-button-elevated:hover {
    box-shadow: var(--ios-elevation-3);
    transform: translateY(-2px);
}

.ios-button-elevated:active {
    box-shadow: var(--ios-elevation-1);
    transform: translateY(0);
}

/* iOS 17 Pill-shaped buttons */
.ios-button-pill {
    background: #0A84FF;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 600;
    min-height: 48px;
    box-shadow: var(--ios-elevation-2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ios-button-pill:hover {
    background: #0077ED;
    box-shadow: var(--ios-elevation-3);
    transform: translateY(-2px);
}

.ios-button-pill:active {
    background: #006AD5;
    box-shadow: var(--ios-elevation-1);
    transform: scale(0.97);
}

.ios-button-pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Secondary pill button */
.ios-button-pill-secondary {
    background: rgba(142, 142, 147, 0.2);
    color: #0A84FF;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 600;
    min-height: 48px;
    box-shadow: var(--ios-elevation-1);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.ios-button-pill-secondary:hover {
    background: rgba(142, 142, 147, 0.3);
    box-shadow: var(--ios-elevation-2);
}

.ios-button-pill-secondary:active {
    background: rgba(142, 142, 147, 0.4);
    transform: scale(0.97);
}

/* Destructive pill button */
.ios-button-pill-destructive {
    background: rgba(255, 69, 58, 0.15);
    color: #FF453A;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 600;
    min-height: 48px;
    box-shadow: var(--ios-elevation-1);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.ios-button-pill-destructive:hover {
    background: rgba(255, 69, 58, 0.25);
}

.ios-button-pill-destructive:active {
    background: rgba(255, 69, 58, 0.35);
    transform: scale(0.97);
}

/* Floating action button (FAB) */
.ios-fab {
    position: fixed;
    bottom: calc(80px + var(--safe-area-bottom));
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: #0A84FF;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ios-elevation-4);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
}

.ios-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(10, 132, 255, 0.4);
}

.ios-fab:active {
    transform: scale(0.95);
}

/* Navigation bar with depth */
.ios-navbar {
    background: rgba(28, 28, 30, 0.72);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: var(--ios-elevation-1);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

/* Modal overlay depth */
.ios-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ios-modal-content {
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border-radius: 20px;
    box-shadow: var(--ios-elevation-4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

/* Input field depth (inset effect) */
.ios-input-inset {
    background: rgba(0, 0, 0, 0.25);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 17px;
    color: #FFFFFF;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.ios-input-inset:focus {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(10, 132, 255, 0.6);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(10, 132, 255, 0.1);
    outline: none;
}

.ios-input-inset::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Search bar with depth */
.ios-search-bar {
    background: rgba(118, 118, 128, 0.24);
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.ios-search-bar:focus-within {
    background: rgba(118, 118, 128, 0.32);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(10, 132, 255, 0.15);
}

.ios-search-bar input {
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
    font-size: 17px;
    color: #FFFFFF;
}

.ios-search-bar input::placeholder {
    color: rgba(235, 235, 245, 0.6);
}

/* Toggle switch with depth */
.ios-toggle {
    width: 51px;
    height: 31px;
    background: rgba(60, 60, 67, 0.6);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
    border: 0.5px solid rgba(0, 0, 0, 0.2);
}

.ios-toggle.active {
    background: #34C759;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
}

.ios-toggle-thumb {
    width: 27px;
    height: 27px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.1);
}

.ios-toggle.active .ios-toggle-thumb {
    transform: translateX(20px);
}

/* Segmented control with depth */
.ios-segmented-control {
    background: rgba(118, 118, 128, 0.24);
    border-radius: 9px;
    padding: 2px;
    display: inline-flex;
    gap: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ios-segment {
    padding: 6px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 28px;
}

.ios-segment.active {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    box-shadow: var(--ios-elevation-1);
}

.ios-segment:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
}

/* ========================================
   iOS-Specific Fixes
   ======================================== */

/* Fix iOS Safari bottom bar overlap */
.ios-footer {
    padding-bottom: max(var(--safe-area-bottom), 20px);
}

/* Prevent iOS zoom on double tap - apply to interactive elements only */
a,
button,
input,
select,
textarea,
label,
[role="button"],
[onclick],
.ios-tappable {
    touch-action: manipulation;
}

/* Fix iOS input zoom issue */
@media screen and (max-width: 767px) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"] {
        font-size: 16px !important;
    }
}

/* ========================================
   iOS Landscape Mode Optimizations
   ======================================== */

@media only screen and (max-height: 415px) and (orientation: landscape) {
    /* Compact mode for landscape on phones */
    .container {
        padding: 12px !important;
    }

    h1 {
        font-size: 24px !important;
    }

    .btn {
        padding: 10px 20px;
    }
}

/* ========================================
   Accessibility Enhancements for iOS
   ======================================== */

/* VoiceOver support */
[aria-hidden="true"] {
    pointer-events: none;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
