/**
 * Depreciation Calculator Styles
 * 감가상각비 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

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

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

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

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

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

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

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

.dpc-tab.active {
    background: #fff;
    color: #d4af37;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dpc-tab-content {
    display: none;
}

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

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

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

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

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

/* ===== 금액 입력 ===== */
.dpc-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;
}

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

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

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

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

/* ===== 셀렉트 ===== */
.dpc-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;
}

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

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

/* ===== 숫자 입력 ===== */
.dpc-number-input {
    width: 80px;
    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;
}

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

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

/* ===== 날짜/인라인 행 ===== */
.dpc-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dpc-date-row .dpc-select {
    flex: 1;
}

.dpc-date-row .dpc-unit {
    font-size: 12px;
    color: #5f5a56;
    white-space: nowrap;
}

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

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

/* ===== 힌트/범위 텍스트 ===== */
.dpc-hint {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 4px;
}

.dpc-useful-life-range {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.dpc-result-title i {
    color: #d4af37;
}

.dpc-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dpc-summary-item {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid #e8dfc0;
}

.dpc-summary-item-label {
    font-size: 11px;
    color: #7a756d;
    margin-bottom: 4px;
}

.dpc-summary-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.dpc-summary-item.dpc-highlight .dpc-summary-item-value {
    color: #d4af37;
    font-size: 16px;
}

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

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

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

.dpc-schedule-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.dpc-schedule-table th {
    padding: 8px 10px;
    background: #faf9f7;
    border-bottom: 2px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: right;
    white-space: nowrap;
}

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

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

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

.dpc-schedule-table tbody tr:hover td {
    background: #faf9f7;
}

.dpc-schedule-table tbody tr:last-child td {
    border-bottom: none;
    font-weight: 600;
}

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

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

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

.dpc-chart-wrap {
    position: relative;
    width: 100%;
    height: 300px;
}

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

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

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

.dpc-compare-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dpc-compare-card {
    padding: 14px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
}

.dpc-compare-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e4dc;
}

.dpc-compare-card.dpc-card-straight {
    border-color: #4dabf7;
}

.dpc-compare-card.dpc-card-straight .dpc-compare-card-title {
    color: #4dabf7;
}

.dpc-compare-card.dpc-card-declining {
    border-color: #d4af37;
}

.dpc-compare-card.dpc-card-declining .dpc-compare-card-title {
    color: #d4af37;
}

.dpc-compare-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.dpc-compare-item-label {
    color: #7a756d;
}

.dpc-compare-item-value {
    font-weight: 600;
    color: #2d2a26;
}

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

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

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

.dpc-compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.dpc-compare-table th {
    padding: 8px 10px;
    background: #faf9f7;
    border-bottom: 2px solid #e8e4dc;
    font-weight: 600;
    color: #5f5a56;
    text-align: right;
    white-space: nowrap;
}

.dpc-compare-table th:first-child {
    text-align: center;
}

.dpc-compare-table th.dpc-th-straight {
    color: #4dabf7;
}

.dpc-compare-table th.dpc-th-declining {
    color: #d4af37;
}

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

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

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

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

/* ===== 다운로드 버튼 ===== */
.dpc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #27ae60, #219a52);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.2);
    margin-top: 12px;
}

.dpc-download-btn:hover {
    background: linear-gradient(135deg, #219a52, #1e8a49);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

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

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

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

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

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

    .dpc-section:hover,
    .dpc-calculate-btn:hover,
    .dpc-download-btn:hover {
        transform: none !important;
    }
}

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

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

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

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

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

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

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

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

/* ===== 반응형 (480px) ===== */
@media (max-width: 480px) {
    .dpc-section {
        padding: 12px;
    }

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

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

    .dpc-compare-cards {
        grid-template-columns: 1fr;
    }

    .dpc-date-row {
        flex-wrap: wrap;
    }

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

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

    .dpc-chart-wrap {
        height: 220px;
    }
}
