/**
 * Pension Strategy Simulator Styles
 * 연금 수령 전략 시뮬레이터 전용 스타일
 *
 * @package Zipper
 */

/* ===== 2컬럼 자체 그리드 레이아웃 (Rule 38) ===== */
.pss-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

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

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

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

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

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

/* ===== Hidden ===== */
.pss-hidden {
    display: none !important;
}

/* ===== 입력 영역 ===== */
.pss-input-section {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.pss-input-group {
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

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

/* ===== 입력 행 (2열) ===== */
.pss-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pss-input-row .pss-input-group {
    margin-bottom: 0;
}

/* ===== Select ===== */
.pss-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;
}

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

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

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

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

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

/* ===== 라디오 버튼 그룹 ===== */
.pss-radio-group {
    display: flex;
    gap: 6px;
}

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

.pss-radio-label:hover {
    border-color: #d4af37;
    color: #2d2a26;
}

.pss-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pss-radio-label.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(184, 134, 11, 0.05) 100%);
    border-color: #d4af37;
    color: #b8860b;
    font-weight: 600;
}

/* ===== 고급 설정 토글 ===== */
.pss-advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pss-advanced-toggle:hover {
    border-color: #d4af37;
    color: #2d2a26;
}

.pss-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s;
}

.pss-advanced-toggle.active .pss-toggle-icon {
    transform: rotate(180deg);
}

/* 고급 설정 영역 (pss-hidden 클래스로 토글) */
.pss-advanced-section {
    padding-top: 12px;
}

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

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

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

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

/* ===== 탭 콘텐츠 내부 레이아웃 ===== */
.pss-tab-comprehensive,
.pss-tab-comparison,
.pss-tab-tax {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Part A rename #2: .pss-summary-cards -> .pss-result-summary */
.pss-result-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pss-summary-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.pss-summary-card:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.12);
}

.pss-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pss-summary-label i {
    color: #d4af37;
}

.pss-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: #2d2a26;
}

.pss-summary-value .pss-unit {
    font-size: 13px;
    font-weight: 500;
    color: #7a756d;
}

/* Part A rename #3: .pss-summary-card.pss-highlight -> .pss-summary-card.highlight */
.pss-summary-card.highlight {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(184, 134, 11, 0.05) 100%);
    border-color: rgba(212, 175, 55, 0.35);
}

.pss-summary-card.highlight .pss-summary-value {
    color: #d4af37;
}

/* Part A rename #4: .pss-strategy-cards -> .pss-strategy-grid */
.pss-strategy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pss-strategy-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s;
}

.pss-strategy-card:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.12);
}

/* Part A rename #5: .pss-card-standard -> .pss-strategy-card.recommended */
.pss-strategy-card.recommended {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(184, 134, 11, 0.05) 100%);
    border-color: rgba(212, 175, 55, 0.35);
    transform: scale(1.03);
}

.pss-strategy-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.pss-card-early .pss-strategy-badge {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Part A rename #5 badge: .pss-card-standard -> .pss-strategy-card.recommended */
.pss-strategy-card.recommended .pss-strategy-badge {
    background: rgba(212, 175, 55, 0.15);
    color: #b8860b;
}

.pss-card-defer .pss-strategy-badge {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.pss-strategy-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 12px;
}

/* Part A rename #6: .pss-strategy-row -> .pss-strategy-detail */
.pss-strategy-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    color: #5f5a56;
    border-bottom: 1px solid #f0ece6;
    text-align: left;
}

.pss-strategy-detail:last-child {
    border-bottom: none;
}

.pss-strategy-detail strong {
    font-weight: 700;
    color: #2d2a26;
}

.pss-strategy-desc {
    font-size: 11px;
    color: #9e9a96;
    margin-top: 10px;
    line-height: 1.5;
}

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

.pss-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pss-section-header .pss-section-title {
    margin-bottom: 0;
}

.pss-chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.pss-chart-container canvas {
    max-height: 300px;
}

.pss-breakeven-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    background: #faf9f7;
    border-radius: 8px;
    font-size: 13px;
    color: #5f5a56;
}

.pss-breakeven-info strong {
    color: #2d2a26;
    font-weight: 700;
}

/* Part A rename #7: .pss-download-btn -> .pss-excel-btn */
.pss-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #217346;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.pss-excel-btn:hover {
    background: #1a5c38;
}

.pss-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* Part A rename #8: .pss-table -> .pss-schedule-table */
.pss-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

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

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

.pss-schedule-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0ece6;
    text-align: right;
    color: #2d2a26;
}

.pss-schedule-table td:first-child {
    text-align: center;
    font-weight: 600;
}

.pss-schedule-table tr:hover {
    background: #faf9f7;
}

/* ===== 세금 비교 테이블 ===== */
.pss-tax-compare {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

/* Part A rename #9: .pss-health-card -> .pss-health-insurance */
.pss-health-insurance {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

.pss-health-amount {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    margin: 8px 0;
}

.pss-health-note {
    font-size: 12px;
    color: #7a756d;
    line-height: 1.6;
}

/* Part A rename #10: .pss-tips-section -> .pss-tax-tips */
.pss-tax-tips {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

/* Part A rename #11: .pss-tips-list -> .pss-tax-tips ul */
.pss-tax-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Part A rename #11: .pss-tips-list li -> .pss-tax-tips li */
.pss-tax-tips li {
    padding: 10px 0;
    font-size: 13px;
    color: #2d2a26;
    border-bottom: 1px solid #f0ece6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.pss-tax-tips li:last-child {
    border-bottom: none;
}

.pss-tax-tips li i {
    color: #d4af37;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ===== 면책 조항 ===== */
.pss-disclaimer {
    margin-top: 20px;
    padding: 14px 16px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    font-size: 12px;
    color: #a09a94;
    line-height: 1.6;
}

.pss-disclaimer strong {
    color: #7a756d;
    font-weight: 600;
}

/* ===== Part B: Missing CSS classes ===== */

/* ===== Korean display ===== */
.pss-kr-display {
    font-size: 11px;
    color: #d4af37;
    margin-top: 4px;
    text-align: right;
    min-height: 16px;
    display: block;
}

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

.pss-chart-title i {
    color: #d4af37;
    font-size: 14px;
}

/* ===== Strategy amount ===== */
.pss-strategy-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0ece6;
}

/* ===== Strategy pros/cons ===== */
.pss-strategy-pros,
.pss-strategy-cons {
    font-size: 12px;
    color: #5f5a56;
    padding: 4px 0;
    line-height: 1.5;
}

.pss-strategy-pros strong {
    color: #27ae60;
}

.pss-strategy-cons strong {
    color: #e74c3c;
}

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

/* ===== Summary sub text ===== */
.pss-summary-sub {
    font-size: 12px;
    color: #7a756d;
    margin-top: 4px;
}

/* ===== Tax compare card ===== */
.pss-tax-compare-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.pss-tax-compare-card:hover {
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.12);
}

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

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

    .pss-input-col {
        position: static;
    }

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

    /* Part A rename #2 and #4 in @media; Part C removed .pss-tax-cards */
    .pss-result-summary,
    .pss-strategy-grid {
        grid-template-columns: 1fr;
    }

    /* Part A rename #5 in @media */
    .pss-strategy-card.recommended {
        transform: none;
    }
}

/* ===== 반응형 (480px 이하) ===== */
@media (max-width: 480px) {
    .pss-main-layout,
    .pss-input-col,
    .pss-result-col {
        max-width: 100%;
        overflow-x: hidden;
    }

    .pss-input-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pss-radio-group {
        flex-direction: column;
    }

    .pss-summary-value {
        font-size: 18px;
    }

    .pss-strategy-card {
        padding: 14px 12px;
    }

    .pss-breakeven-info {
        flex-direction: column;
        gap: 8px;
    }

    .pss-tab {
        padding: 8px 4px;
        font-size: 12px;
    }
}

/* 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;
}

