/**
 * Parental Leave Calculator Styles
 * 육아휴직급여 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

/* ===== 공통 섹션 (Rule 49) ===== */
.plc-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;
}

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

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

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

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

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

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

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

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

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

/* Rule 44: 탭 내부 섹션 간격 */
.plc-tab-content .plc-section + .plc-section {
    margin-top: 14px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ===== 체크박스 ===== */
.plc-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.plc-checkbox-group:hover {
    border-color: #d4c67a;
    background: #fff;
}

.plc-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #d4af37;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
}

.plc-checkbox-label {
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.4;
    cursor: pointer;
}

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

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

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

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

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

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

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

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

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

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

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

.plc-summary-main .plc-unit {
    font-size: 18px;
    font-weight: 600;
}

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

.plc-summary-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

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

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

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

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

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

.plc-chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 12px;
    font-size: 13px;
    color: #5a5650;
}

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

.plc-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.plc-dot-full {
    background: #d4af37;
}

.plc-dot-partial {
    background: #e8d48b;
}

/* 바 차트 */
.plc-bar-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

.plc-bar-wrap canvas {
    max-height: 280px;
}

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

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

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

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

.plc-schedule-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plc-download-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;
}

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

.plc-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 400px;
    max-width: 100%;
}

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

.plc-schedule-table th,
.plc-schedule-table td {
    padding: 10px 8px;
    text-align: right;
    border-bottom: 1px solid #f0ede8;
    white-space: nowrap;
}

.plc-schedule-table th {
    background: #faf9f7;
    font-weight: 600;
    color: #5f5a56;
    position: sticky;
    top: 0;
    z-index: 1;
}

.plc-schedule-table th:first-child,
.plc-schedule-table td:first-child {
    text-align: center;
}

.plc-schedule-table td {
    color: #2d2a26;
}

.plc-schedule-table .plc-total-row td {
    border-bottom: none;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.08);
    color: #d4af37;
}

.plc-schedule-table tr:hover:not(.plc-total-row) {
    background: #faf9f7;
}

/* ===== 2024 vs 2025 비교 ===== */
.plc-compare-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

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

.plc-compare-card {
    text-align: center;
    padding: 16px 12px;
    border-radius: 8px;
}

.plc-compare-card.plc-compare-old {
    background: #f5f3f0;
    border: 1px solid #e8e4dc;
}

.plc-compare-card.plc-compare-new {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.plc-compare-year {
    font-size: 12px;
    font-weight: 600;
    color: #7a756d;
    margin-bottom: 6px;
}

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

.plc-compare-new .plc-compare-value {
    color: #d4af37;
}

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

.plc-compare-diff {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 8px;
}

.plc-compare-diff-label {
    font-size: 13px;
    color: #27ae60;
    font-weight: 600;
}

.plc-compare-diff-value {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
}

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

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

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

/* ===== prefers-reduced-motion (Rule 49) ===== */
@media (prefers-reduced-motion: reduce) {
    .plc-section,
    .plc-tab,
    .plc-amount-input,
    .plc-select,
    .plc-calculate-btn,
    .plc-reset-btn,
    .plc-checkbox-group,
    .plc-download-btn {
        transition: none;
    }
    .plc-calculate-btn:hover {
        transform: none;
    }
}

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

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

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

    /* Rule 32: radio/checkbox 제외 */
    .plc-input-group input:not([type="radio"]):not([type="checkbox"]),
    .plc-input-group select {
        width: 100% !important;
        max-width: 100% !important;
    }

    .plc-summary-main {
        font-size: 28px;
    }

    .plc-compare-value {
        font-size: 18px;
    }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 768px) {
    .plc-result-summary {
        padding: 20px 16px;
    }

    .plc-summary-main {
        font-size: 28px;
    }

    .plc-bar-wrap {
        height: 220px;
    }

    .plc-bar-wrap canvas {
        max-height: 220px;
    }
}

/* ===== 반응형 - 작은 모바일 ===== */
@media (max-width: 480px) {
    .tool-section,
    .tool-layout-split,
    .tool-layout-input,
    .tool-layout-result {
        max-width: 100%;
        overflow-x: hidden;
    }

    .plc-section {
        padding: 12px;
    }

    .plc-tabs {
        flex-wrap: wrap;
    }

    .plc-tab {
        font-size: 12px;
        padding: 8px 6px;
    }

    .plc-summary-main {
        font-size: 24px;
    }

    .plc-compare-cards {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .plc-compare-value {
        font-size: 20px;
    }

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

    .plc-schedule-table th,
    .plc-schedule-table td {
        padding: 8px 4px;
    }
}

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

