/* =========================================================
   CALCULADORA DE RESCISÃO TRABALHISTA
   Estilos exclusivos da ferramenta
   ========================================================= */


/* =========================================================
   ESTRUTURA
   ========================================================= */

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


/* =========================================================
   CARTÕES INTERNOS
   ========================================================= */

.termination-tool .section-card {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.termination-tool .section-card h2 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 1.18rem;
}

.section-intro {
    margin: -7px 0 18px;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.5;
}


/* =========================================================
   CAMPOS
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.field.full {
    grid-column: 1 / -1;
}

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

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

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

.field small {
    margin-top: 5px;
    color: #64748b;
    font-size: .76rem;
    line-height: 1.4;
}


/* =========================================================
   MODALIDADE
   ========================================================= */

.termination-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.termination-option {
    position: relative;
}

.termination-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.termination-option label {
    display: block;
    min-height: 58px;
    padding: 13px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.termination-option label:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.termination-option input:checked + label {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.option-title {
    display: block;
    margin-bottom: 3px;
    color: #0f172a;
    font-weight: 700;
}

.option-description {
    display: block;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.4;
}


/* =========================================================
   AVISOS
   ========================================================= */

.notice {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: .83rem;
    line-height: 1.5;
}

.notice.warning {
    border-color: #f1d9a8;
    background: #fffbeb;
}


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

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

.tool-button {
    min-height: 43px;
    padding: 9px 19px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .1s ease;
}

.tool-button:hover {
    transform: translateY(-1px);
}

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

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

.tool-button.secondary {
    background: #fff;
    color: #1e293b;
}

.tool-button.secondary:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}


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

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

.result.active {
    display: block;
}

.result-total {
    padding: 27px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        #eff6ff,
        #ffffff
    );
    text-align: center;
}

.result-total-label {
    margin-bottom: 8px;
    color: #475569;
    font-size: .92rem;
}

.result-total-value {
    color: #0f172a;
    font-size: 2.8rem;
    line-height: 1.1;
    font-weight: 700;
}

.result-total-note {
    max-width: 760px;
    margin: 11px auto 0;
    color: #64748b;
    font-size: .83rem;
    line-height: 1.5;
}


/* =========================================================
   RESUMO
   ========================================================= */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.summary-card {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.summary-label {
    margin-bottom: 6px;
    color: #64748b;
    font-size: .78rem;
}

.summary-value {
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 700;
}


/* =========================================================
   TABELA
   ========================================================= */

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

.result-table-wrapper {
    overflow-x: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

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

.result-table th:last-child,
.result-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.result-table th {
    color: #475569;
    font-size: .82rem;
}

.result-table .subtotal td {
    font-weight: 700;
}

.result-table .total td {
    border-top: 2px solid #cbd5e1;
    font-size: 1.02rem;
    font-weight: 700;
}

.negative {
    color: #b91c1c;
}


/* =========================================================
   MEMÓRIA DE CÁLCULO
   ========================================================= */

.calculation-box {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.calculation-box h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 1.12rem;
}

.calculation-item {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: .87rem;
    line-height: 1.55;
}

.calculation-item:last-child {
    border-bottom: 0;
}

.calculation-title {
    display: block;
    margin-bottom: 3px;
    color: #1e293b;
    font-weight: 700;
}


/* =========================================================
   AÇÕES DO RESULTADO
   ========================================================= */

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 23px;
}


/* =========================================================
   RESPONSABILIDADE
   ========================================================= */

.legal-notice {
    margin-top: 25px;
    padding: 17px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: .82rem;
    line-height: 1.55;
}

.legal-notice strong {
    color: #1e293b;
}


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

@media (max-width: 720px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .termination-options {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 520px) {

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

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .actions,
    .result-actions {
        flex-direction: column;
    }

    .tool-button {
        width: 100%;
    }

    .result-total {
        padding: 22px 16px;
    }

    .result-total-value {
        font-size: 2.25rem;
    }

}


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

@media print {

    header,
    footer,
    .tool-breadcrumb,
    .tool-header,
    .termination-tool > .section-card,
    .actions,
    .result-actions,
    .ad-container,
    .legal-notice {
        display: none !important;
    }

    .result {
        display: block !important;
        margin-top: 0;
        padding-top: 0;
        border: 0;
    }

    .result-total {
        border: 1px solid #ccc;
        background: #fff;
    }

    body {
        background: #fff;
    }

}