/*
================================================================================
  SECCIÓN 0: RESETEO GLOBAL Y BOX-SIZING
================================================================================
*/
html {
  box-sizing: border-box;
  font-size: 100%; /* Base para REM (equivale a 16px) */
}
*, *:before, *:after {
  box-sizing: inherit;
}

/*
================================================================================
  AT&T Order Checker - CSS Reescribir a REM (v3.0)
================================================================================
  Descripción:
  Versión completamente refactorizada para usar unidades 'rem' para un escalado
  proporcional de la UI. Todos los valores 'px' (márgenes, padding, fuentes,
  alturas) se han convertido a 'rem' (Base 16px = 1rem).
  
  Esto soluciona el problema de escalado en 1366x768, permitiendo que
  toda la UI se reduzca con un simple media query en la Sección 11.
================================================================================
*/

/*
================================================================================
  SECCIÓN 1: VARIABLES DE TEMA (PALETA DE COLORES)
================================================================================
*/

:root {
    /* --- TEMA CLARO (POR DEFECTO) --- */
    --bg-color: #f0f2f5;
    --glass-bg: rgba(242, 242, 247, 0.75);
    --glass-border: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --accent-color: #007aff;
    --success-color: #34c759;
    --error-color: #ff3b30;
    --warning-color: #ff9500;
    --terminal-yellow: #ffcc00;
    --text-primary: #000000;
    --text-secondary: rgba(60, 60, 67, 0.6);
    --text-placeholder: rgba(60, 60, 67, 0.3);
    --text-on-accent: #ffffff;
    --terminal-text-color: #333333;
    
    /* Borde fino, mantener en px o 0.0625rem */
    --thin-border-width: 0.0625rem; 
}

body.dark-theme {
    /* --- TEMA OSCURO (OPCIONAL) --- */
    --bg-color: #000000;
    --glass-bg: rgba(28, 28, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.15);
    --card-bg: #1c1c1e;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --accent-color: #0a84ff;
    --success-color: #30d158;
    --error-color: #ff453a;
    --warning-color: #ff9f0a;
    --terminal-yellow: #ffd60a;
    --text-primary: #ffffff;
    --text-secondary: rgba(235, 235, 245, 0.6);
    --text-placeholder: rgba(235, 235, 245, 0.3);
    --text-on-accent: #ffffff;
    --terminal-text-color: var(--success-color);
}

/*
================================================================================
  SECCIÓN 2: ESTILOS GLOBALES Y DE BASE
================================================================================
*/

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    padding: 1.25rem; /* 20px */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 75rem; /* 1200px */
    margin: 0 auto;
    padding: 1.25rem; /* 20px */
}

/* === DEMO MODE - BLUR EFFECT === */
.demo-mode .sensitive-data,
.demo-mode .sensitive-data-display span:not(.icon) {
    filter: blur(0.3125rem); /* 5px */
    transition: filter 0.3s ease;
}

.demo-mode .sensitive-data:hover,
.demo-mode .sensitive-data-display:hover span:not(.icon) {
    filter: blur(0);
}


/*
================================================================================
  SECCIÓN 3: COMPONENTES PRINCIPALES (CONTENEDORES Y TARJETAS)
================================================================================
*/

.glassmorphism-soft-ui {
    background: var(--glass-bg);
    border-radius: 1.5rem; /* 24px */
    box-shadow: 0 0.625rem 2.5rem var(--shadow-color); /* 0 10px 40px */
    backdrop-filter: blur(1.25rem); /* 20px */
    -webkit-backdrop-filter: blur(1.25rem); /* 20px */
    border: var(--thin-border-width) solid var(--glass-border);
    transition: background-color 0.4s ease, border-color 0.4s ease;
    overflow: hidden;
}

.soft-ui-card, .soft-ui-terminal {
    background-color: var(--card-bg);
    border-radius: 1.125rem; /* 18px */
    box-shadow: 0 0.25rem 0.9375rem var(--shadow-color); /* 0 4px 15px */
    padding: 1.5625rem; /* 25px */
    margin-bottom: 1.25rem; /* 20px */
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    border: var(--thin-border-width) solid var(--glass-border);
}


/*
================================================================================
  SECCIÓN 4: CABECERA, NAVEGACIÓN Y TOGGLES
================================================================================
*/

.app-header {
    text-align: center;
    margin-top: 1.875rem; /* 30px */
    margin-bottom: 2.5rem; /* 40px */
}

.app-header h1 {
    font-size: 2.2rem; /* 2.2em -> 2.2rem */
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: none;
    margin: 0 0 1.875rem 0; /* 30px */
    transition: color 0.4s ease;
}

.app-header h1 strong {
    color: var(--accent-color);
}

.header-toggles {
    display: flex;
    justify-content: center;
    gap: 1.5625rem; /* 25px */
    align-items: center;
    margin-top: 0.9375rem; /* 15px */
}

.header-option {
    display: flex;
    align-items: center;
    gap: 0.625rem; /* 10px */
    font-size: 0.9rem; /* 0.9em -> 0.9rem */
    color: var(--text-secondary);
}

.theme-icon {
    font-size: 1.4rem; /* 1.4em -> 1.4rem */
}

.switch {
    position: relative;
    display: inline-block;
    width: 3.1875rem; /* 51px */
    height: 1.9375rem; /* 31px */
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e9e9eb;
    transition: background-color .4s cubic-bezier(0.22, 1, 0.36, 1);
}
body.dark-theme .slider {
    background-color: #39393d;
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.6875rem; /* 27px */
    width: 1.6875rem; /* 27px */
    left: 0.125rem; /* 2px */
    bottom: 0.125rem; /* 2px */
    background-color: white;
    box-shadow: 0 0.0625rem 0.1875rem rgba(0,0,0,0.1); /* 0 1px 3px */
    transition: transform .4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

input:checked + .slider:before {
    transform: translateX(1.25rem); /* 20px */
}

.slider.round {
    border-radius: 2.125rem; /* 34px */
}

.slider.round:before {
    border-radius: 50%;
}


/*
================================================================================
  SECCIÓN 5: LAYOUT PRINCIPAL Y FORMULARIO
================================================================================
*/

.main-grid {
    display: grid;
    gap: 1.5625rem; /* 25px */
    margin-top: 1.25rem; /* 20px */
}

.left-panel, .right-panel {
    min-width: 0;
}

@media (min-width: 56.25rem) { /* 900px */
    .main-grid {
        grid-template-columns: 1fr 1.5fr;
    }
}

.checker-form h2 {
    color: var(--accent-color);
    font-size: 1.3rem; /* 1.3em -> 1.3rem */
    font-weight: 600;
    margin-top: 0;
    border-bottom: var(--thin-border-width) solid var(--glass-border);
    padding-bottom: 0.9375rem; /* 15px */
    margin-bottom: 1.5625rem; /* 25px */
}

.input-group {
    margin-bottom: 1.25rem; /* 20px */
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem; /* 8px */
    font-weight: 500;
    font-size: 0.95rem; /* 0.95em -> 0.95rem */
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem; /* 14px 16px */
    border: var(--thin-border-width) solid transparent;
    border-radius: 0.75rem; /* 12px */
    background-color: var(--bg-color);
    color: var(--text-primary);
    box-shadow: inset 0 0.0625rem 0.125rem rgba(0,0,0,0.05); /* 0 1px 2px */
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 1rem; /* 1em -> 1rem */
}

.input-group input::placeholder {
    color: var(--text-placeholder);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 0.1875rem rgba(0, 122, 255, 0.2); /* 0 0 0 3px */
}

.submit-button {
    width: 100%;
    padding: 0.9375rem; /* 15px */
    border: none;
    border-radius: 0.75rem; /* 12px */
    background-color: var(--accent-color);
    color: var(--text-on-accent);
    font-weight: 600;
    font-size: 1.1rem; /* 1.1em -> 1.1rem */
    cursor: pointer;
    box-shadow: 0 0.25rem 0.625rem rgba(0, 122, 255, 0.3); /* 0 4px 10px */
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.625rem; /* 10px */
}

.submit-button:hover {
    filter: brightness(1.1);
    box-shadow: 0 0.375rem 0.9375rem rgba(0, 122, 255, 0.35); /* 0 6px 15px */
}

.submit-button:active {
    transform: scale(0.98);
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 122, 255, 0.3); /* 0 2px 5px */
}

.accuracy-guarantee {
    text-align: center;
    font-size: 0.85rem; /* 0.85em -> 0.85rem */
    color: var(--text-secondary);
    margin-top: 1.25rem; /* 20px */
}


/*
================================================================================
  SECCIÓN 6: PANTALLA DE CARGA Y ESTADOS (REESCRITA CON ICONOS CSS PURO)
================================================================================
*/

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 12.5rem; /* 200px */
    padding: 1.25rem; /* 20px */
}

.loading-message {
    margin-top: 1.25rem; /* 20px */
    font-size: 1rem; /* 1em -> 1rem */
    color: var(--text-secondary);
}

/* --- Spinner Estilo iOS (Restaurado) --- */
.spinner {
    width: 3.125rem; /* 50px */
    height: 3.125rem; /* 50px */
    position: relative;
}

.spinner:before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.75rem; /* 44px */
    height: 2.75rem; /* 44px */
    margin-top: -1.375rem; /* -22px */
    margin-left: -1.375rem; /* -22px */
    border-radius: 50%;
    border: 0.1875rem solid #ccc; /* 3px */
    border-top-color: var(--accent-color);
    animation: ios-spinner-rotate 0.7s linear infinite;
}
body.dark-theme .spinner:before {
    border: 0.1875rem solid #444; /* 3px */
    border-top-color: var(--accent-color);
}

@keyframes ios-spinner-rotate {
    100% {
        transform: rotate(360deg);
    }
}
#loading-spinner {
    display: none;
}


/* --- Estados de Éxito y Error (NUEVA IMPLEMENTACIÓN CON ICONOS CSS) --- */
.status-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.875rem 1.25rem; /* 30px 20px */
    min-height: 15.625rem; /* 250px */
}

.status-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.9375rem; /* 15px */
}

.status-message {
    font-size: 1.2rem; /* 1.2em -> 1.2rem */
    font-weight: 600;
    text-align: center;
}

/* --- INICIO: Iconos con Bordes (CSS Puro) --- */

#successCheck, #errorCross {
    width: 3.75rem; /* 60px */
    height: 3.75rem; /* 60px */
    border-radius: 50%;
    position: relative;
    display: block;
    margin: 0.625rem auto; /* 10px */
    transform: scale(0.8);
    opacity: 0;
    animation: scale-up 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.1s forwards;
}

#successCheck {
    background-color: var(--success-color);
}
#errorCross {
    background-color: var(--error-color);
}

#successCheck::after {
    content: '';
    box-sizing: border-box;
    display: block;
    width: 0.9375rem;  /* 15px */
    height: 1.875rem; /* 30px */
    border: solid #fff;
    border-width: 0 0.3125rem 0.3125rem 0; /* 0 5px 5px 0 */
    transform: rotate(45deg);
    position: absolute;
    top: 0.625rem;  /* 10px */
    left: 1.25rem; /* 20px */
}

#errorCross::before,
#errorCross::after {
    content: '';
    box-sizing: border-box;
    display: block;
    width: 0.3125rem;   /* 5px */
    height: 1.875rem; /* 30px */
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
}
#errorCross::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
#errorCross::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes scale-up {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  70% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* === FIN DE LA CORRECCIÓN === */


/*
================================================================================
  SECCIÓN 7: TERMINAL
================================================================================
*/

.terminal-container {
    padding: 0;
    overflow: hidden;
    margin-top: 0;
}

.terminal-header {
    background-color: #e8e8e8;
    padding: 0.625rem 0.75rem; /* 10px 12px */
    border-top-left-radius: 0.75rem; /* 12px */
    border-top-right-radius: 0.75rem; /* 12px */
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: var(--thin-border-width) solid rgba(0,0,0,0.1);
}
body.dark-theme .terminal-header {
    background-color: #3a3a3c;
    border-bottom: var(--thin-border-width) solid rgba(255,255,255,0.1);
}

.terminal-header .button {
    width: 0.75rem; /* 12px */
    height: 0.75rem; /* 12px */
    border-radius: 50%;
    margin-right: 0.5rem; /* 8px */
}
.terminal-header .red { background-color: #ff5f56; }
.terminal-header .yellow { background-color: #ffbd2e; }
.terminal-header .green { background-color: #27c93f; }

.terminal-header .title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem; /* 0.9em -> 0.9rem */
}

.terminal-body {
    background-color: var(--card-bg);
    color: var(--terminal-text-color);
    font-family: "SF Mono", "Menlo", "Monaco", monospace;
    padding: 0.9375rem; /* 15px */
    height: 8.75rem; /* 140px */
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-bottom-left-radius: 0.75rem; /* 12px */
    border-bottom-right-radius: 0.75rem; /* 12px */
    font-size: 0.9rem; /* 0.9em -> 0.9rem */
}


/*
================================================================================
  SECCIÓN 8: DETALLES DE FACTURA (RESULTADOS)
================================================================================
*/

.details-section {
    width: 100%;
    padding: 1.25rem 0; /* 20px */
}

.result-card {
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.card-title {
    color: var(--text-primary);
    font-size: 1.2rem; /* 1.2em -> 1.2rem */
    font-weight: 600;
    margin-top: 0;
}

.card-section {
    padding: 1.25rem 0; /* 20px */
    border-bottom: var(--thin-border-width) solid var(--glass-border);
    margin-bottom: 0.9375rem; /* 15px */
}
.card-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 12px */
    margin-bottom: 0.75rem; /* 12px */
    font-size: 1rem; /* 1em -> 1rem */
    word-break: break-word;
}
.info-item:last-child {
    margin-bottom: 0;
}

.info-item span.icon {
    font-size: 1.4rem; /* 1.4em -> 1.4rem */
    color: var(--accent-color);
    width: 1.5625rem; /* 25px */
    text-align: center;
}
.info-item strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.device-info {
    display: flex;
    align-items: center;
    gap: 0.9375rem; /* 15px */
    margin: 0.9375rem 0; /* 15px */
    padding: 0.75rem; /* 12px */
    background-color: var(--bg-color);
    border-radius: 0.75rem; /* 12px */
}
.device-info img {
    width: 5rem; /* 80px */
    height: auto;
    border-radius: 0.5rem; /* 8px */
}


/*
================================================================================
  SECCIÓN 9: BOTONES DE ACCIÓN Y FOOTER
================================================================================
*/

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9375rem; /* 15px */
    margin-top: 1.5625rem; /* 25px */
}

.action-buttons button {
    padding: 0.75rem 0.9375rem; /* 12px 15px */
    border-radius: 0.625rem; /* 10px */
    font-weight: 600;
    font-size: 1rem; /* 1em -> 1rem */
    cursor: pointer;
    transition: all 0.2s ease;
    border: var(--thin-border-width) solid transparent;
}

#savePdfBtn {
    background-color: var(--accent-color);
    color: var(--text-on-accent);
}
#savePdfBtn:hover {
    filter: brightness(1.1);
}

#checkOtherBtn, #resetFormBtn {
    background-color: var(--bg-color);
    color: var(--accent-color);
    border: var(--thin-border-width) solid var(--glass-border);
}
#checkOtherBtn:hover, #resetFormBtn:hover {
    background-color: var(--glass-border);
}


/* === FOOTER === */
.app-footer {
    text-align: center;
    margin-top: 2.5rem; /* 40px */
    padding-top: 1.25rem; /* 20px */
    border-top: var(--thin-border-width) solid var(--glass-border);
    font-size: 0.8rem; /* 0.8em -> 0.8rem */
    color: var(--text-secondary);
}

.security-disclaimer p {
    margin-bottom: 0.625rem; /* 10px */
}


/*
================================================================================
  SECCIÓN 10: MODAL DE BIENVENIDA
================================================================================
*/

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0.625rem); /* 10px */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 31.25rem; /* 500px */
    width: 90%;
    position: relative;
    padding: 1.875rem; /* 30px */
    max-height: 85vh;
    overflow-y: auto;
    margin: 1.25rem auto; /* 20px */
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}


.modal-title {
    color: var(--text-primary);
    font-size: 1.5rem; /* 1.5em -> 1.5rem */
    font-weight: 600;
    text-align: center;
    margin-top: 0;
    padding-bottom: 0.9375rem; /* 15px */
    border-bottom: var(--thin-border-width) solid var(--glass-border);
    margin-bottom: 1.25rem; /* 20px */
}

.modal-body p {
    margin: 0.625rem 0 0.9375rem; /* 10px 0 15px */
    line-height: 1.6;
    font-size: 1rem; /* 1em -> 1rem */
    color: var(--text-secondary);
}
.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}
.modal-body a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}
.modal-body a:hover {
    text-decoration: underline;
}

.api-update-alert {
    color: var(--error-color);
    font-weight: 600;
    border: var(--thin-border-width) solid var(--error-color);
    background-color: rgba(255, 59, 48, 0.1);
    padding: 0.625rem; /* 10px */
    border-radius: 0.5rem; /* 8px */
    margin-top: 0.9375rem; /* 15px */
}

.modal-close-btn {
    position: absolute;
    top: 0.9375rem; /* 15px */
    right: 0.9375rem; /* 15px */
    background: var(--bg-color);
    border: none;
    font-size: 1.2rem; /* 1.2em -> 1.2rem */
    font-weight: bold;
    line-height: 1;
    width: 1.75rem; /* 28px */
    height: 1.75rem; /* 28px */
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close-btn:hover {
    background: #ccc;
    color: var(--text-primary);
}
body.dark-theme .modal-close-btn:hover {
    background: #555;
}


/*
================================================================================
  SECCIÓN 11: DISEÑO RESPONSIVO (LA VERDADERA SOLUCIÓN)
================================================================================
*/

/* * 1. AJUSTE PARA "SMALL DESKTOPS" (COMO 1366x768)
 * Esta regla reduce el tamaño de fuente base, lo que
 * reduce proporcionalmente CADA elemento de la UI que usa 'rem'.
 * Esto es el "zoom al 81.25%" que querías.
 */
@media (min-width: 900px) and (max-width: 1400px) {
  html {
    font-size: 65%; /* 13px base */
  }
}

/* * 2. AJUSTE PARA "LARGE DESKTOPS"
 * Mantenemos la base de 16px para pantallas grandes.
 */
@media (min-width: 1401px) {
  html {
    font-size: 100%; /* 16px base */
  }
}


/* * 3. BREAKPOINT MÓVIL (Existente, ahora en REM)
 */
@media (max-width: 56.1875rem) { /* 899px */
    
    /* Restablecer la fuente base para móvil si es necesario, o dejar que herede */
    html {
        font-size: 100%; /* 16px base para móvil, ajustar si se ve muy grande */
    }

    body, .container {
        padding: 0.625rem; /* 10px */
    }
    .main-grid {
        grid-template-columns: 1fr;
    }
    .app-header h1 {
        font-size: 1.8rem; /* 1.8em -> 1.8rem */
    }
    .soft-ui-card, .soft-ui-terminal {
        padding: 1.25rem; /* 20px */
    }
    .terminal-body {
        height: 7.5rem; /* 120px */
    }
    .action-buttons {
        grid-template-columns: 1fr;
    }
    .status-message {
        font-size: 1rem; /* 1em -> 1rem */
    }
    .modal-content {
        width: 95%;
        padding: 1.25rem; /* 20px */
    }
    .modal-title {
        font-size: 1.3rem; /* 1.3em -> 1.3rem */
    }

    #notification-bar {
        margin: -0.625rem -0.625rem 1.25rem -0.625rem; /* -10px -10px 20px -10px */
        border-top-left-radius: 1.5rem; /* 24px */
        border-top-right-radius: 1.5rem; /* 24px */
    }
}


/* --- ADICIÓN: Estilos para la navegación y botones secundarios --- */

.header-nav {
    display: flex;
    justify-content: center;
    gap: 0.9375rem; /* 15px */
    margin-bottom: 1.25rem; /* 20px */
    flex-wrap: wrap;
}

.ios-button-pill {
    display: inline-block;
    padding: 0.5rem 1.125rem; /* 8px 18px */
    border-radius: 1.25rem; /* 20px */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem; /* 0.9em -> 0.9rem */
    background-color: var(--glass-border);
    color: var(--text-secondary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ios-button-pill:hover {
    background-color: rgba(120, 120, 128, 0.2);
    color: var(--accent-color);
}

.trustpilot-widget {
    display: inline-block;
    padding: 0.5rem 1.125rem; /* 8px 18px */
    border-radius: 1.25rem; /* 20px */
    background-color: rgba(52, 199, 89, 0.15);
    border: none;
    box-shadow: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}
.trustpilot-widget a {
    color: var(--success-color);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem; /* 0.9em -> 0.9rem */
}
.trustpilot-widget:hover {
    background-color: rgba(52, 199, 89, 0.25);
    box-shadow: none;
}


/*
================================================================================
  SECCIÓN 12: BARRA DE NOTIFICACIÓN (INTEGRADA)
================================================================================
*/

#notification-bar {
    position: relative;
    background-color: var(--warning-color);
    color: #000000;
    text-align: center;
    font-weight: 500;
    font-size: 0.875rem; /* 14px */
    padding: 0.9375rem 2.8125rem 0.9375rem 1.5625rem; /* 15px 45px 15px 25px */
    margin: -1.25rem -1.25rem 1.25rem -1.25rem; /* -20px -20px 20px -20px */
    border-top-left-radius: 1.5rem; /* 24px */
    border-top-right-radius: 1.5rem; /* 24px */
    border-bottom: var(--thin-border-width) solid var(--glass-border);
    transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark-theme #notification-bar {
    color: #000000;
}

#notification-bar p {
    margin: 0;
    display: inline;
    line-height: 1.4;
}

#close-notification-bar {
    position: absolute;
    top: 50%;
    right: 0.9375rem; /* 15px */
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 1.625rem; /* 26px */
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#close-notification-bar:hover {
    opacity: 1;
}

/*
================================================================================
  SECCIÓN 13: INDICADOR DE ESTADO DE LA API
================================================================================
*/
#api-status-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* 8px */
    margin-top: 1.5625rem; /* 25px */
    padding: 0.375rem 0.75rem; /* 6px 12px */
    border-radius: 0.75rem; /* 12px */
    background-color: var(--glass-border);
    max-width: 9.375rem; /* 150px */
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.3s ease;
}

.status-dot {
    width: 0.625rem; /* 10px */
    height: 0.625rem; /* 10px */
    border-radius: 50%;
    background-color: var(--text-placeholder);
    animation: pulse-checking 1.5s infinite;
}

.status-text {
    font-size: 0.85rem; /* 0.85em -> 0.85rem */
    font-weight: 500;
    color: var(--text-secondary);
}

#api-status-indicator.online {
    background-color: rgba(52, 199, 89, 0.15);
}
#api-status-indicator.online .status-dot {
    background-color: var(--success-color);
    animation: pulse-online 1.5s infinite;
}
#api-status-indicator.online .status-text {
    color: var(--success-color);
}

#api-status-indicator.offline {
    background-color: rgba(255, 59, 48, 0.1);
}
#api-status-indicator.offline .status-dot {
    background-color: var(--error-color);
    animation: none;
}
#api-status-indicator.offline .status-text {
    color: var(--error-color);
}

@keyframes pulse-checking {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes pulse-online {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7); }
    70% { box-shadow: 0 0 0 0.5rem rgba(52, 199, 89, 0); } /* 8px */
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}