/* ============================================
   ElevateCV AI — AI Skill Gap Analyzer CSS
   Design System: Dark SaaS Glassmorphism
   ============================================ */

/* ── Backdrop Overlay ──────────────────────── */
.sg-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 20, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}

.sg-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Modal Dialog Container ────────────────── */
.sg-modal {
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
    width: 880px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    transform: scale(0.95) translateY(12px);
    transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.sg-modal-overlay.is-open .sg-modal {
    transform: scale(1) translateY(0);
}

/* ── Modal Header ──────────────────────────── */
.sg-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sg-modal__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sg-modal__title-wrap svg {
    color: #ec4899;
}

.sg-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.sg-modal__subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0;
}

.sg-modal__close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 150ms ease;
}

.sg-modal__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* ── Modal Body ────────────────────────────── */
.sg-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ── Target Role Presets Grid ──────────────── */
.sg-role-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.sg-role-chip {
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms ease;
}

.sg-role-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sg-role-chip.is-active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
    border-color: #ec4899;
    color: #f472b6;
}

/* ── Readiness Gauge & Header ──────────────── */
.sg-score-header {
    background: linear-gradient(145deg, rgba(236, 72, 153, 0.08), rgba(168, 85, 247, 0.08));
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.sg-gauge-wrap {
    position: relative;
    width: 95px;
    height: 95px;
    flex-shrink: 0;
}

.sg-gauge-svg {
    transform: rotate(-90deg);
    width: 95px;
    height: 95px;
}

.sg-gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.sg-gauge-fill {
    fill: none;
    stroke: url(#sgGradient);
    stroke-width: 8;
    stroke-dasharray: 263.8;
    stroke-dashoffset: 263.8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.sg-gauge-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #f472b6;
}

.sg-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    flex: 1;
}

.sg-metric-card {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
}

.sg-metric-val {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.sg-metric-label {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    font-weight: 600;
}

/* ── Skills Chips Section ──────────────────── */
.sg-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.sg-skills-box {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
}

.sg-skills-box__title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sg-skills-box__title--current  { color: #34d399; }
.sg-skills-box__title--missing  { color: #fbbf24; }
.sg-skills-box__title--priority { color: #c084fc; }

.sg-kw-chip--current {
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #6ee7b7;
}

.sg-kw-chip--missing {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.sg-kw-chip--priority {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
}

/* ── 4-Week Timeline Roadmap ───────────────── */
.sg-roadmap-section {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px;
}

.sg-roadmap-title {
    font-size: 13px;
    font-weight: 700;
    color: #f472b6;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sg-timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.sg-timeline-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
}

.sg-timeline-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sg-week-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(236, 72, 153, 0.18);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #f472b6;
}

.sg-timeline-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.sg-timeline-card__topics {
    margin: 0;
    padding-left: 16px;
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.5;
}

/* ── Project & Certification Cards ─────────── */
.sg-extras-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sg-extra-box {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
}

.sg-extra-box__title {
    font-size: 12px;
    font-weight: 700;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sg-extra-list {
    margin: 0;
    padding-left: 16px;
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* ── Modal Footer Actions ──────────────────── */
.sg-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 26px;
    background: #111827;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    gap: 12px;
    flex-wrap: wrap;
}

.sg-footer__left, .sg-footer__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn--sg-primary {
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(236, 72, 153, 0.35);
    transition: all 150ms ease;
}

.btn--sg-primary:hover {
    box-shadow: 0 4px 18px rgba(236, 72, 153, 0.5);
    transform: translateY(-1px);
}

.btn--sg-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 150ms ease;
}

.btn--sg-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ── Shimmer Skeleton ──────────────────────── */
.sg-skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 37%, rgba(255, 255, 255, 0.04) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 8px;
}

.sg-skeleton--card { height: 90px; margin-bottom: 14px; }

/* ── Responsive adjustments ────────────────── */
@media (max-width: 768px) {
    .sg-modal {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .sg-skills-grid, .sg-timeline, .sg-extras-grid {
        grid-template-columns: 1fr;
    }

    .sg-score-header {
        flex-direction: column;
        text-align: center;
    }

    .sg-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .sg-footer__left, .sg-footer__right {
        width: 100%;
        justify-content: space-between;
    }
}
