/* ========================================
   ESTILOS ESPECÍFICOS - CALCULADORA
   Usando variables de colors.css
   ======================================== */

/* Layout principal */
.wrap {
    max-width: 980px;
    margin: 40px auto;
    padding: var(--spacing-lg);
}

/* Header */
header {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

header h1 {
    font-size: clamp(24px, 4vw, 36px);
    margin: 0;
    color: var(--text-brand);
}

/* Secciones específicas */
.help {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Input groups */
.input-group {
    margin-bottom: 4px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* Resultados */
.results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat {
    background: var(--background-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 14px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat h3 {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: var(--text-brand);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat .value {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--all-answer-filter-blue);
}

.stat.good .value {
    color: var(--state-success);
}

.stat.bad .value {
    color: var(--state-error);
}

/* Footer de la calculadora */
.footer {
    margin-top: var(--spacing-md);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    padding: 15px;
    background-color: var(--background-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-primary);
    margin: 14px 0;
}

/* Botón compartir específico */
#btnShare {
    font-size: 14px;
    padding: 8px 16px;
    min-width: 120px;
}

/* Responsive específico para calculadora */
@media (max-width: 860px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .button-group {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .wrap {
        margin: 20px auto;
        padding: 16px;
    }
    
    .results {
        grid-template-columns: 1fr;
    }
    
    .stat .value {
        font-size: 24px;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* Animaciones sutiles */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results .stat {
    animation: fadeIn 0.3s ease-out;
}

/* Estados de inputs mejorados */
input[type="number"]:invalid {
    border-color: var(--state-error);
    box-shadow: 0 0 0 2px rgba(255, 111, 96, 0.1);
}

input[type="number"]:valid {
    border-color: var(--state-success);
}

/* Mejoras de accesibilidad */
.btn:focus,
input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Tooltips para ayuda */
.help:hover {
    color: var(--text-brand);
    cursor: help;
}