/**
 * Car Loan Calculator Styles
 * 자동차 할부 계산기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 (데스크탑) ===== */
.clc-main-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    align-items: start;
}

.clc-input-col {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.clc-result-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== 공통 섹션 ===== */
.clc-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.clc-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clc-section-title i {
    color: #d4af37;
    font-size: 14px;
}

/* ===== 탭 네비게이션 ===== */
.clc-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 4px;
}

.clc-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #7a756d;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.clc-tab:hover {
    color: #2d2a26;
    background: rgba(255, 255, 255, 0.5);
}

.clc-tab.active {
    color: #fff;
    background: #d4af37;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

/* ===== 입력 섹션 ===== */
.clc-input-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* ===== 입력 그룹 ===== */
.clc-input-group {
    max-width: 100%;
    box-sizing: border-box;
}

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

.clc-input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 6px;
}

.clc-input-label .clc-label-hint {
    font-weight: 400;
    color: #9e9a96;
    margin-left: 4px;
}

.clc-amount-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.clc-amount-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.clc-number-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.clc-number-input::placeholder {
    font-weight: 400;
    color: #c4c0bc;
}

.clc-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f5a56' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

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

.clc-korean-amount {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
}

.clc-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

/* ===== 라디오 버튼 ===== */
.clc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.clc-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    cursor: pointer;
    transition: all 0.2s;
}

.clc-radio-label:hover {
    border-color: #d4af37;
}

.clc-radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #d4af37;
    flex-shrink: 0;
}

.clc-radio-label.active {
    border-color: #d4af37;
    background: #fdfbf5;
    color: #2d2a26;
    font-weight: 500;
}

.clc-radio-badge {
    font-size: 10px;
    font-weight: 500;
    color: #d4af37;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: auto;
    white-space: nowrap;
}

/* ===== 차종 라디오 (가로 2열) ===== */
.clc-vehicle-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.clc-vehicle-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 12px;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    cursor: pointer;
    transition: all 0.2s;
}

.clc-vehicle-radio-label:hover {
    border-color: #d4af37;
}

.clc-vehicle-radio-label input[type="radio"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #d4af37;
    flex-shrink: 0;
}

.clc-vehicle-radio-label.active {
    border-color: #d4af37;
    background: #fdfbf5;
    color: #2d2a26;
    font-weight: 500;
}

/* ===== 버튼 ===== */
.clc-btn-group {
    display: flex;
    gap: 8px;
}

.clc-calculate-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37, #c9a030);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.clc-calculate-btn:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.clc-reset-btn {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.clc-reset-btn:hover {
    background: #eae7e3;
}

/* ===== 결과 - 대기 영역 ===== */
.clc-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #9e9a96;
}

.clc-waiting i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: #d4af37;
    opacity: 0.4;
}

.clc-waiting p {
    font-size: 13px;
    margin: 0;
}

/* ===== 결과 - 요약 카드 ===== */
.clc-result-summary {
    background: #fdfbf5;
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
}

.clc-summary-title {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 8px;
}

.clc-summary-main {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 4px;
    line-height: 1.2;
}

.clc-summary-label {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 16px;
}

.clc-summary-sub {
    font-size: 14px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 4px;
    padding-top: 8px;
    border-top: 1px dashed #e8dfc0;
}

.clc-summary-sub-value {
    font-weight: 700;
    color: #2d2a26;
}

.clc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #e8e4dc;
    font-size: 13px;
}

.clc-summary-row-label {
    color: #7a756d;
}

.clc-summary-row-value {
    font-weight: 600;
    color: #2d2a26;
}

.clc-summary-row-value.clc-highlight {
    font-weight: 700;
    color: #d4af37;
    font-size: 14px;
}

/* ===== 결과 - 세금 상세 ===== */
.clc-tax-detail {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.clc-tax-header {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    border-bottom: 1px solid #e8e4dc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clc-tax-header i {
    color: #d4af37;
}

.clc-tax-content-inner {
    padding: 8px 16px 16px;
}

.clc-tax-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0ede8;
}

.clc-tax-row:last-child {
    border-bottom: none;
}

.clc-tax-row-label {
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clc-tax-row-value {
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

.clc-tax-row.clc-tax-subtotal {
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #e8e4dc;
    border-bottom: none;
    font-weight: 600;
}

.clc-tax-row.clc-tax-subtotal .clc-tax-row-value {
    color: #d4af37;
    font-size: 14px;
}

.clc-tax-small {
    font-size: 11px;
    color: #9e9a96;
}

.clc-tax-discount {
    color: #4dabf7 !important;
}

.clc-tax-discount .clc-tax-row-value {
    color: #4dabf7;
}

.clc-bond-note {
    font-size: 10px;
    color: #9e9a96;
    font-weight: 400;
    margin-left: 4px;
}

/* ===== 결과 - 차트 ===== */
.clc-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.clc-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clc-chart-title i {
    color: #d4af37;
}

.clc-chart-wrap {
    max-width: 240px;
    margin: 0 auto;
}

.clc-chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    font-size: 12px;
    color: #5f5a56;
}

.clc-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.clc-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== 결과 - 상환 스케줄 ===== */
.clc-schedule-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.clc-schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e8e4dc;
}

.clc-schedule-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clc-schedule-title i {
    color: #d4af37;
}

.clc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #217346;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.clc-download-btn:hover {
    background: #1a5c38;
}

.clc-download-btn i {
    font-size: 14px;
}

.clc-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.clc-schedule-table th {
    padding: 10px 10px;
    background: #faf9f7;
    border-bottom: 1px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
    position: sticky;
    top: 0;
}

.clc-schedule-table th:first-child {
    text-align: center;
}

.clc-schedule-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0ede8;
    text-align: right;
    color: #2d2a26;
    font-variant-numeric: tabular-nums;
}

.clc-schedule-table td:first-child {
    text-align: center;
    color: #5f5a56;
}

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

.clc-schedule-table tr:hover {
    background: #fdfbf5;
}

.clc-schedule-table .clc-grace-row {
    color: #9e9a96;
    font-style: italic;
}

.clc-schedule-scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* ===== 면책 조항 ===== */
.clc-disclaimer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 11px;
    color: #9e9a96;
    line-height: 1.5;
}

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

/* ===== 유틸리티 ===== */
.clc-hidden {
    display: none !important;
}

/* ===== 거치기간 표시/숨김 ===== */
.clc-grace-group {
    transition: all 0.2s;
}

/* ===== 반응형 ===== */
@media (max-width: 900px) {
    .clc-main-layout {
        grid-template-columns: 1fr;
    }

    .clc-input-col {
        position: static;
        width: 100%;
    }

    .clc-result-col {
        width: 100%;
    }

    .clc-input-group input:not([type="radio"]):not([type="checkbox"]),
    .clc-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .clc-summary-main {
        font-size: 26px;
    }

    .clc-schedule-table {
        font-size: 11px;
    }

    .clc-schedule-table th,
    .clc-schedule-table td {
        padding: 6px 6px;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .clc-main-layout {
        max-width: 100%;
        overflow-x: hidden;
    }

    .clc-section {
        padding: 12px;
    }

    .clc-result-summary {
        padding: 16px;
    }

    .clc-summary-main {
        font-size: 22px;
    }

    .clc-vehicle-radio-group {
        grid-template-columns: 1fr;
    }

    .clc-chart-wrap {
        max-width: 200px;
    }
}

/* Excel button guard */
.tool-btn-excel {
  background: #59ab79;
  border-color: #59ab79;
}

.tool-btn-excel:hover,
.tool-btn-excel:focus-visible {
  background: #4f9f70;
  border-color: #4f9f70;
}

