/**
 * Industrial Accident Compensation Calculator Styles
 * 산재보상금 계산기 전용 스타일
 * Prefix: iacc-
 *
 * @package Zipper
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.iacc-number-input {
    width: 80px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    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;
}

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

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

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

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

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

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

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

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

.iacc-unit {
    font-size: 12px;
    color: #7a756d;
    margin-left: 4px;
}

.iacc-inline-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.iacc-inline-group .iacc-input-label {
    margin-bottom: 0;
    white-space: nowrap;
}

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

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

.iacc-radio-label:hover {
    border-color: #d4c67a;
}

.iacc-radio-label.active {
    color: #2d2a26;
    background: rgba(212, 175, 55, 0.06);
    border-color: #d4af37;
}

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

/* ===== 계산된 평균임금 표시 ===== */
.iacc-calc-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    margin-top: 8px;
}

.iacc-calc-result-label {
    font-size: 12px;
    color: #5f5a56;
}

.iacc-calc-result-value {
    font-size: 15px;
    font-weight: 700;
    color: #d4af37;
}

/* ===== 안내 박스 ===== */
.iacc-info-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    line-height: 1.5;
}

.iacc-info-box i {
    flex-shrink: 0;
    margin-top: 1px;
}

.iacc-info-box.iacc-info-positive {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.06);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.iacc-info-box.iacc-info-warning {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.06);
    border: 1px solid rgba(230, 126, 34, 0.2);
}

.iacc-info-box.iacc-info-blue {
    color: #3498db;
    background: rgba(52, 152, 219, 0.06);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.iacc-compare-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.iacc-compare-row + .iacc-compare-row {
    border-top: 1px solid #f0ede8;
}

.iacc-compare-row-label {
    color: #7a756d;
}

.iacc-compare-row-value {
    font-weight: 600;
    color: #2d2a26;
}

.iacc-compare-row-value.iacc-value-gold {
    color: #d4af37;
    font-size: 15px;
}

.iacc-compare-row.iacc-compare-highlight {
    background: rgba(212, 175, 55, 0.04);
    padding: 10px 8px;
    border-radius: 8px;
    margin-top: 8px;
}

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

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

.iacc-bar-wrap {
    position: relative;
    width: 100%;
    height: 280px;
}

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

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

.iacc-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

/* ===== 손익분기점 ===== */
.iacc-breakeven-box {
    background: rgba(52, 152, 219, 0.06);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.iacc-breakeven-label {
    font-size: 12px;
    color: #3498db;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.iacc-breakeven-value {
    font-size: 20px;
    font-weight: 700;
    color: #3498db;
}

.iacc-breakeven-desc {
    font-size: 11px;
    color: #7a756d;
    margin-top: 6px;
}

/* ===== 엑셀 다운로드 ===== */
.iacc-schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

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

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

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

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

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

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

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
    .iacc-section, .iacc-amount-input, .iacc-number-input, .iacc-calculate-btn,
    .iacc-detail-card, .iacc-tab, .iacc-radio-label {
        transition: none !important;
    }
    .iacc-section:hover, .iacc-detail-card:hover, .iacc-calculate-btn:hover {
        transform: none !important;
    }
}

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

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

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

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

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

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

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

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

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

    .iacc-detail-card {
        padding: 14px 10px;
    }

    .iacc-detail-value {
        font-size: 20px;
    }

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

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

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

    .iacc-section {
        padding: 12px;
    }

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

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

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

    .iacc-detail-label {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .iacc-detail-value {
        font-size: 22px;
    }

    .iacc-breakeven-value {
        font-size: 18px;
    }
}

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

