/* =========================================================
   FantoniTec – Calculadora IMC  |  imc-widget.css
   ========================================================= */

/* Wrapper principal */
.ft-imc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    font-family: inherit;
}

/* ── Fila inputs + botón ─────────────────────────────────── */
.ft-imc-row {
    display: flex;
    align-items: stretch;
    height: 56px;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
}

/* Zona izquierda: campo de texto / labels */
.ft-imc-input-wrap {
    flex: 1 1 auto;
    background-color: #e8e8e8;
    border-radius: 40px 0 0 40px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    cursor: text;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.ft-imc-input-wrap:focus-within {
    background-color: #dcdcdc;
}

/* Labels visibles por defecto */
.ft-imc-fields-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #888888;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    left: 24px;
}

/* Cuando algún input tiene foco, los labels se ocultan */
.ft-imc-input-wrap:focus-within .ft-imc-fields-label {
    opacity: 0;
    transform: translateY(-4px);
}

/* Inputs ocultos, visibles en pantalla completa con focus */
.ft-imc-inputs-hidden {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ft-imc-input-wrap:focus-within .ft-imc-inputs-hidden {
    opacity: 1;
}

.ft-imc-inputs-hidden input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #888888;
    text-transform: uppercase;
    min-width: 0;
    font-family: inherit;
}

.ft-imc-inputs-hidden input::placeholder {
    color: #aaaaaa;
    font-size: 12px;
}

/* Botón Calcular */
.ft-imc-btn-calcular {
    flex: 0 0 auto;
    background-color: #3ecfbe;
    color: #ffffff;
    border: none;
    border-radius: 0 40px 40px 0;
    padding: 0 32px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    min-width: 130px;
}

.ft-imc-btn-calcular:hover {
    background-color: #2fb8a7;
    transform: none;
}

.ft-imc-btn-calcular:active {
    transform: scale(0.98);
}

/* ── Barra de resultado ──────────────────────────────────── */
.ft-imc-result-bar {
    width: 100%;
    height: 52px;
    background-color: #3ecfbe;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: inherit;
    transition: background-color 0.3s ease;
    overflow: hidden;
    position: relative;
}

.ft-imc-result-bar .ft-imc-result-text {
    transition: opacity 0.3s ease;
}

/* Estado de carga */
.ft-imc-result-bar.is-loading .ft-imc-result-text {
    opacity: 0.5;
}

/* Pulso al mostrar resultado */
@keyframes ft-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.015); }
    100% { transform: scale(1); }
}

.ft-imc-result-bar.has-result {
    animation: ft-pulse 0.35s ease;
}

/* ── Clasificación ───────────────────────────────────────── */
.ft-imc-classification {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #555555;
    padding: 0 8px;
    font-family: inherit;
}

/* ── Mensaje de error ────────────────────────────────────── */
.ft-imc-error {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #e05252;
    padding: 0 8px;
    font-family: inherit;
}

/* ── Responsivo ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .ft-imc-btn-calcular {
        padding: 0 20px;
        min-width: 100px;
        font-size: 11px;
    }

    .ft-imc-fields-label {
        font-size: 11px;
        gap: 6px;
    }

    .ft-imc-inputs-hidden input {
        font-size: 11px;
    }
}
