/**
 * 민사소송 총비용 계산기
 * @package Zipper
 */

.cltc-hidden {
    display: none !important;
}

.cltc-main-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cltc-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.cltc-result-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.cltc-section,
.cltc-result-summary,
.cltc-chart-section,
.cltc-table-section {
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    padding: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.cltc-tab-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f5f3ef;
    border-radius: 10px;
    padding: 6px;
}

.cltc-tab {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6a645c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 10px 8px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cltc-tab:hover {
    color: #4f4637;
}

.cltc-tab.is-active {
    background: #fff;
    color: #2d2a26;
    box-shadow: 0 2px 6px rgba(45, 42, 38, 0.12);
}

.cltc-tab-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cltc-section-title,
.cltc-block-title {
    margin: 0 0 12px;
    color: #2d2a26;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cltc-section-title i,
.cltc-block-title i {
    color: #d4af37;
}

.cltc-input-group {
    margin-bottom: 12px;
}

.cltc-input-group:last-child {
    margin-bottom: 0;
}

.cltc-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cltc-label {
    display: block;
    margin-bottom: 6px;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.cltc-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    color: #2d2a26;
    font-size: 13px;
    padding: 10px 12px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cltc-input:hover {
    border-color: #d4c67a;
}

.cltc-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.cltc-input::placeholder {
    color: #b7b1a8;
}

.cltc-input[type="number"] {
    -moz-appearance: textfield;
}

.cltc-input[type="number"]::-webkit-outer-spin-button,
.cltc-input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
}

.cltc-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    width: 100%;
    border: 1px solid #ddd7cb;
    border-radius: 8px;
    background: #fbfaf8;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cltc-amount-row:hover {
    border-color: #d4c67a;
}

.cltc-amount-row:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.cltc-amount-row .cltc-input {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: right;
    font-weight: 600;
}

.cltc-amount-row .cltc-input:hover,
.cltc-amount-row .cltc-input:focus {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.cltc-unit {
    min-width: 62px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #e4ddd0;
    background: linear-gradient(180deg, #fcfbf8 0%, #f3efe8 100%);
    color: #7b7467;
    font-size: 12px;
    user-select: none;
    box-sizing: border-box;
}

.cltc-korean-amount {
    margin: 6px 0 0;
    color: #8b836f;
    font-size: 11px;
    line-height: 1.4;
}

.cltc-hint {
    margin: 6px 0 0;
    color: #8f887d;
    font-size: 11px;
    line-height: 1.45;
}

.cltc-btn-group {
    display: flex;
    gap: 8px;
}

.cltc-btn {
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cltc-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cltc-btn-primary {
    flex: 1;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #c59a23 100%);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.cltc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.cltc-btn-ghost {
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
}

.cltc-btn-ghost:hover {
    transform: translateY(-1px);
}

.cltc-waiting {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7a704f;
    background: #fcfaf4;
}

.cltc-waiting i {
    color: #d4af37;
    font-size: 18px;
    flex-shrink: 0;
}

.cltc-waiting p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.cltc-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

.cltc-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3ead3;
    color: #7a6120;
    font-size: 11px;
    font-weight: 700;
}

.cltc-summary-title {
    margin: 0;
    color: #2d2a26;
    font-size: 20px;
    line-height: 1.35;
}

.cltc-summary-note {
    margin: 10px 0 0;
    color: #6e685f;
    font-size: 13px;
    line-height: 1.5;
}

.cltc-main-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.cltc-main-kpi {
    border: 1px solid #ede4d1;
    border-radius: 10px;
    background: #fffdfa;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cltc-main-kpi-label {
    color: #7a7469;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.cltc-main-kpi-value {
    color: #2d2a26;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.cltc-summary-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cltc-summary-item {
    border: 1px solid #eadfcb;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cltc-summary-label {
    color: #7a736a;
    font-size: 11px;
    line-height: 1.35;
}

.cltc-summary-value {
    color: #2d2a26;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.cltc-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.cltc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.cltc-download-btn.tool-btn.tool-btn-excel {
    color: #fff;
    background: linear-gradient(135deg, #59ab79 0%, #4b9a69 100%);
    border: 1px solid #448e62;
    box-shadow: 0 2px 6px rgba(72, 146, 103, 0.28);
}

.cltc-download-btn.tool-btn.tool-btn-excel:hover {
    background: linear-gradient(135deg, #4f9f70 0%, #438f62 100%);
    box-shadow: 0 4px 12px rgba(67, 133, 93, 0.34);
}

.cltc-block-sub {
    margin: 0;
    color: #6f685f;
    font-size: 12px;
    line-height: 1.5;
}

.cltc-chart-wrap {
    margin-top: 12px;
    height: 280px;
    border: 1px solid #efe6d6;
    border-radius: 12px;
    background: #fffefa;
    padding: 10px;
    box-sizing: border-box;
}

.cltc-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.cltc-chart-fallback {
    margin: 12px 0 0;
    color: #8c5c30;
    font-size: 12px;
    line-height: 1.5;
}

.cltc-fallback-table-wrap {
    margin-top: 8px;
    border: 1px solid #eee3cf;
    border-radius: 10px;
    overflow-x: auto;
    background: #fff;
}

.cltc-fallback-table,
.cltc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 560px;
}

.cltc-fallback-table thead th,
.cltc-table thead th {
    background: #faf4e8;
    color: #5c4f3a;
    font-weight: 700;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ecdcc3;
    white-space: nowrap;
}

.cltc-fallback-table tbody td,
.cltc-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #f0e6d6;
    color: #3f3a33;
    vertical-align: top;
}

.cltc-fallback-table tbody tr:last-child td,
.cltc-table tbody tr:last-child td {
    border-bottom: 0;
}

.cltc-table-wrap {
    overflow-x: auto;
    border: 1px solid #eee3cf;
    border-radius: 10px;
    background: #fff;
}

.cltc-empty-row td {
    text-align: center;
    color: #8e887f;
    padding: 14px 10px;
}

.cltc-notice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.cltc-notice-item {
    border: 1px solid #ece2d0;
    border-radius: 10px;
    background: #fffdfa;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cltc-notice-label {
    color: #7c7469;
    font-size: 11px;
}

.cltc-notice-value {
    color: #2f2a23;
    font-size: 13px;
    line-height: 1.45;
}

.cltc-disclaimer {
    border: 1px solid #f0e2c8;
    border-radius: 12px;
    background: #fffbf2;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #6e644f;
    font-size: 12px;
    line-height: 1.5;
}

.cltc-disclaimer i {
    color: #d4af37;
    margin-top: 1px;
    flex-shrink: 0;
}

.cltc-date-notice {
    color: #6f675c;
}

@media (max-width: 1024px) {
    .cltc-main-layout {
        grid-template-columns: 1fr;
    }

    .cltc-input-col {
        position: static;
        top: auto;
    }
}

@media (max-width: 900px) {
    .cltc-input-group input:not([type="radio"]):not([type="checkbox"]),
    .cltc-input-group select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
    }

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

    .cltc-main-kpi-value {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .cltc-section,
    .cltc-result-summary,
    .cltc-chart-section,
    .cltc-table-section {
        padding: 14px;
    }

    .cltc-input-row,
    .cltc-main-kpi-grid,
    .cltc-notice-grid {
        grid-template-columns: 1fr;
    }

    .cltc-summary-title {
        font-size: 18px;
    }

    .cltc-block-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .cltc-chart-wrap {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .cltc-main-layout,
    .cltc-input-col,
    .cltc-result-col {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

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

    .cltc-btn {
        padding: 11px 12px;
        font-size: 12px;
    }
}
