/* =========================================================
   CONVERSOR DE ÁREA
   Estilos exclusivos desta ferramenta.
   O layout geral utiliza css/style.css.
   ========================================================= */


/* =========================================================
   CONTAINER PRINCIPAL
   ========================================================= */

.area-tool {
    max-width: 960px;
    margin: 0 auto;
}


/* =========================================================
   CAMPOS DA FERRAMENTA
   ========================================================= */

.area-tool .section-card {
    margin-bottom: 22px;
}


.area-tool .section-card h2 {
    margin-bottom: 18px;
}


.area-tool .section-intro {
    margin: -7px 0 22px;
    font-size: 0.9rem;
    line-height: 1.55;
}


/* =========================================================
   CAMPO DO VALOR
   ========================================================= */

.area-value-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
}


.area-value-container label {
    width: 100%;
    max-width: 380px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
}


.area-value-container input {
    width: 100%;
    max-width: 380px;
    min-height: 52px;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 1.15rem;
    text-align: center;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.area-value-container input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* =========================================================
   UNIDADES DE ORIGEM E DESTINO
   ========================================================= */

.area-units-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        64px
        minmax(0, 1fr);
    gap: 14px;
    align-items: end;
    max-width: 820px;
    margin: 0 auto;
}


.area-field {
    display: flex;
    flex-direction: column;
}


.area-field label {
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
}


.area-field select {
    width: 100%;
    min-height: 45px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.area-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* =========================================================
   BOTÃO TROCAR
   ========================================================= */

.area-swap-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}


.swap-area-button {
    width: 54px;
    height: 45px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #2563eb;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.swap-area-button:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}


.swap-area-button:active {
    transform: scale(0.96);
}


/* =========================================================
   BOTÕES
   ========================================================= */

.area-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}


.area-button {
    min-height: 43px;
    padding: 9px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.area-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}


.area-button:active {
    transform: translateY(1px);
}


.area-button-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}


.area-button-primary:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}


/* =========================================================
   AVISO
   ========================================================= */

.area-notice {
    max-width: 820px;
    margin: 22px auto 0;
    padding: 15px 17px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #334155;
    font-size: 0.84rem;
    line-height: 1.6;
}


.area-notice strong {
    color: #1e40af;
}


/* =========================================================
   RESULTADO
   ========================================================= */

.area-result {
    display: none;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}


.area-result.active {
    display: block;
}


.area-result-main {
    padding: 28px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background:
        linear-gradient(
            180deg,
            #f8fbff 0%,
            #ffffff 100%
        );
    text-align: center;
}


.area-result-label {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 0.9rem;
}


.area-result-value {
    color: #0f172a;
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.15;
    font-weight: 700;
    word-break: break-word;
}


.area-result-equation {
    margin-top: 12px;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}


.area-copy-status {
    min-height: 20px;
    margin-top: 10px;
    color: #16a34a;
    font-size: 0.8rem;
}


/* =========================================================
   EQUIVALÊNCIAS
   ========================================================= */

.area-result .section-card {
    margin-top: 22px;
}


.area-equivalences {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}


.area-equivalence {
    min-width: 0;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.area-equivalence:hover {
    border-color: #bfdbfe;
    box-shadow:
        0 3px 10px rgba(15, 23, 42, 0.05);
}


.area-equivalence-name {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
}


.area-equivalence-value {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 720px) {

    .area-units-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }


    .area-swap-container {
        align-items: center;
    }


    .swap-area-button {
        width: 100%;
    }


    .area-equivalences {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 500px) {

    .area-tool .section-card {
        padding: 18px;
    }


    .area-equivalences {
        grid-template-columns: 1fr;
    }


    .area-actions {
        flex-direction: column;
    }


    .area-button {
        width: 100%;
    }


    .area-result-main {
        padding: 22px 16px;
    }


    .area-result-value {
        font-size: 2rem;
    }


    .area-value-container input,
    .area-value-container label {
        max-width: 100%;
    }

}


/* =========================================================
   IMPRESSÃO
   ========================================================= */

@media print {

    header,
    footer,
    .tool-breadcrumb,
    .tool-header,
    .ad-container,
    .area-actions,
    .area-notice {
        display: none !important;
    }


    .area-result {
        display: block !important;
    }


    .area-result-main {
        border: 1px solid #cbd5e1;
        box-shadow: none;
    }

}