/* =========================================================
   CONVERSOR DE PESO
   Estilos exclusivos da ferramenta
   ========================================================= */

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

.weight-card {
    padding: 30px;
}

.weight-card h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: #0f172a;
}

.weight-description {
    margin: 0 0 28px;
    color: #64748b;
    line-height: 1.6;
}


/* =========================================================
   VALOR
   ========================================================= */

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

.weight-value-area label {
    width: min(100%, 400px);
    margin-bottom: 8px;
    color: #1e293b;
    font-size: .9rem;
    font-weight: 600;
}

.weight-value-area input {
    width: min(100%, 400px);
    height: 54px;
    box-sizing: border-box;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 1.2rem;
    text-align: center;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.weight-value-area input::placeholder {
    color: #94a3b8;
}

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


/* =========================================================
   UNIDADES
   ========================================================= */

.weight-conversion-row {
    display: grid;
    grid-template-columns: 1fr 62px 1fr;
    gap: 14px;
    align-items: end;
    max-width: 820px;
    margin: 0 auto;
}

.weight-unit-field {
    display: flex;
    flex-direction: column;
}

.weight-unit-field label {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: .9rem;
    font-weight: 600;
}

.weight-unit-field select {
    width: 100%;
    min-height: 46px;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    cursor: pointer;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.weight-swap-area {
    display: flex;
    justify-content: center;
}

.weight-swap-button {
    width: 56px;
    height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 1.25rem;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.weight-swap-button:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.weight-swap-button:focus-visible,
.shortcut-button:focus-visible,
.weight-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}


/* =========================================================
   CONVERSÕES RÁPIDAS
   ========================================================= */

.weight-shortcuts {
    margin-top: 26px;
}

.weight-shortcuts-title {
    margin-bottom: 10px;
    color: #1e293b;
    font-size: .85rem;
    font-weight: 600;
}

.shortcut-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shortcut-button {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: .82rem;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.shortcut-button:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}


/* =========================================================
   AÇÕES
   ========================================================= */

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

.weight-button {
    min-height: 44px;
    padding: 9px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .15s ease;
}

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

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

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


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

.weight-result {
    display: none;
    margin-top: 30px;
}

.weight-result.visible {
    display: block;
}

.weight-result-box {
    padding: 28px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
}

.weight-result-title {
    margin-bottom: 10px;
    color: #64748b;
    font-size: .9rem;
}

.weight-result-value {
    color: #0f172a;
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.weight-result-equation {
    margin-top: 12px;
    color: #475569;
    line-height: 1.5;
}

.weight-rate {
    margin-top: 17px;
    color: #475569;
    font-size: .9rem;
    line-height: 1.6;
}

.weight-copy-status {
    min-height: 20px;
    margin-top: 10px;
    color: #2563eb;
    font-size: .8rem;
}

.weight-copy-action {
    margin-top: 18px;
}


/* =========================================================
   REFERÊNCIA
   ========================================================= */

.weight-reference {
    margin-top: 30px;
}

.weight-reference h3 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 1.05rem;
}

.reference-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: .86rem;
}

.reference-table th,
.reference-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.reference-table tr:last-child td {
    border-bottom: none;
}

.reference-table th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
}

.reference-table td {
    color: #475569;
}


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

.weight-warning {
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #eff6ff;
    color: #475569;
    font-size: .84rem;
    line-height: 1.6;
}

.weight-warning strong {
    color: #1e40af;
}


/* =========================================================
   INFORMAÇÕES
   ========================================================= */

.weight-info {
    max-width: 960px;
    margin: 0 auto;
}

.weight-info-card {
    padding: 30px;
}

.weight-info-card h2 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #0f172a;
    font-size: 1.2rem;
}

.weight-info-card h3 {
    margin-top: 26px;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 1rem;
}

.weight-info-card p {
    margin-bottom: 14px;
    color: #475569;
    line-height: 1.7;
}


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

@media (max-width: 700px) {

    .weight-card,
    .weight-info-card {
        padding: 24px;
    }

    .weight-conversion-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

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

}


@media (max-width: 480px) {

    .weight-card,
    .weight-info-card {
        padding: 20px;
    }

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

    .weight-button {
        width: 100%;
    }

    .shortcut-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .shortcut-button {
        width: 100%;
    }

    .weight-result-box {
        padding: 22px 18px;
    }

    .weight-result-value {
        font-size: 1.9rem;
    }

    .reference-table {
        min-width: 430px;
    }

}


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

@media print {

    header,
    footer,
    .tool-breadcrumb,
    .tool-header,
    .ad-container,
    .weight-actions,
    .weight-shortcuts,
    .weight-warning {
        display: none !important;
    }

    .tool-page,
    .tool-section,
    .tool-info-section {
        padding: 0 !important;
        margin: 0 !important;
    }

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

    .weight-card,
    .weight-info-card {
        border: none !important;
        box-shadow: none !important;
    }

    .weight-info {
        display: none !important;
    }

}