/**
 * Military Age Calculator Styles
 * 중소기업취업청년 병역나이 계산기 전용 스타일
 *
 * @package Zipper
 */

/* 2컬럼 레이아웃 */
.military-age-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.military-age-input {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.military-age-result {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 입력 카드 */
.input-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
}

.input-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2d2a26;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-card h3 i {
    color: #d4af37;
}

/* 입력 그룹 */
.input-group {
    margin-bottom: 16px;
}

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

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
    margin-bottom: 8px;
}

/* 날짜 입력 행 */
.date-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 숫자 인풋 스타일 */
.date-input {
    padding: 10px 8px;
    font-size: 15px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
    -moz-appearance: textfield;
}

.date-input::-webkit-outer-spin-button,
.date-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

.date-input::placeholder {
    color: #a09a94;
}

/* 연도 입력 - 넓게 */
.date-input.date-year {
    width: 80px;
    min-width: 80px;
}

/* 월/일 입력 - 좁게 */
.date-input.date-month,
.date-input.date-day {
    width: 55px;
    min-width: 55px;
}

/* 단위 라벨 */
.date-unit {
    font-size: 14px;
    color: #5f5a56;
    flex-shrink: 0;
}

/* 병역 종류 버튼 그리드 */
.military-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.military-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 64px;
}

.military-type-btn i {
    font-size: 18px;
    color: #8c8780;
    transition: color 0.2s;
}

.military-type-btn span {
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
    text-align: center;
    line-height: 1.3;
    transition: color 0.2s;
}

.military-type-btn:hover {
    border-color: #d4af37;
    background: #fff;
}

.military-type-btn:hover i {
    color: #d4af37;
}

.military-type-btn.active {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}

.military-type-btn.active i {
    color: #d4af37;
}

.military-type-btn.active span {
    color: #2d2a26;
    font-weight: 600;
}

/* 차감 불가 버튼 그룹 */
.military-type-warning-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e8e4dc;
}

.warning-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #d48806;
    margin-bottom: 8px;
}

.warning-label i {
    font-size: 14px;
}

.military-type-grid.warning {
    grid-template-columns: repeat(2, 1fr);
}

.military-type-btn.warning {
    background: #fafafa;
    border-color: #e8e4dc;
}

.military-type-btn.warning i {
    color: #a09a94;
}

.military-type-btn.warning span {
    color: #8c8780;
}

.military-type-btn.warning:hover {
    border-color: #d48806;
    background: #fff8e6;
}

.military-type-btn.warning:hover i {
    color: #d48806;
}

.military-type-btn.warning.active {
    background: #fff8e6;
    border-color: #d48806;
}

.military-type-btn.warning.active i {
    color: #d48806;
}

.military-type-btn.warning.active span {
    color: #5f5a56;
    font-weight: 600;
}

/* 경고 박스 */
.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #fff8e6;
    border: 1px solid #ffd666;
    border-radius: 8px;
    margin-top: 12px;
}

.warning-box i {
    color: #d48806;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-box span {
    font-size: 13px;
    color: #5f5a56;
    line-height: 1.5;
}

/* 복무기간 입력 탭 */
.period-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0 12px 0;
}

.period-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-tab:hover {
    border-color: #d4af37;
}

.period-tab.active {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}

.period-content {
    display: none;
}

.period-content.active {
    display: block;
}

/* 입력 힌트 */
.input-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8c8780;
    margin-top: 8px;
}

.input-hint i {
    color: #d4af37;
}

.input-hint a {
    color: #d4af37;
    text-decoration: none;
}

.input-hint a:hover {
    text-decoration: underline;
}

/* 직접 입력 행 */
.direct-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.direct-input {
    width: 70px;
    padding: 12px 10px;
    font-size: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    text-align: center;
}

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

.direct-label {
    font-size: 14px;
    color: #5f5a56;
    min-width: 20px;
}

/* 결과 카드 - 메인 */
.result-card.main-result {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border: 2px solid #d4af37;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

/* 결과 배지 */
.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    background: #f5f5f5;
    color: #8c8780;
}

.result-badge.eligible {
    background: #e6f7e6;
    color: #389e0d;
}

.result-badge.not-eligible {
    background: #f5f5f5;
    color: #8c8780;
}

.result-badge i {
    font-size: 16px;
}

/* 결과 요약 */
.result-summary {
    margin-bottom: 12px;
}

.summary-label {
    display: block;
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
}

.result-desc {
    font-size: 13px;
    color: #5f5a56;
    margin: 0;
    line-height: 1.5;
}

/* 결과 항목들 */
.result-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
}

.result-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #d4af37;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.item-label {
    flex: 1;
    font-size: 13px;
    color: #5f5a56;
}

.copy-btn {
    padding: 6px 10px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #fff;
    border-color: #d4af37;
}

.copy-btn i {
    color: #5f5a56;
    font-size: 14px;
}

.item-value {
    font-size: 20px;
    font-weight: 700;
    color: #2d2a26;
}

/* 연령 비교 차트 */
.age-chart-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
}

.age-chart-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.age-chart-section h4 i {
    color: #d4af37;
}

.age-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-label {
    width: 90px;
    font-size: 12px;
    color: #5f5a56;
    flex-shrink: 0;
}

.chart-bar-container {
    flex: 1;
    height: 24px;
    background: #f5f5f5;
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

.chart-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.chart-bar.job-age {
    background: linear-gradient(90deg, #d4af37, #f0d78c);
}

.chart-bar.final-age {
    background: linear-gradient(90deg, #389e0d, #73d13d);
}

.chart-bar.baseline-bar {
    width: 87.5%;
    background: #e8e4dc;
}

.chart-baseline {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: #ff4d4f;
}

.chart-value {
    width: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #2d2a26;
    text-align: right;
    flex-shrink: 0;
}

.chart-note {
    font-size: 12px;
    color: #8c8780;
    margin: 12px 0 0 0;
    text-align: center;
}

/* 안내 섹션 */
.info-section {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
}

.info-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section h4 i {
    color: #d4af37;
}

.info-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    font-size: 13px;
    color: #5f5a56;
    padding: 8px 0;
    border-bottom: 1px solid #e8e4dc;
    line-height: 1.5;
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-list li strong {
    color: #2d2a26;
}

/* 정보 테이블 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.info-table th,
.info-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e8e4dc;
}

.info-table th {
    background: #faf9f7;
    font-weight: 600;
    color: #2d2a26;
}

.info-table td {
    color: #5f5a56;
}

.info-table td strong {
    color: #2d2a26;
}

/* 반응형: 1024px 이하 */
@media (max-width: 1024px) {
    .military-age-layout {
        grid-template-columns: 1fr;
    }

    .military-age-result {
        position: static;
    }
}

/* 반응형: 768px 이하 */
@media (max-width: 768px) {
    .date-row {
        flex-wrap: wrap;
    }

    .date-input.date-year {
        width: 70px;
        min-width: 70px;
    }

    .date-input.date-month,
    .date-input.date-day {
        width: 48px;
        min-width: 48px;
    }

    .date-unit {
        font-size: 13px;
    }

    .direct-input-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .direct-input {
        width: 60px;
    }

    .period-tabs {
        flex-direction: column;
    }

    .chart-label {
        width: 70px;
        font-size: 11px;
    }

    .chart-value {
        width: 40px;
        font-size: 12px;
    }

    /* 병역 버튼 반응형 */
    .military-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .military-type-btn {
        padding: 10px 6px;
        min-height: 56px;
    }

    .military-type-btn i {
        font-size: 16px;
    }

    .military-type-btn span {
        font-size: 11px;
    }
}

/* 반응형: 480px 이하 */
@media (max-width: 480px) {
    .input-card {
        padding: 16px;
    }

    .date-input {
        padding: 8px 6px;
        font-size: 14px;
    }

    .date-input.date-year {
        width: 65px;
        min-width: 65px;
    }

    .date-input.date-month,
    .date-input.date-day {
        width: 42px;
        min-width: 42px;
    }

    .date-unit {
        font-size: 12px;
    }

    .result-card.main-result {
        padding: 20px 16px;
    }

    .summary-value {
        font-size: 26px;
    }

    .item-value {
        font-size: 18px;
    }

    .info-table {
        font-size: 12px;
    }

    .info-table th,
    .info-table td {
        padding: 8px;
    }

    /* 병역 버튼 모바일 */
    .military-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .military-type-btn {
        padding: 10px 4px;
        min-height: 52px;
    }

    .military-type-btn i {
        font-size: 15px;
    }

    .military-type-btn span {
        font-size: 10px;
    }

    .military-type-grid.warning {
        grid-template-columns: 1fr 1fr;
    }
}
