/**
 * Work Tenure Calculator Styles (Redesigned)
 * 근속기간 계산기 - 리디자인 버전
 *
 * 리서치 기반 UX 최적화:
 * - 결과 요약 최상단 배치
 * - 카드 기반 경력 목록
 * - 모바일 우선 반응형
 * - 시각적 계층 구조 강화
 *
 * @package Zipper
 */

/* ========================================
   Hero Summary (최상단 결과 요약)
   ======================================== */

.wtc-hero-summary {
    background: linear-gradient(135deg, #faf9f7 0%, #f5f3ef 100%);
    border: 1px solid #e8e4dc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wtc-hero-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
}

.wtc-hero-main {
    position: relative;
    margin-bottom: 20px;
}

.wtc-hero-label {
    font-size: 13px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.wtc-hero-value {
    font-size: 36px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.2;
}

.wtc-hero-value .num {
    color: #d4af37;
    font-size: 42px;
}

.wtc-hero-value .unit {
    font-size: 18px;
    font-weight: 500;
    color: #5f5a56;
    margin: 0 4px 0 2px;
}

.wtc-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #e8e4dc;
    border-bottom: 1px solid #e8e4dc;
    margin-bottom: 20px;
    position: relative;
}

.wtc-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wtc-hero-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #2d2a26;
}

.wtc-hero-stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wtc-hero-stat-divider {
    width: 1px;
    height: 32px;
    background: #e0dcd6;
}

.wtc-btn-resume-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #f0c850 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.wtc-btn-resume-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.wtc-btn-resume-copy i {
    font-size: 18px;
}

/* ========================================
   Input Card (컴팩트 입력 폼)
   ======================================== */

.wtc-input-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.wtc-input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.wtc-input-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wtc-input-title i {
    color: #d4af37;
}

.wtc-input-hint {
    font-size: 12px;
    color: #888;
}

.wtc-input-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wtc-input-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.wtc-input-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wtc-input-field label {
    font-size: 12px;
    font-weight: 500;
    color: #5f5a56;
}

.wtc-input-field label .req {
    color: #e53935;
}

.wtc-input-field input[type="text"],
.wtc-input-field input[type="date"] {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e0dcd6;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: all 0.2s;
    min-width: 0;
}

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

.wtc-input-field input::placeholder {
    color: #aaa;
}

.wtc-input-company {
    flex: 2;
    min-width: 150px;
}

.wtc-input-position {
    flex: 1.5;
    min-width: 120px;
}

.wtc-input-date {
    flex: 1;
    min-width: 130px;
}

.wtc-input-current {
    flex-shrink: 0;
    justify-content: flex-end;
    padding-bottom: 2px;
}

/* Custom Checkbox */
.wtc-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.wtc-checkbox input {
    display: none;
}

.wtc-checkbox-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #d0ccc6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wtc-checkbox-mark::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
    opacity: 0;
    transition: opacity 0.15s;
}

.wtc-checkbox input:checked + .wtc-checkbox-mark {
    background: #d4af37;
    border-color: #d4af37;
}

.wtc-checkbox input:checked + .wtc-checkbox-mark::after {
    opacity: 1;
}

.wtc-checkbox-text {
    font-size: 13px;
    color: #5f5a56;
    white-space: nowrap;
}

.wtc-input-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.wtc-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #b8960b 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.wtc-btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ========================================
   Careers Section (경력 카드 목록)
   ======================================== */

.wtc-careers-section {
    margin-bottom: 20px;
}

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

.wtc-careers-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wtc-careers-title i {
    color: #d4af37;
}

.wtc-careers-count {
    font-size: 12px;
    color: #666;
    background: #f0eeeb;
    padding: 4px 12px;
    border-radius: 20px;
}

.wtc-careers-empty {
    background: #faf9f7;
    border: 2px dashed #e0dcd6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
}

.wtc-careers-empty-icon {
    font-size: 40px;
    color: #d0ccc6;
    margin-bottom: 12px;
}

.wtc-careers-empty-text {
    font-size: 15px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

.wtc-careers-empty-hint {
    font-size: 13px;
    color: #999;
}

.wtc-careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* Career Card */
.wtc-career-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.wtc-career-card:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.wtc-career-card.is-current {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.04) 0%, rgba(184, 134, 11, 0.04) 100%);
}

.wtc-career-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.wtc-career-card-color {
    width: 4px;
    height: 100%;
    min-height: 40px;
    border-radius: 2px;
    flex-shrink: 0;
}

.wtc-career-card-info {
    flex: 1;
    min-width: 0;
}

.wtc-career-card-company {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wtc-career-card-badge {
    font-size: 10px;
    font-weight: 600;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.15);
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wtc-career-card-position {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.wtc-career-card-period {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wtc-career-card-period i {
    font-size: 11px;
    color: #aaa;
}

.wtc-career-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0eeeb;
}

.wtc-career-card-duration {
    font-size: 14px;
    font-weight: 600;
    color: #d4af37;
}

.wtc-career-card-actions {
    display: flex;
    gap: 6px;
}

.wtc-card-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #888;
    background: #f5f4f2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.wtc-card-btn:hover {
    background: #e8e4dc;
    color: #2d2a26;
}

.wtc-card-btn.delete:hover {
    background: #ffeaea;
    color: #e53935;
}

/* ========================================
   Timeline Section
   ======================================== */

.wtc-timeline-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.wtc-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.wtc-timeline-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wtc-timeline-title i {
    color: #d4af37;
}

.wtc-timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wtc-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666;
}

.wtc-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.wtc-legend-color.gap {
    background: repeating-linear-gradient(
        45deg,
        #e8e4dc,
        #e8e4dc 2px,
        #fff 2px,
        #fff 4px
    );
    border: 1px solid #ddd;
}

.wtc-timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 120px;
    color: #aaa;
    font-size: 13px;
}

.wtc-timeline-empty i {
    font-size: 28px;
    opacity: 0.5;
}

.wtc-timeline-canvas {
    width: 100%;
    min-height: 150px;
    border-radius: 8px;
    background: #faf9f7;
    display: none;
}

/* ========================================
   Actions Bar
   ======================================== */

.wtc-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    background: #f8f7f5;
    border-radius: 12px;
}

.wtc-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background: #fff;
    border: 1px solid #e0dcd6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.wtc-btn-action:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.wtc-btn-action i {
    font-size: 14px;
}

.wtc-btn-action.wtc-btn-danger:hover {
    border-color: #e53935;
    color: #e53935;
    background: #fff5f5;
}

/* ========================================
   Modal (모달)
   ======================================== */

.wtc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.wtc-modal-overlay.is-visible {
    display: flex;
}

.wtc-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.wtc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0eeeb;
}

.wtc-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wtc-modal-title i {
    color: #d4af37;
}

.wtc-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
}

.wtc-modal-close:hover {
    background: #f5f4f2;
    color: #2d2a26;
}

.wtc-modal-body {
    padding: 20px;
}

.wtc-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wtc-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wtc-modal-field label {
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
}

.wtc-modal-field label .req {
    color: #e53935;
}

.wtc-modal-field input {
    padding: 11px 14px;
    font-size: 14px;
    border: 1px solid #e0dcd6;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: all 0.2s;
}

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

.wtc-modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wtc-modal-checkbox {
    margin-top: 4px;
}

.wtc-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #f0eeeb;
}

.wtc-modal-footer button {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.wtc-btn-cancel {
    color: #666;
    background: #f5f4f2;
    border: none;
}

.wtc-btn-cancel:hover {
    background: #e8e4dc;
}

.wtc-btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #b8960b 100%);
    border: none;
}

.wtc-btn-save:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ========================================
   Timeline Tooltip
   ======================================== */

.wtc-timeline-tooltip {
    display: none;
    position: fixed;
    background: #2d2a26;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 10001;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    max-width: 260px;
    line-height: 1.5;
}

/* ========================================
   Color Palette
   ======================================== */

.wtc-color-1 { background: #4A90D9; }
.wtc-color-2 { background: #50C878; }
.wtc-color-3 { background: #FF7F50; }
.wtc-color-4 { background: #9B59B6; }
.wtc-color-5 { background: #F39C12; }
.wtc-color-6 { background: #1ABC9C; }
.wtc-color-7 { background: #E74C3C; }
.wtc-color-8 { background: #3498DB; }

/* ========================================
   Responsive (모바일 우선)
   ======================================== */

@media (max-width: 768px) {
    .wtc-hero-summary {
        padding: 20px 16px;
    }

    .wtc-hero-value {
        font-size: 28px;
    }

    .wtc-hero-value .num {
        font-size: 34px;
    }

    .wtc-hero-stats {
        gap: 12px;
    }

    .wtc-hero-stat-value {
        font-size: 18px;
    }

    .wtc-input-row {
        flex-direction: column;
        gap: 12px;
    }

    .wtc-input-company,
    .wtc-input-position,
    .wtc-input-date,
    .wtc-input-current {
        width: 100%;
        flex: none;
    }

    .wtc-input-actions {
        justify-content: stretch;
    }

    .wtc-btn-add {
        width: 100%;
        justify-content: center;
    }

    .wtc-careers-grid {
        grid-template-columns: 1fr;
    }

    .wtc-actions-bar {
        flex-direction: column;
    }

    .wtc-btn-action {
        width: 100%;
        justify-content: center;
    }

    .wtc-modal-row {
        grid-template-columns: 1fr;
    }

    .wtc-timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .wtc-hero-value {
        font-size: 24px;
    }

    .wtc-hero-value .num {
        font-size: 28px;
    }

    .wtc-hero-value .unit {
        font-size: 14px;
    }

    .wtc-hero-stats {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .wtc-hero-stat-divider {
        display: none;
    }

    .wtc-btn-resume-copy {
        width: 100%;
        padding: 12px 20px;
    }
}
