/* ================================================================
   TOKİ TAKSİT HESAPLAMA — TEMPLATE CSS
   Matches ExcelDepo calculator design language
   ================================================================ */

/* ——— Base Form Styles (Consistent with project) ——— */
.toki-calc .calc-input-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.toki-calc .calc-input-row.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.toki-calc .calc-input-col {
    text-align: center;
}

.toki-calc .calc-input-col label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--color-text, #1e293b);
    font-size: 0.95rem;
}

.toki-calc .input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toki-calc .input-with-symbol .prefix {
    position: absolute;
    left: 1.25rem;
    font-weight: 800;
    color: var(--color-text-secondary, #64748b);
    font-size: 1rem;
    pointer-events: none;
}

.toki-calc .calc-field {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 10px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text, #1e293b);
    background: var(--color-bg, #ffffff);
    transition: all 0.2s;
}

.toki-calc .calc-field:focus {
    border-color: var(--color-primary, #2B542C);
    box-shadow: 0 0 0 1px rgba(43, 84, 44, 0.1);
    outline: none;
}

.toki-calc .mask-percent {
    padding-left: 2.25rem !important;
}

/* Remove spinner from number inputs */
.toki-calc .calc-field[type="number"] {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

.toki-calc .calc-field[type="number"]::-webkit-outer-spin-button,
.toki-calc .calc-field[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Calculate Button */
.toki-calc .calc-btn-wrapper {
    text-align: center;
    margin: 2rem 0;
}

.toki-calc .btn-calculate-centered {
    background: var(--cat-bg, #007bff);
    color: var(--cat-txt, #fff);
    border: none;
    padding: 0.85rem 4rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.toki-calc .btn-calculate-centered:hover {
    opacity: 0.85;
}

/* Error state for inputs */
.toki-calc .calc-field.is-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.15);
}

/* ——— Tab Navigation ——— */
.toki-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.toki-tab {
    padding: 10px 20px;
    border: 1px solid var(--color-border, #e0e0e0);
    background: var(--color-bg, #ffffff);
    color: var(--color-text, #333);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toki-tab:hover {
    background: #f8f9fa;
    border-color: #c0c0c0;
}

.toki-tab.is-active {
    background: var(--cat-bg, #245269);
    border-color: var(--cat-bg, #245269);
    color: var(--cat-txt, #ffffff);
}

.toki-tab.is-active i {
    --fa-primary-color: var(--cat-txt, #ffffff);
    --fa-secondary-color: var(--cat-txt, #ffffff);
}

/* ——— Tab Panels ——— */
.toki-panel {
    display: none;
}

.toki-panel.is-active {
    display: block;
}

/* ——— Summary Badge ——— */
.toki-summary {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.toki-summary .res-box {
    min-width: 320px;
    padding: 1.5rem 2.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.toki-summary .res-label {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.toki-summary .res-value {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

/* ——— Schedule Table ——— */
.toki-table-wrap {
    max-height: 500px;
    overflow-y: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 10px;
}

.toki-table-wrap::-webkit-scrollbar {
    width: 6px;
}

.toki-table-wrap::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.toki-table-wrap::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.toki-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.toki-schedule-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.toki-schedule-table thead th {
    background: #FCF8E3;
    color: #66512C;
    font-weight: 700;
    padding: 12px 16px;
    text-align: right;
    border-bottom: 2px solid #e0d5a8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toki-schedule-table thead th:first-child {
    text-align: center;
    border-radius: 10px 0 0 0;
}

.toki-schedule-table thead th:last-child {
    border-radius: 0 10px 0 0;
}

.toki-schedule-table tbody td {
    padding: 10px 16px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
    color: var(--color-text, #1e293b);
    font-weight: 500;
}

.toki-schedule-table tbody td:first-child {
    text-align: center;
    font-weight: 700;
    color: var(--cat-bg, #245269);
}

.toki-schedule-table tbody tr:hover {
    background: #fafafa;
}

/* 6-month highlight row */
.toki-schedule-table tbody tr.row-increase {
    background: #FFF8E1;
}

.toki-schedule-table tbody tr.row-increase:hover {
    background: #FFF3CD;
}

/* ——— Action Buttons ——— */
.toki-calc .calc-actions-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.toki-calc .btn-action {
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    transition: opacity 0.2s;
    background: var(--cat-bg, #007bff);
    color: var(--cat-txt, #fff);
    text-decoration: none;
}

.toki-calc .btn-action:hover {
    opacity: 0.85;
    color: var(--cat-txt, #fff);
    text-decoration: none;
}

/* ——— Disclaimer & Info ——— */
.toki-calc .calc-disclaimer-box {
    background: #F2DEDE;
    color: #843534;
    padding: 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 1px solid var(--color-border, #e0e0e0);
    margin-bottom: 1.5rem;
}

.toki-calc .calc-info-box {
    background: #D9EDF7;
    color: #245269;
    padding: 1.25rem 2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid var(--color-border, #e0e0e0);
}

/* ——— Result Box Colors ——— */
.box-excel-green {
    background: #DFF0D8;
}

.box-excel-green .res-value {
    color: #2B542C;
}

.box-sea-blue {
    background: #D9EDF7;
}

.box-sea-blue .res-value {
    color: #245269;
}

/* ——— Responsive ——— */
@media (max-width: 991px) {
    .toki-calc .calc-input-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .toki-calc .calc-input-row.cols-3 {
        grid-template-columns: 1fr;
    }
}

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

    .toki-tabs {
        flex-direction: column;
    }

    .toki-tab {
        justify-content: center;
    }

    .toki-summary .res-box {
        min-width: auto;
        width: 100%;
    }
}