/**
 * Weekly Holiday Pay Calculator Styles
 * 주휴수당 계산기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

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

.whpc-section + .whpc-section {
    margin-top: 14px;
}

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

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

/* ===== 탭 (기본 계산/월급 역산) - 2개이므로 flex OK ===== */
.whpc-tabs {
    display: flex;
    gap: 4px;
    background: #f5f3f0;
    border-radius: 8px;
    padding: 3px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.whpc-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

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

/* ===== 시급 입력 + 최저임금 버튼 행 ===== */
.whpc-wage-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.whpc-wage-row .whpc-amount-input {
    flex: 1;
    min-width: 0;
}

.whpc-min-wage-btn {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #d4af37;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.whpc-min-wage-btn:hover {
    background: rgba(212,175,55,0.15);
    border-color: #d4af37;
}

/* ===== 최저임금 경고 ===== */
.whpc-wage-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #e74c3c;
    background: rgba(231,76,60,0.06);
    border: 1px solid rgba(231,76,60,0.2);
    border-radius: 6px;
}

.whpc-wage-warning i {
    flex-shrink: 0;
}

/* ===== 버튼 ===== */
.whpc-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

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

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

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

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

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

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

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

/* ===== 결과 - 자격 배지 ===== */
.whpc-qualification-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

.whpc-qualification-badge.whpc-qual-yes {
    color: #27ae60;
    background: rgba(46,204,113,0.1);
    border: 1px solid rgba(46,204,113,0.3);
}

.whpc-qualification-badge.whpc-qual-no {
    color: #e74c3c;
    background: rgba(231,76,60,0.06);
    border: 1px solid rgba(231,76,60,0.2);
}

/* ===== 결과 - 요약 카드 ===== */
.whpc-result-summary {
    background: #fdfbf5;
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

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

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

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

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

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

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

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

/* ===== 상세 카드 ===== */
.whpc-detail-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

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

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

.whpc-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.whpc-detail-label i {
    color: #d4af37;
}

.whpc-detail-value {
    font-size: 24px;
    font-weight: 700;
    color: #2d2a26;
}

.whpc-detail-value .whpc-unit {
    font-size: 14px;
    font-weight: 500;
    color: #7a756d;
}

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

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

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

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

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

.whpc-dot-base {
    background: #2563eb;
}

.whpc-dot-holiday {
    background: #d4af37;
}

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

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

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

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

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

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

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

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

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

.whpc-compare-table th:first-child,
.whpc-compare-table td:first-child {
    text-align: center;
}

.whpc-compare-table td {
    color: #2d2a26;
}

.whpc-compare-table tr.whpc-current-row {
    background: rgba(212,175,55,0.08);
}

.whpc-compare-table tr.whpc-current-row td {
    font-weight: 600;
    color: #d4af37;
}

.whpc-compare-table tr:hover:not(.whpc-current-row) {
    background: #faf9f7;
}

.whpc-compare-table .whpc-no-qual td {
    color: #c4c0bc;
}

/* ===== 역산 결과 ===== */
.whpc-reverse-summary {
    background: #fdfbf5;
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

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

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

.whpc-reverse-main .whpc-unit {
    font-size: 18px;
    font-weight: 600;
}

.whpc-reverse-sub {
    font-size: 14px;
    color: #5f5a56;
    margin-bottom: 16px;
}

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

.whpc-reverse-row-label {
    color: #7a756d;
}

.whpc-reverse-row-value {
    font-weight: 600;
    color: #2d2a26;
}

/* 역산 상세 카드 */
.whpc-reverse-detail-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.whpc-reverse-detail-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.whpc-reverse-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.whpc-reverse-detail-label i {
    color: #d4af37;
}

.whpc-reverse-detail-value {
    font-size: 24px;
    font-weight: 700;
    color: #2d2a26;
}

.whpc-reverse-detail-value .whpc-unit {
    font-size: 14px;
    font-weight: 500;
    color: #7a756d;
}

/* 최저임금 위반 상태 */
.whpc-wage-status {
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.whpc-wage-status i {
    font-size: 20px;
}

.whpc-wage-status.whpc-status-ok {
    background: linear-gradient(135deg, rgba(46,204,113,0.08), rgba(46,204,113,0.02));
    border: 1px solid rgba(46,204,113,0.3);
    color: #27ae60;
}

.whpc-wage-status.whpc-status-violation {
    background: linear-gradient(135deg, rgba(231,76,60,0.08), rgba(231,76,60,0.02));
    border: 1px solid rgba(231,76,60,0.3);
    color: #e74c3c;
}

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

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

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

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

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

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

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

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

    .whpc-summary-main,
    .whpc-reverse-main {
        font-size: 28px;
    }
}

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

    .whpc-summary-main,
    .whpc-reverse-main {
        font-size: 28px;
    }

    .whpc-detail-cards,
    .whpc-reverse-detail-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .whpc-detail-card,
    .whpc-reverse-detail-card {
        padding: 14px 10px;
    }

    .whpc-detail-value,
    .whpc-reverse-detail-value {
        font-size: 20px;
    }

    .whpc-wage-row {
        flex-direction: column;
        gap: 8px;
    }

    .whpc-min-wage-btn {
        width: 100%;
        text-align: center;
    }
}

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

    .whpc-section {
        padding: 12px;
    }

    .whpc-input-row {
        grid-template-columns: 1fr;
    }

    .whpc-summary-main,
    .whpc-reverse-main {
        font-size: 24px;
    }

    .whpc-detail-cards,
    .whpc-reverse-detail-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .whpc-detail-card,
    .whpc-reverse-detail-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 14px;
    }

    .whpc-detail-label,
    .whpc-reverse-detail-label {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .whpc-detail-value,
    .whpc-reverse-detail-value {
        font-size: 22px;
    }

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

    .whpc-compare-table th,
    .whpc-compare-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;
}

