/* ===================================
   ADICIONALES SANTA FE - STYLES
   New Design System (Stitch)
   =================================== */

/* CSS Variables */
:root {
    --primary: #0d59f2;
    --primary-hover: #0b4dd1;
    --background-light: #f8fafc;
    /* Más limpio (slate-50) */
    --background-dark: #101622;
    --card-light: #ffffff;
    --card-dark: rgba(13, 89, 242, 0.05);
    --border-light: #e2e8f0;
    --border-dark: rgba(13, 89, 242, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #334155; /* Más oscuro para mejor contraste (slate-700) */
}

/* Glassmorphism Utilities */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

.dark .glass-card {
    background: rgba(24, 34, 52, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.glass-light {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.ios-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.view-transition {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Form Elements */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* iOS-Style Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--primary);
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* Segmented Control */
.segmented-control {
    display: flex;
    padding: 2px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    gap: 2px;
}

.dark .segmented-control {
    background: rgba(13, 89, 242, 0.1);
}

.segmented-control button {
    flex: 1;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
    color: #64748b;
}

.segmented-control button.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.dark .segmented-control button.active {
    background: var(--primary);
    color: white;
}

/* AdSense Fixes */
.ad-container {
    transition: all 0.3s ease;
}

ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

.ad-container:has(ins[data-ad-status="unfilled"]) {
    display: none !important;
}

/* Fallback for when AdSense doesn't provide the attribute yet */
ins.adsbygoogle:empty {
    height: 0 !important;
}

/* Utilities */
.text-xxs {
    font-size: 0.75rem; /* 12px */
    line-height: 1rem;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Tap Highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Selection */
::selection {
    background-color: var(--primary);
    color: white;
}

/* Stats Bar Chart Animation */
@keyframes barGrow {
    from {
        height: 0%;
        transform: scaleY(0);
    }

    to {
        height: 100%;
        transform: scaleY(1);
    }
}

/* Slide-up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out both;
}

/* Service Card Hover */
.service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:active {
    transform: scale(0.98);
}

/* iOS-Specific Prompt Animation */
@keyframes iosEntry {
    0% {
        transform: translateY(200%);
    }

    100% {
        transform: translateY(0);
    }
}

.animate-ios-entry {
    animation: iosEntry 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* 3D Chart perspective */
.chart-3d {
    transform-style: preserve-3d;
}