/* ================================================
   Calculadora IMC - Estilos
   Integrado con Tailwind CSS de Doctory.es
   ================================================ */

* {
    box-sizing: border-box;
}

/* Wrapper principal de la calculadora */
.calculadora-imc-wrapper {
    width: 100%;
}

/* ================================================
   ENCABEZADO
   ================================================ */

.imc-header {
    text-align: center;
    margin-bottom: 50px;
}

.imc-icon-container {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.imc-icon-container svg {
    width: 35px;
    height: 35px;
    stroke: #4ecdc4;
    stroke-width: 3;
    fill: none;
}

.imc-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.imc-subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* ================================================
   CONTENEDOR PRINCIPAL
   ================================================ */

.imc-container {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.imc-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* ================================================
   FORMULARIO
   ================================================ */

.imc-form-group {
    margin-bottom: 25px;
}

.imc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95em;
}

.imc-form-group input[type="number"],
.imc-form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e8eaed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background: #f8f9fa;
}

.imc-form-group input[type="number"]:focus,
.imc-form-group select:focus {
    outline: none;
    border-color: #4ecdc4;
    background: white;
}

.imc-form-group select {
    cursor: pointer;
}

.imc-helper-text {
    font-size: 0.85em;
    color: #95a5a6;
    margin-top: 5px;
}

.imc-btn-calcular {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a3b8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.imc-btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.imc-btn-calcular:active {
    transform: translateY(0);
}

/* ================================================
   RESULTADOS
   ================================================ */

.imc-result-card {
    display: none;
    animation: fadeIn 0.5s;
}

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

.imc-result-title {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95em;
    margin-bottom: 15px;
    font-weight: 600;
}

.imc-bmi-value {
    text-align: center;
    font-size: 5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 20px 0;
    letter-spacing: -3px;
}

.imc-bmi-category {
    text-align: center;
    font-size: 1.8em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
}

.imc-bmi-message {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 35px;
    line-height: 1.6;
}

/* ================================================
   BARRA DE RANGOS
   ================================================ */

.imc-bmi-range-title {
    text-align: center;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.05em;
}

.imc-bmi-range-bar {
    position: relative;
    height: 40px;
    background: linear-gradient(to right, 
        #5dade2 0%, 
        #52be80 20%, 
        #52be80 40%, 
        #f39c12 60%, 
        #e74c3c 80%, 
        #c0392b 100%);
    border-radius: 20px;
    margin-bottom: 10px;
    overflow: visible;
}

.imc-bmi-marker {
    position: absolute;
    top: -8px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 16px solid #2c3e50;
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.imc-bmi-marker::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 50px;
    background: #2c3e50;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}

.imc-bmi-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
    color: #95a5a6;
    font-size: 0.85em;
}

/* ================================================
   RECOMENDACIONES
   ================================================ */

.imc-next-steps {
    background: #e8f8f5;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.imc-next-steps-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.imc-next-steps-text {
    color: #5f6f7a;
    line-height: 1.6;
    font-size: 0.95em;
}

/* ================================================
   DISCLAIMER
   ================================================ */

.imc-disclaimer-wrapper {
    max-width: 100%;
    margin-top: 30px;
}

.imc-disclaimer {
    background: #f8f9fa;
    border-left: 4px solid #95a5a6;
    padding: 20px;
    border-radius: 8px;
    color: #5f6f7a;
    font-size: 0.9em;
    line-height: 1.6;
}

.imc-disclaimer strong {
    color: #2c3e50;
}

/* ================================================
   MENSAJES DE ERROR Y CARGA
   ================================================ */

.imc-error {
    background: #ffebee;
    border: 2px solid #ef5350;
    color: #c62828;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.imc-loader {
    display: none;
    text-align: center;
    padding: 20px;
}

.imc-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 968px) {
    .imc-container {
        grid-template-columns: 1fr;
    }
    
    .imc-header h1 {
        font-size: 2em;
    }
    
    .imc-bmi-value {
        font-size: 4em;
    }
}

@media (max-width: 600px) {
    .imc-card {
        padding: 25px;
    }
    
    .imc-header h1 {
        font-size: 1.8em;
    }
    
    .imc-subtitle {
        font-size: 1em;
    }
    
    .imc-bmi-value {
        font-size: 3.5em;
    }
    
    .imc-bmi-category {
        font-size: 1.5em;
    }
}