/* Apple-inspired Light UI & Refined Interactions for Ekspres Lastik */

:root {
    --apple-bg: #fbfbfd;
    --apple-surface: #ffffff;
    --apple-surface-secondary: #f5f5f7;
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-border-subtle: rgba(0, 0, 0, 0.04);
    --apple-text: #1d1d1f;
    --apple-text-secondary: #86868b;
    --apple-accent-red: #dc2626;
    --apple-accent-green: #16a34a;
    --apple-accent-amber: #d97706;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--apple-bg);
    color: var(--apple-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile Safe Area Padding (iOS Home Indicator & Notch support) */
.pb-safe {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

/* Apple-style Frosted Glass Materials */
.glass-panel-light {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-color: rgba(226, 232, 240, 0.8);
}

.glass-card-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* Subtle Apple-calm Pulsing for Urgent Actions */
@keyframes apple-pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.pulse-emergency {
    animation: apple-pulse-red 2.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes apple-pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.pulse-whatsapp {
    animation: apple-pulse-green 2.4s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

/* HTMX Transition States */
.htmx-indicator {
    opacity: 0;
    transition: opacity 180ms ease-in-out;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .pulse-emergency,
    .pulse-whatsapp,
    .animate-spin,
    .animate-ping {
        animation: none !important;
    }
}
