/**
 * Income Tax Calculator Styles
 * 종합소득세 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

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

.itc-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.1);
}

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

.itc-section-title i {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 입력 그룹 ===== */
.itc-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

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

.itc-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;
}

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

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

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

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

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

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

.itc-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;
}

.itc-select:hover {
    border-color: #d4c67a;
}

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

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

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

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

.itc-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;
}

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

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

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

.itc-radio-desc {
    font-size: 11px;
    color: #9e9a96;
    margin-left: auto;
}

/* ===== 체크박스 ===== */
.itc-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.itc-checkbox-row:last-child {
    margin-bottom: 0;
}

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

.itc-checkbox-label:hover {
    border-color: #d4af37;
}

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

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

.itc-inline-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.itc-inline-group .itc-input-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.itc-inline-group .itc-unit {
    font-size: 12px;
    color: #5f5a56;
    white-space: nowrap;
}

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

.itc-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);
}

.itc-calculate-btn:hover {
    background: linear-gradient(135deg, #c9a030, #b8922a);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.itc-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;
}

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

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

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

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

/* ===== 결과 - 요약 카드 ===== */
.itc-result-summary {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.12);
}

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

.itc-summary-main {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 4px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.itc-summary-main.itc-refund {
    color: #4dabf7;
}

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

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

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

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

/* ===== 결과 - 계산 흐름 ===== */
.itc-flow-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.itc-flow-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.itc-flow-title i {
    color: #d4af37;
}

.itc-flow-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.itc-flow-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.itc-flow-step:nth-child(odd) {
    background: #faf9f7;
}

.itc-flow-step-label {
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 6px;
}

.itc-flow-step-label .itc-flow-op {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.itc-flow-op-minus {
    background: #fff0f0;
    color: #e74c3c;
}

.itc-flow-op-equals {
    background: #f0f7ff;
    color: #3498db;
}

.itc-flow-op-multiply {
    background: #fdf5e6;
    color: #d4af37;
}

.itc-flow-op-plus {
    background: #f0fff0;
    color: #27ae60;
}

.itc-flow-step-value {
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
}

.itc-flow-step.itc-flow-highlight {
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
}

.itc-flow-step.itc-flow-highlight .itc-flow-step-value {
    color: #d4af37;
    font-size: 15px;
}

/* ===== 결과 - 세율 구간 시각화 ===== */
.itc-bracket-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.itc-bracket-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.itc-bracket-title i {
    color: #d4af37;
}

.itc-bracket-chart {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.itc-bracket-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.itc-bracket-rate {
    width: 36px;
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    text-align: right;
    flex-shrink: 0;
}

.itc-bracket-bar-wrap {
    flex: 1;
    height: 24px;
    background: #f5f3f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.itc-bracket-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
}

.itc-bracket-range {
    font-size: 10px;
    color: #9e9a96;
    width: 90px;
    flex-shrink: 0;
    text-align: right;
}

.itc-bracket-row.itc-bracket-active .itc-bracket-rate {
    color: #d4af37;
    font-weight: 700;
}

.itc-bracket-row.itc-bracket-active .itc-bracket-fill {
    position: relative;
}

.itc-bracket-row.itc-bracket-active .itc-bracket-fill::after {
    content: '◀ 내 구간';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.itc-bracket-colors-6  { background: #e8f5e9; }
.itc-bracket-colors-15 { background: #c8e6c9; }
.itc-bracket-colors-24 { background: #fff9c4; }
.itc-bracket-colors-35 { background: #ffe0b2; }
.itc-bracket-colors-38 { background: #ffccbc; }
.itc-bracket-colors-40 { background: #ffab91; }
.itc-bracket-colors-42 { background: #ef9a9a; }
.itc-bracket-colors-45 { background: #e57373; }

.itc-effective-rate {
    margin-top: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border: 1px solid #e8dfc0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.08);
}

.itc-effective-rate-label {
    color: #5f5a56;
}

.itc-effective-rate-value {
    font-weight: 700;
    color: #d4af37;
    font-size: 16px;
}

/* ===== 결과 - 절세 팁 ===== */
.itc-tips-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.itc-tips-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.itc-tips-title i {
    color: #d4af37;
}

.itc-tips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.itc-tip-card {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: #faf9f7;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.itc-tip-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
}

.itc-tip-icon {
    font-size: 16px;
    color: #d4af37;
    flex-shrink: 0;
    margin-top: 1px;
}

.itc-tip-text strong {
    color: #2d2a26;
}

.itc-tip-saving {
    display: inline-block;
    padding: 1px 6px;
    background: #fdfbf5;
    border: 1px solid #e8dfc0;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #d4af37;
    margin-left: 4px;
}

/* ===== 결과 - 연도별 비교 ===== */
.itc-compare-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.itc-compare-title {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.itc-compare-title i {
    color: #d4af37;
}

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

.itc-compare-table th {
    padding: 8px 10px;
    background: #faf9f7;
    border-bottom: 1px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: center;
}

.itc-compare-table th:first-child {
    text-align: left;
}

.itc-compare-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0ede8;
    text-align: center;
    color: #2d2a26;
    transition: background 0.15s ease;
}

.itc-compare-table tbody tr:hover td {
    background: #faf9f7;
}

.itc-compare-table td:first-child {
    text-align: left;
    color: #5f5a56;
}

.itc-compare-table tr:last-child td {
    border-bottom: none;
    font-weight: 600;
}

.itc-compare-table .itc-compare-current {
    background: #fdfbf5;
}

.itc-compare-diff {
    font-size: 11px;
    font-weight: 500;
}

.itc-compare-diff.itc-diff-minus {
    color: #4dabf7;
}

.itc-compare-diff.itc-diff-plus {
    color: #e74c3c;
}

/* ===== 면책 조항 ===== */
.itc-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;
}

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

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

/* ===== 귀속연도 탭 ===== */
.itc-year-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 12px;
}

.itc-year-tab {
    flex: 1;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9e9a96;
    cursor: pointer;
    transition: all 0.2s;
}

.itc-year-tab:hover {
    color: #5f5a56;
}

.itc-year-tab.active {
    background: #fff;
    color: #d4af37;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15);
}

/* ===== 모션 감소 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
    .itc-section,
    .itc-amount-input,
    .itc-number-input,
    .itc-select,
    .itc-calculate-btn,
    .itc-tip-card,
    .itc-compare-table td {
        transition: none !important;
    }
    .itc-section:hover,
    .itc-tip-card:hover,
    .itc-calculate-btn:hover {
        transform: none !important;
    }
}

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

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

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

    .tool-layout-input {
        max-width: 100%;
        overflow: hidden;
    }

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

    .itc-bracket-range {
        width: 70px;
        font-size: 9px;
    }

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

    .itc-compare-table {
        font-size: 11px;
    }

    .itc-compare-table th,
    .itc-compare-table td {
        padding: 6px 6px;
    }
}

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

    .itc-section {
        padding: 12px;
    }

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

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

    .itc-bracket-row {
        gap: 4px;
    }

    .itc-bracket-range {
        display: none;
    }

    .itc-checkbox-row {
        flex-direction: column;
    }

    .itc-inline-group {
        flex-wrap: wrap;
    }

    .itc-number-input {
        width: 60px;
    }
}
