/* ============================================================
   Legal Fee Calculator
   ============================================================ */

.calc-wrapper {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

.calc-inputs {
    padding: 40px 40px 32px;
}

.calc-inputs .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
    margin-bottom: 8px;
}

.calc-inputs .form-control {
    border: 0;
    border-bottom: 2px solid #ddd;
    border-radius: 0;
    padding: 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #111;
    box-shadow: none;
    background: transparent;
    transition: border-color 0.2s;
}

.calc-inputs .form-control:focus {
    border-bottom-color: var(--theme-color1, #c8a96e);
    outline: none;
    box-shadow: none;
}

.calc-inputs .form-control::placeholder {
    color: #ccc;
    font-weight: 400;
    font-size: 1.2rem;
}

.calc-financing-control {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.calc-financing-control .form-control {
    min-width: 0;
    flex: 1;
}

.calc-financing-control__unit {
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid #ddd;
    padding: 10px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #777;
    line-height: 1;
}

.calc-financing-control:focus-within .calc-financing-control__unit {
    border-bottom-color: var(--theme-color1, #c8a96e);
}

.calc-financing-control__select {
    border: 0;
    border-bottom: 2px solid #ddd;
    border-radius: 0;
    background: transparent;
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 20px 10px 0;
    min-width: 138px;
    box-shadow: none;
}

.calc-financing-control__select:focus {
    border-bottom-color: var(--theme-color1, #c8a96e);
    outline: none;
}

@media (max-width: 575.98px) {
    .calc-financing-control {
        flex-wrap: wrap;
    }

    .calc-financing-control__select {
        flex-basis: 100%;
        min-width: 0;
    }
}

.calc-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0 40px;
}

.calc-results {
    padding: 32px 40px 40px;
}

.calc-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 575.98px) {
    .calc-stat-row {
        grid-template-columns: 1fr;
    }

    .calc-inputs {
        padding: 28px 24px 24px;
    }

    .calc-divider {
        margin: 0 24px;
    }

    .calc-results {
        padding: 24px 24px 32px;
    }
}

.calc-stat {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 20px 24px;
}

.calc-stat__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 6px;
}

.calc-stat__value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #111;
    line-height: 1.1;
}

.calc-stat--highlight {
    background: #111;
}

.calc-stat--highlight .calc-stat__label {
    color: rgba(255, 255, 255, 0.6);
}

.calc-stat--highlight .calc-stat__value {
    color: var(--theme-color1, #c8a96e);
}

.calc-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 767.98px) {
    .calc-breakdown {
        grid-template-columns: 1fr;
    }
}

.calc-breakdown__section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.calc-breakdown__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 0.95rem;
    color: #444;
    border-bottom: 1px solid #f5f5f5;
}

.calc-breakdown__note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 0 9px;
    color: #777;
    font-size: 0.78rem;
    line-height: 1.35;
    border-bottom: 1px solid #f5f5f5;
}

.calc-breakdown__note-rate {
    color: #111;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.calc-breakdown__note--spacer {
    visibility: hidden;
}

.calc-breakdown__row:last-of-type {
    border-bottom: none;
}

.calc-breakdown__row:has(+ .calc-breakdown__row--subtotal) {
    border-bottom: none;
}

.calc-breakdown__row--subtotal {
    font-weight: 700;
    color: #111;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 2px solid #e8e8e8;
    border-bottom: none;
}

.calc-breakdown__row--subtotal .calc-breakdown__amount {
    color: var(--theme-color-dark, #111);
}

.calc-breakdown__amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.calc-total-bar {
    background: var(--theme-color-dark, #111111);
    border-radius: 8px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.calc-total-bar__label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.calc-total-bar__formula {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.calc-total-bar__formula-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calc-total-bar__formula-amount {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.calc-total-bar__formula-op {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    line-height: 1;
}

.calc-total-bar__value {
    color: var(--theme-color1, #c8a96e);
    font-size: 1.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.calc-disclaimer {
    padding: 20px 40px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    font-size: 0.82rem;
    color: #999;
}

@media (max-width: 575.98px) {
    .calc-disclaimer {
        padding: 16px 24px;
    }
}

.swal-law-popup {
    width: min(92vw, 560px);
    border-radius: 4px;
    padding: 34px 34px 30px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    font-family: var(--text-font, inherit);
}

.swal-law-title {
    color: #111;
    font-family: var(--title-font, inherit);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0;
}

.swal-law-content {
    margin: 18px 0 0;
    padding: 0;
}

.swal-law-text {
    color: #555;
    font-size: 0.98rem;
    line-height: 1.75;
    margin: 0;
}

.swal-law-input {
    width: 100%;
    height: 54px;
    margin: 26px 0 0;
    border: 0;
    border-bottom: 2px solid #d8d8d8;
    border-radius: 0;
    box-shadow: none;
    color: #111;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: center;
}

.swal-law-input:focus {
    border-color: var(--theme-color1, #c8a96e);
    box-shadow: none;
}

.swal-law-helper {
    margin: 8px 0 0;
    color: #777;
    font-size: 0.85rem;
    line-height: 1.45;
    text-align: center;
}

.swal-law-confirm,
.swal-law-cancel {
    min-height: 48px;
    padding: 13px 22px;
    border: 1px solid #111;
    border-radius: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.swal-law-confirm {
    background: #111;
    color: #fff;
}

.swal-law-confirm:hover {
    background: var(--theme-color1, #c8a96e);
    border-color: var(--theme-color1, #c8a96e);
    color: #111;
}

.swal-law-cancel {
    background: #fff;
    color: #555;
    border-color: #d8d8d8;
}

.swal-law-cancel:hover {
    background: #f6f6f6;
    color: #111;
}

.swal2-actions {
    gap: 12px;
    margin-top: 30px;
}

.swal2-validation-message {
    margin-top: 18px;
    border-radius: 0;
    background: #f7f3ec;
    color: #6f4d16;
    font-size: 0.9rem;
}
