/* =====================================================
   CALCULATOR BASE - ESTILOS COMPARTIDOS
   ===================================================== */

.calc-content {
    background: var(--gray-50);
    padding: clamp(40px, 8vw, 80px) 0 clamp(60px, 10vw, 120px);
    min-height: 70vh;
}

/* COMPACT MODE - Less padding, designed for embedded use */
.calc-content-compact {
    padding: 24px 0 32px;
    min-height: auto;
}

.calc-content-compact .container {
    max-width: 100%;
    padding: 0 16px;
}

/* Compact mode cards need more contrast */
.calc-content-compact .slider-control,
.calc-content-compact .sidebar-card,
.calc-content-compact .region-option .region-label {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.calc-content-compact .slider-control:hover,
.calc-content-compact .sidebar-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

/* Better visual hierarchy for compact sliders */
.calc-content-compact .slider-header label {
    color: var(--gray-800);
    font-weight: 600;
}

.calc-content-compact .slider-value {
    background: linear-gradient(135deg, var(--primary-blue), #3b82f6);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.calc-mode {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calc-mode.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   SHARED CARD STYLES
   ===================================================== */

.step-card {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.step-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   LOADING OVERLAY
   ===================================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.loading-spinner p {
    font-size: 16px;
    font-weight: 500;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.hidden {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Better link styles */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* Prevent layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
.region-card:focus-visible,
.workload-card:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Cursor styles */
.region-card,
.workload-card,
button:not(:disabled) {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */

@media (max-width: 992px) {
    .calc-content .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 768px) {
    .calc-content {
        padding: 20px 0 36px;
    }

    .calc-content .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .calc-content-compact {
        padding: 14px 0 20px;
    }

    .calc-content-compact .container {
        padding: 0 10px;
    }

    .step-card {
        padding: 18px 14px;
        border-radius: 14px;
        margin: 0 4px;
    }

    .loading-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .calc-content {
        padding: 16px 0 28px;
    }

    .calc-content .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .calc-content-compact .container {
        padding: 0 6px;
    }

    .step-card {
        padding: 14px 10px;
        margin: 0;
        border-radius: 10px;
    }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}