/**
 * Acquisition Tax Calculator Styles
 * 취득세 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

/* ===== 공통 섹션 ===== */
.atc-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;
}

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

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

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

/* ===== 탭 ===== */
.atc-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

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

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

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

/* ===== 탭 콘텐츠 ===== */
.atc-tab-content {
    display: none;
}

.atc-tab-content.active {
    display: block;
}

/* 탭 내부 요소 간격 (Rule 44) */
.atc-tab-content .atc-section + .atc-section {
    margin-top: 14px;
}

.atc-tab-content .atc-btn-group {
    margin-top: 14px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.atc-checkbox-desc {
    display: block;
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
    padding-left: 22px;
}

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

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

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

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

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

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

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

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

/* ===== 결과 - 요약 카드 ===== */
.atc-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);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.atc-donut-wrap {
    position: relative;
    width: 100%;
    max-width: 220px;
    margin: 0 auto 16px;
}

.atc-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #5f5a56;
}

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

.atc-legend-label {
    flex: 1;
}

.atc-legend-pct {
    font-weight: 600;
    color: #2d2a26;
    margin-right: 4px;
}

.atc-legend-value {
    color: #9e9a96;
    font-size: 11px;
}

/* ===== 결과 - 감면 정보 ===== */
.atc-reduction-section {
    background: linear-gradient(135deg, #f0faf0 0%, #e8f5e8 100%);
    border: 1px solid #a5d6a7;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(76, 175, 80, 0.08);
}

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

.atc-reduction-title i {
    color: #4caf50;
}

.atc-reduction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}

.atc-reduction-row-label {
    color: #5f5a56;
}

.atc-reduction-row-value {
    font-weight: 600;
    color: #4caf50;
}

.atc-reduction-row-value.atc-after {
    color: #d4af37;
}

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

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

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

/* ===== 모션 감소 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
    .atc-section,
    .atc-amount-input,
    .atc-select,
    .atc-calculate-btn,
    .atc-radio-label,
    .atc-checkbox-label,
    .atc-tab {
        transition: none !important;
    }
    .atc-section:hover,
    .atc-calculate-btn:hover {
        transform: none !important;
    }
}

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

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

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

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

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

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

    .atc-section {
        padding: 12px;
    }

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

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

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

    .atc-tabs {
        gap: 2px;
        padding: 2px;
    }

    .atc-tab {
        padding: 7px 4px;
        font-size: 11px;
    }
}
