/**
 * Military Discharge Calculator Styles
 * 전역일 계산기 전용 스타일
 *
 * @package Zipper
 */

/* 메인 레이아웃 - 2컬럼 */
.mdc-main-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

/* 입력 컬럼 */
.mdc-input-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px;
    border: 1px solid #ece7de;
    border-radius: 16px;
    background: #fff;
}

/* 결과 컬럼 */
.mdc-result-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 입력 그룹 */
.mdc-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mdc-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.mdc-input-hint {
    margin: 2px 0 0;
    font-size: 12px;
    color: #7a756d;
}

.mdc-input-group select,
.mdc-input-group input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    color: #2d2a26;
    transition: border-color 0.2s ease;
}

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

/* 군별 선택 그리드 */
.mdc-branch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.mdc-branch-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 2px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #5f5a56;
}

.mdc-branch-btn:hover {
    border-color: #d4af37;
    background: #faf8f5;
}

.mdc-branch-btn.active {
    border-color: #d4af37;
    background: #faf8f5;
    color: #2d2a26;
    font-weight: 600;
}

.mdc-branch-btn i {
    font-size: 20px;
}

.mdc-branch-btn.active i {
    color: #d4af37;
}

/* 복무 유형 선택 */
.mdc-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mdc-type-btn {
    padding: 12px 14px;
    border: 2px solid #e8e4dc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #5f5a56;
    text-align: center;
}

.mdc-type-btn:hover {
    border-color: #d4af37;
    background: #faf8f5;
}

.mdc-type-btn.active {
    border-color: #d4af37;
    background: #faf8f5;
    color: #2d2a26;
    font-weight: 600;
}

/* 복무 기간 표시 */
.mdc-duration-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f5f3f0;
    border-radius: 8px;
    font-size: 14px;
    color: #5f5a56;
}

.mdc-duration-info i {
    color: #d4af37;
}

.mdc-duration-info strong {
    color: #2d2a26;
}

/* 결과 섹션 */
.mdc-result-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    border: 1px solid #ece7de;
    border-radius: 16px;
    background: #fff;
}

/* 메인 결과 박스 */
.mdc-main-result {
    padding: 28px 24px;
    text-align: center;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f3f0 100%);
    border: 2px solid #d4af37;
    border-radius: 14px;
}

.mdc-main-result-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.15);
    color: #8a6d0a;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mdc-dday-display {
    font-size: 56px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1.2;
    margin-bottom: 8px;
}

.mdc-dday-display.completed {
    color: #28a745;
}

.mdc-discharge-date {
    font-size: 18px;
    color: #2d2a26;
    font-weight: 600;
    margin-bottom: 4px;
}

.mdc-discharge-weekday {
    display: inline-block;
    padding: 5px 12px;
    background: #fff;
    border-radius: 20px;
    font-size: 14px;
    color: #5f5a56;
}

/* 상태 안내 카드 */
.mdc-status-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #faf8f5;
}

.mdc-status-card.is-complete {
    border-color: #bde4c7;
    background: #f3fcf5;
}

.mdc-status-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e8e4dc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a6d0a;
    font-size: 18px;
}

.mdc-status-card.is-complete .mdc-status-icon {
    color: #1f8b3e;
    border-color: #bde4c7;
}

.mdc-status-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.mdc-status-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6d6660;
}

/* 진행률 섹션 */
.mdc-progress-section {
    padding: 18px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
}

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

.mdc-progress-label {
    font-size: 14px;
    color: #5f5a56;
}

.mdc-progress-percent {
    font-size: 24px;
    font-weight: 700;
    color: #d4af37;
}

.mdc-progress-bar-container {
    height: 20px;
    background: #f0ede8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.mdc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4af37 0%, #f0c84d 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
    position: relative;
}

.mdc-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.mdc-progress-dates {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7a756d;
}

/* 복무 단계 섹션 */
.mdc-rank-section {
    padding: 18px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
}

.mdc-rank-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 16px;
}

.mdc-rank-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.mdc-rank-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e8e4dc;
    z-index: 1;
}

.mdc-rank-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.mdc-rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f3f0;
    border: 3px solid #e8e4dc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #7a756d;
    transition: all 0.3s ease;
}

.mdc-rank-item.active .mdc-rank-badge {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
    transform: scale(1.1);
}

.mdc-rank-item.completed .mdc-rank-badge {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.mdc-rank-name {
    font-size: 13px;
    font-weight: 600;
    color: #5f5a56;
}

.mdc-rank-item.active .mdc-rank-name {
    color: #d4af37;
}

.mdc-rank-item.completed .mdc-rank-name {
    color: #28a745;
}

.mdc-rank-period {
    font-size: 11px;
    color: #7a756d;
}

/* 상세 정보 그리드 */
.mdc-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mdc-detail-card {
    padding: 14px 12px;
    background: #faf8f5;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    text-align: center;
}

.mdc-detail-label {
    font-size: 12px;
    color: #7a756d;
    margin-bottom: 4px;
}

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

.mdc-detail-value .unit {
    font-size: 14px;
    font-weight: 400;
    color: #5f5a56;
}

/* 액션 버튼 */
.mdc-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.mdc-actions .tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 공유 모달 */
.mdc-share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.mdc-share-modal.active {
    display: flex;
}

.mdc-share-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
}

.mdc-share-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 16px;
    text-align: center;
}

.mdc-share-preview {
    background: linear-gradient(135deg, #faf8f5 0%, #f0ece5 100%);
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 24px;
    color: #2d2a26;
    text-align: center;
    margin-bottom: 16px;
}

.mdc-share-preview .branch {
    font-size: 14px;
    color: #6a625b;
    margin-bottom: 8px;
}

.mdc-share-preview .dday {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.mdc-share-preview .date {
    font-size: 16px;
}

.mdc-share-preview .progress {
    margin-top: 16px;
    height: 8px;
    background: #e5dfd6;
    border-radius: 4px;
    overflow: hidden;
}

.mdc-share-preview .progress-fill {
    height: 100%;
    background: #d4af37;
    border-radius: 4px;
}

.mdc-share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mdc-share-buttons .tool-btn {
    flex: 1 1 calc(50% - 4px);
}

.mdc-share-buttons .tool-btn:last-child {
    flex-basis: 100%;
}

/* Responsive */
@media (max-width: 900px) {
    .mdc-main-layout {
        grid-template-columns: 320px 1fr;
        gap: 18px;
    }

    .mdc-input-col,
    .mdc-result-section {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .mdc-main-layout {
        grid-template-columns: 1fr;
    }

    .mdc-input-col {
        width: 100%;
    }

    .mdc-status-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .mdc-status-icon {
        margin: 0 auto;
    }

    .mdc-branch-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .mdc-dday-display {
        font-size: 48px;
    }

    .mdc-detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mdc-rank-timeline {
        flex-wrap: wrap;
        gap: 16px;
    }

    .mdc-rank-timeline::before {
        display: none;
    }

    .mdc-rank-item {
        width: calc(25% - 12px);
    }
}

@media (max-width: 480px) {
    .mdc-input-col,
    .mdc-result-section {
        padding: 16px 14px;
    }

    .mdc-branch-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .mdc-dday-display {
        font-size: 40px;
    }

    .mdc-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mdc-detail-grid .mdc-detail-card:last-child {
        grid-column: span 2;
    }

    .mdc-rank-item {
        width: calc(50% - 8px);
    }

    .mdc-actions {
        flex-direction: column;
    }

    .mdc-actions .tool-btn {
        width: 100%;
    }
}
