/* ============================================================
   AI POPUPS — light theme
   Replaces ai-popup-premium.css (matte-black glass). Same selectors and
   layout; colours now match the builder: white cards, green-grey neutrals,
   one green accent. Scoped to #skillsPopup, #jobDescPopup and
   #userMessagePopup so it never affects other popups.
   Loads late in the cascade to win over base + responsive CSS.
   ============================================================ */

/* ── Overlay ──────────────────────────────────────────────── */
#skillsPopup .skills-popup-overlay,
#jobDescPopup .skills-popup-overlay,
#userMessagePopup .simple-message-overlay {
    background: rgba(15,28,53, 0.42) !important;
    backdrop-filter: blur(6px) saturate(110%);
    -webkit-backdrop-filter: blur(6px) saturate(110%);
}

/* ── Card ─────────────────────────────────────────────────── */
#skillsPopup .skills-popup-card,
#jobDescPopup .skills-popup-card {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #E4E7EC !important;
    border-radius: 18px !important;
    box-shadow:
        0 1px 2px rgba(15,28,53,0.06),
        0 28px 70px -18px rgba(15,28,53,0.35) !important;
    color: #475467 !important;
    font-family: 'Geist', 'Inter', system-ui, -apple-system, sans-serif !important;
}
#skillsPopup .skills-popup-card h3,
#jobDescPopup .skills-popup-card h3 { color: #0F1C35 !important; }

/* ── Close button ─────────────────────────────────────────── */
#skillsPopup .close-popup-btn,
#jobDescPopup .close-popup-btn {
    background: #F4F6F9 !important;
    border: 1px solid #E4E7EC !important;
}
#skillsPopup .close-popup-btn::before,
#jobDescPopup .close-popup-btn::before { color: #667085 !important; }
#skillsPopup .close-popup-btn:hover,
#jobDescPopup .close-popup-btn:hover { background: #FEF3F2 !important; border-color: #FECDCA !important; }
#skillsPopup .close-popup-btn:hover::before,
#jobDescPopup .close-popup-btn:hover::before { color: #B42318 !important; }

/* ── Tabs ─────────────────────────────────────────────────── */
#skillsPopup .popup-tabs,
#jobDescPopup .popup-tabs {
    background: transparent !important;
    border-bottom: 1px solid #E4E7EC !important;
}
#skillsPopup .tab-btn,
#jobDescPopup .tab-btn { color: #667085 !important; }
#skillsPopup .tab-btn:hover,
#jobDescPopup .tab-btn:hover { color: #0F1C35 !important; }
#skillsPopup .tab-btn.active,
#jobDescPopup .tab-btn.active {
    color: #0C8059 !important;
    border-bottom-color: #12A26D !important;
}

/* ── Input-phase header ───────────────────────────────────── */
#skillsPopup .aip-head {
    display: block;
    padding: 14px var(--ai-gutter) 2px var(--ai-gutter);
}
#skillsPopup .aip-head-icon { display: none !important; }
#skillsPopup .aip-head-text { display: block; }
#skillsPopup .aip-sub { margin-top: 3px; }
#skillsPopup .aip-title {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1.16rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    color: #0F1C35 !important;
}
#skillsPopup .aip-sub { color: #667085; font-size: 13px; font-weight: 400; }

/* ── Labels ───────────────────────────────────────────────── */
#skillsPopup #generateTab > label,
#skillsPopup #generateTab label.input-label,
#skillsPopup .input-label,
#jobDescPopup .input-label,
#jobDescPopup label.input-label {
    color: #475467 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}
#jobDescPopup label { color: #475467 !important; }

#skillsPopup .aip-desc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px var(--ai-gutter) 6px var(--ai-gutter);
}
#skillsPopup .aip-desc-row .input-label { margin: 0 !important; }
#skillsPopup .aip-opt { color: #98A2B3; font-weight: 400; text-transform: none; letter-spacing: 0; }
#skillsPopup .aip-count { font-size: 11.5px; color: #98A2B3; letter-spacing: 0; font-variant-numeric: tabular-nums; }
#skillsPopup .aip-note { color: #667085; font-size: 12.5px; text-align: center; margin: 12px var(--ai-gutter) 20px var(--ai-gutter); }

/* ── Inputs & textareas ───────────────────────────────────── */
#skillsPopup #generateTab #popupJobTitle,
#skillsPopup #generateTab input.popup-input,
#skillsPopup #generateTab #popupJobDescription,
#skillsPopup #generateTab textarea.popup-textarea,
#jobDescPopup .popup-textarea,
#jobDescPopup #popupFullJobDesc,
#jobDescPopup input[type="text"] {
    background: #ffffff !important;
    border: 1px solid #D0D5DD !important;
    border-radius: 10px !important;
    color: #0F1C35 !important;
    box-shadow: 0 1px 2px rgba(15,28,53,0.04) !important;
}
#skillsPopup #generateTab #popupJobTitle::placeholder,
#skillsPopup #generateTab input.popup-input::placeholder,
#skillsPopup #generateTab #popupJobDescription::placeholder,
#skillsPopup #generateTab textarea.popup-textarea::placeholder,
#jobDescPopup .popup-textarea::placeholder,
#jobDescPopup #popupFullJobDesc::placeholder { color: #98A2B3 !important; }
#skillsPopup #generateTab #popupJobTitle:focus,
#skillsPopup #generateTab input.popup-input:focus,
#skillsPopup #generateTab #popupJobDescription:focus,
#skillsPopup #generateTab textarea.popup-textarea:focus,
#jobDescPopup .popup-textarea:focus,
#jobDescPopup #popupFullJobDesc:focus,
#jobDescPopup input[type="text"]:focus {
    background: #ffffff !important;
    border-color: #12A26D !important;
    box-shadow: 0 0 0 4px rgba(18,162,109,0.14) !important;
    outline: none !important;
}

/* ── Scroll areas ─────────────────────────────────────────── */
#skillsPopup #aiResults,
#jobDescPopup .results-section,
#jobDescPopup #jobDescResults,
#jobDescPopup .library-container { scrollbar-width: thin; scrollbar-color: #D0D5DD transparent; }
#skillsPopup #aiResults::-webkit-scrollbar,
#jobDescPopup .results-section::-webkit-scrollbar,
#jobDescPopup #jobDescResults::-webkit-scrollbar,
#jobDescPopup .library-container::-webkit-scrollbar { width: 8px; }
#skillsPopup #aiResults::-webkit-scrollbar-thumb,
#jobDescPopup .results-section::-webkit-scrollbar-thumb,
#jobDescPopup #jobDescResults::-webkit-scrollbar-thumb,
#jobDescPopup .library-container::-webkit-scrollbar-thumb { background: #D0D5DD; border-radius: 8px; }
#skillsPopup #aiResults::-webkit-scrollbar-track { background: transparent; }

/* ── Section labels for the stacked results ───────────────── */
#skillsPopup .ai-stack-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #0C8059;
    margin: 2px 0 13px 0;
    display: flex;
    align-items: center;
    gap: 9px;
}
#skillsPopup .ai-stack-label::before {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: #12A26D;
}
#skillsPopup .ai-stack-divider {
    height: 1px;
    background: #E4E7EC;
    margin: 24px 0 20px 0;
}
#skillsPopup .skills-hint { font-size: 12.5px; color: #667085; margin-bottom: 13px; font-weight: 400; }

/* ── Streaming progress ───────────────────────────────────── */
#skillsPopup .stream-progress-wrapper,
#jobDescPopup .stream-progress-wrapper { border-bottom-color: #E4E7EC !important; }
#skillsPopup .stream-progress-bar-track,
#jobDescPopup .stream-progress-bar-track { background: #E9EDF3 !important; }
#skillsPopup .stream-progress-label,
#jobDescPopup .stream-progress-label { color: #667085 !important; }
#skillsPopup .stream-progress-label.stream-progress-done,
#jobDescPopup .stream-progress-label.stream-progress-done { color: #0C8059 !important; }
#skillsPopup .stream-progress-spinner,
#jobDescPopup .stream-progress-spinner { border-color: #D3EFE1 !important; border-top-color: #12A26D !important; }

/* Skeleton shimmer */
#skillsPopup .summary-card.stream-skeleton,
#jobDescPopup .library-item.stream-skeleton {
    background: #F9FAFB !important;
    border-color: #E4E7EC !important;
    opacity: 1 !important;
}
#skillsPopup .summary-card.stream-skeleton .skeleton-line,
#jobDescPopup .skeleton-line {
    background: linear-gradient(90deg, #EEF1F5 25%, #E2E8E3 50%, #EEF1F5 75%) !important;
    background-size: 200% 100% !important;
    opacity: 1;
}
#jobDescPopup .skeleton-line {
    display: block;
    height: 13px;
    border-radius: 6px;
    margin-bottom: 9px;
    animation: streamShimmer 1.8s ease-in-out infinite;
}

/* the loading lines inside the empty cards: visible, and moving (they read as blank boxes before) */
#skillsPopup .summary-card.stream-skeleton .skeleton-line {
    display: block; height: 12px; border-radius: 6px; margin-bottom: 10px;
    background: linear-gradient(90deg, #E3E8EE 25%, #F5F7FA 50%, #E3E8EE 75%) !important;
    background-size: 200% 100% !important;
    animation: streamShimmer 1.4s ease-in-out infinite !important;
}
#skillsPopup .summary-card.stream-skeleton .skeleton-line:last-child { margin-bottom: 0; }
/* the text box of an empty card has no text yet, so it had no width, and the lines (a share of it) had none either */
#skillsPopup .summary-card.stream-skeleton > p { flex: 1 1 auto; width: 100%; min-width: 0; margin: 0; }
@media (prefers-reduced-motion: reduce) { #skillsPopup .summary-card.stream-skeleton .skeleton-line { animation: none !important; } }
/* a spinning circle in each empty card, so every box shows it is being written */
#skillsPopup .summary-card.stream-skeleton { display: flex !important; align-items: center; gap: 16px; }
#skillsPopup .summary-card.stream-skeleton::before {
    content: ""; flex: 0 0 22px; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%;
    border: 2.5px solid #D3EFE1; border-top-color: #12A26D; animation: aiSpin .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { #skillsPopup .summary-card.stream-skeleton::before { animation-duration: 2.4s; } }
/* "Your skills are ready · See skills →" and the dot on the Skills tab */
#skillsPopup .stream-progress-label .sp-skills {
    margin-left: 6px; padding: 2px 10px; border: 1px solid #C6F0D8; border-radius: 999px; background: #ECFDF3;
    color: #067647; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
#skillsPopup .stream-progress-label .sp-skills:hover { background: #D1FADF; }
/* the Skills tab, until all the skills are in */
#skillsPopup .ai-seg-btn:disabled { opacity: .45; cursor: not-allowed; }
#skillsPopup .ai-seg-btn:disabled:hover { background: transparent; }
#skillsPopup .ai-seg-btn.has-new::after {
    content: ""; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #12A26D;
    box-shadow: 0 0 0 3px rgba(18,162,109,.18);
}

/* Typing card */
#skillsPopup .summary-card.stream-typing,
#jobDescPopup .library-item.stream-typing {
    border-color: #A6DCC1 !important;
    background: #EDF7F1 !important;
    box-shadow: 0 0 0 3px rgba(18,162,109,0.08) !important;
}
#skillsPopup .summary-card.stream-typing p { color: #18273A !important; }
#skillsPopup .stream-cursor,
#jobDescPopup .stream-cursor { background: #12A26D !important; }

/* ── Summary cards ────────────────────────────────────────── */
#skillsPopup .summary-card {
    background: #ffffff !important;
    border: 1px solid #E4E7EC !important;
}
#skillsPopup .summary-card:hover {
    background: #F9FAFB !important;
    border-color: #A6DCC1 !important;
    box-shadow: 0 6px 18px -8px rgba(15,28,53,0.18) !important;
}
#skillsPopup .summary-card.selected {
    background: #EDF7F1 !important;
    border-color: #12A26D !important;
    box-shadow: 0 0 0 1px #12A26D !important;
}
#skillsPopup .summary-card p,
#skillsPopup .summary-card.stream-complete p { color: #18273A !important; }

/* ── Skills chips ─────────────────────────────────────────── */
#skillsPopup .skill-item {
    background: #ffffff !important;
    border: 1px solid #E4E7EC !important;
}
#skillsPopup .skill-item:hover {
    background: #F9FAFB !important;
    border-color: #A6DCC1 !important;
    box-shadow: 0 3px 10px -6px rgba(15,28,53,0.2) !important;
}
#skillsPopup .skill-item.selected {
    background: #EDF7F1 !important;
    border-color: #12A26D !important;
    box-shadow: 0 0 0 1px #12A26D !important;
}
#skillsPopup .skill-check {
    background: #ffffff !important;
    border: 2px solid #D0D5DD !important;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
#skillsPopup .skill-item.selected .skill-check { background: #12A26D !important; border-color: #12A26D !important; }
#skillsPopup .skill-text { color: #18273A !important; }
#skillsPopup .skill-item.selected .skill-text { color: #05603A !important; }

/* ── Stacked apply row + buttons ──────────────────────────── */
#skillsPopup .ai-apply-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #E4E7EC;
    flex-wrap: wrap;
}
#skillsPopup .ai-apply-cta {
    display: flex;
    gap: 9px;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
#skillsPopup .ai-apply-ghost {
    background: transparent;
    border: 1px solid #D0D5DD;
    color: #475467;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 13px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
#skillsPopup .ai-apply-ghost:hover {
    color: #0F1C35;
    border-color: #98A2B3;
    background: #F4F6F9;
}
#skillsPopup .apply-btn-secondary {
    background: #ffffff;
    border: 1px solid #D0D5DD;
    color: #18273A;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
#skillsPopup .apply-btn-secondary:hover:not(:disabled) {
    background: #EDF7F1;
    border-color: #A6DCC1;
    color: #05603A;
}
#skillsPopup .apply-btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }
#skillsPopup .apply-btn-primary {
    background: #0F1C35;
    color: #fff;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(15,28,53,0.08), 0 6px 16px -8px rgba(15,28,53,0.45);
    transition: all 0.15s;
}
#skillsPopup .apply-btn-primary:hover:not(:disabled) {
    background: #1C2B47;
    box-shadow: 0 1px 2px rgba(15,28,53,0.08), 0 8px 20px -8px rgba(15,28,53,0.5);
}
#skillsPopup .apply-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Footer / secondary buttons ───────────────────────────── */
#skillsPopup .action-buttons,
#jobDescPopup .action-buttons {
    background: #F9FAFB !important;
    border-top: 1px solid #E4E7EC !important;
}
#skillsPopup .btn-cancel,
#skillsPopup .secondary-btn,
#jobDescPopup .btn-cancel {
    background: #ffffff !important;
    border: 1px solid #D0D5DD !important;
    color: #18273A !important;
}
#skillsPopup .btn-cancel:hover,
#skillsPopup .secondary-btn:hover,
#jobDescPopup .btn-cancel:hover {
    background: #F4F6F9 !important;
    border-color: #98A2B3 !important;
    color: #0F1C35 !important;
}

/* Main "Generate" buttons: solid green, no gradient */
#skillsPopup #generateSummarySkillsBtn,
#jobDescPopup #generateJobDescBtn {
    background: #0F1C35 !important;
    color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(15,28,53,0.08), 0 8px 20px -10px rgba(15,28,53,0.45) !important;
}
#skillsPopup #generateSummarySkillsBtn:hover:not(:disabled),
#jobDescPopup #generateJobDescBtn:hover:not(:disabled) { background: #1C2B47 !important; }
#skillsPopup #generateSummarySkillsBtn:disabled,
#jobDescPopup #generateJobDescBtn:disabled {
    background: #E9EDF3 !important;
    color: #98A2B3 !important;
    box-shadow: none !important;
}

/* ── Library tab text + empty/error states ────────────────── */
#skillsPopup #libraryTab { color: #475467 !important; }
#skillsPopup #libraryTab h3,
#skillsPopup .section-title,
#jobDescPopup .section-title,
#jobDescPopup #libraryTab h3 { color: #0F1C35 !important; }
#skillsPopup .library-step h4,
#skillsPopup [id^="libraryStep"] h4,
#skillsPopup .step-label { color: #667085 !important; }
#skillsPopup .section-header,
#jobDescPopup .section-header { border-bottom-color: #E4E7EC !important; }
#skillsPopup .empty-title,
#jobDescPopup .empty-title { color: #0F1C35 !important; }
#skillsPopup .empty-description,
#jobDescPopup .empty-description { color: #667085 !important; }
#skillsPopup .error-message,
#jobDescPopup .error-message { color: #B42318 !important; }

/* ── Segmented toggle (Summary | Skills) ──────────────────── */
#skillsPopup .ai-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #F4F6F9;
    border: 1px solid #E4E7EC;
    border-radius: 13px;
    margin: 2px 0 20px 0;
}
#skillsPopup .ai-seg-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #667085;
    border-radius: 10px;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
#skillsPopup .ai-seg-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
#skillsPopup .ai-seg-btn:hover { color: #0F1C35; }
#skillsPopup .ai-seg-btn.active {
    color: #0F1C35;
    font-weight: 600;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15,28,53,0.08), 0 0 0 1px #E4E7EC;
}
#skillsPopup .ai-seg-btn.active svg { color: #12A26D; }
#skillsPopup #segSkillsCount { color: #0C8059; font-weight: 700; font-size: 12.5px; }

#skillsPopup .skills-loading {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #667085;
    font-size: 13px;
    font-weight: 400;
    padding: 14px 2px;
}

/* ── Persistent footer action row (holds the apply buttons) ─ */
#skillsPopup .action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
#skillsPopup .action-buttons button { flex: 0 0 auto !important; }
#skillsPopup .action-buttons > .ai-apply-cta { margin-left: auto; }

/* ============================================================
   JOB DESCRIPTION GENERATOR popup (#jobDescPopup) — extras
   This popup carries inline styles, so overrides use !important.
   ============================================================ */
#jobDescPopup .popup-subtitle,
#jobDescPopup #currentJobTitleDisplay,
#jobDescPopup #currentJobTitleDisplay * { color: #667085 !important; }
#jobDescPopup #currentJobTitleDisplay strong,
#jobDescPopup #currentJobTitleDisplay b { color: #0F1C35 !important; }

/* ============================================================
   Shared library / bullet cards for BOTH popups
   ============================================================ */
#skillsPopup .library-item,
#jobDescPopup .library-item {
    background: #ffffff !important;
    border: 1px solid #E4E7EC !important;
}
#skillsPopup .library-item:hover,
#jobDescPopup .library-item:hover {
    background: #F9FAFB !important;
    border-color: #A6DCC1 !important;
    box-shadow: 0 4px 12px -6px rgba(15,28,53,0.18) !important;
}
#skillsPopup .library-item.selected,
#jobDescPopup .library-item.selected {
    background: #EDF7F1 !important;
    border-color: #12A26D !important;
    box-shadow: 0 0 0 1px #12A26D !important;
}
#skillsPopup .item-content,
#jobDescPopup .item-content { color: #18273A !important; }
#skillsPopup .item-meta,
#jobDescPopup .item-meta { color: #667085 !important; }
#skillsPopup .usage-count,
#jobDescPopup .usage-count {
    background: #EFF4FF !important;
    color: #1D4ED8 !important;
}
#skillsPopup .section-count,
#jobDescPopup .section-count {
    background: #EDF7F1 !important;
    color: #05603A !important;
}

/* ============================================================
   Simple alert dialog (#userMessagePopup — "Attention Required")
   ============================================================ */
#userMessagePopup .simple-message-popup {
    background: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #E4E7EC !important;
    border-radius: 18px !important;
    box-shadow:
        0 1px 2px rgba(15,28,53,0.06),
        0 28px 70px -18px rgba(15,28,53,0.35) !important;
    font-family: 'Geist', 'Inter', system-ui, -apple-system, sans-serif !important;
}
#userMessagePopup .simple-message-header {
    background: transparent !important;
    color: #0F1C35 !important;
    border-bottom: 1px solid #E4E7EC;
    padding: 22px 22px 18px !important;
}
#userMessagePopup .simple-message-header h4 { color: #0F1C35 !important; letter-spacing: -0.01em; font-weight: 600 !important; }
#userMessagePopup .simple-message-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFAEB;
    border: 1px solid #FEDF89;
    font-size: 17px !important;
    line-height: 1;
}
#userMessagePopup .simple-message-body { padding: 20px 24px 8px !important; }
#userMessagePopup .simple-message-body p { color: #475467 !important; }
#userMessagePopup .simple-ok-btn {
    background: #0F1C35 !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(15,28,53,0.08), 0 8px 20px -10px rgba(15,28,53,0.45) !important;
}
#userMessagePopup .simple-ok-btn:hover {
    background: #1C2B47 !important;
}

/* ── Key terms check (before writing) ───────────────────── */
.jt-panel { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.jt-loading { display: flex; align-items: center; gap: 9px; color: #667085; font-size: 13px; padding: 18px 0; }
.jt-head { font-size: 15px; font-weight: 600; color: #0F1C35; letter-spacing: -0.01em; }
.jt-sub { font-size: 13px; color: #667085; line-height: 1.45; }
.jt-sub-off { margin-top: 6px; }
.jt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.jt-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 999px; cursor: pointer;
    font-family: inherit; font-size: 13px; line-height: 1.2; max-width: 100%;
    border: 1px solid #D0D5DD; background: #ffffff; color: #475467;
    text-decoration: line-through; text-decoration-color: #98A2B3;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.jt-chip.on { border-color: #12A26D; background: #ECFDF3; color: #05603A; text-decoration: none; }
.jt-chip[data-kind="ignored"]:not(.on) { text-decoration: none; color: #667085; background: #F9FAFB; }
.jt-chip:hover { border-color: #12A26D; }
.jt-chip:focus-visible { outline: 2px solid #12A26D; outline-offset: 2px; }
.jt-tick { font-weight: 700; font-size: 12px; }
/* Styled here, not by the popup, so it looks the same in Summary & Skills and Experience */
.jt-go {
    align-self: flex-start; margin-top: 8px;
    display: inline-flex; align-items: center;
    padding: 11px 20px; border: none; border-radius: 10px;
    background: #0F1C35; color: #fff;
    font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15,28,53,0.08), 0 6px 16px -8px rgba(15,28,53,0.45);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.jt-go:hover { background: #1C2B47; box-shadow: 0 1px 2px rgba(15,28,53,0.08), 0 8px 20px -8px rgba(15,28,53,0.5); }
.jt-go:focus-visible { outline: 2px solid #12A26D; outline-offset: 2px; }
@media (max-width: 480px) { .jt-go { align-self: stretch; } }

/* ── AI numbers: how many picked bullets should carry a figure ── */
.nm-guide { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #E4E7EC; border-radius: 10px; background: #F8F9FB; }
.nm-guide-head { font-size: 13.5px; font-weight: 600; color: #0F1C35; }
.nm-guide-sub { margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: #667085; }
.nm-guide-status { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #B54708; }
.nm-guide-status.ok { color: #05603A; }

/* Phones: the popup is the only thing that scrolls. Its text boxes grow with their
   text (js/resume-ai-features.js, growMetricsBox), so none gets a scrollbar of its own. */
@media (max-width: 640px) {
  html body #skillsPopup textarea,
  html body #jobDescPopup textarea,
  html body #inlineEditPopup textarea { flex-shrink: 0 !important; overflow-y: hidden !important; resize: none !important; max-height: none !important; }
  /* the summary tab scrolls (as the bullets tab already does) instead of clipping a tall box */
  html body #skillsPopup #generateTab.active { overflow-y: auto !important; }
}

/* The Summary | Skills switch stays at the top while the results scroll under it.
   The white ring hides the results passing behind its rounded edges. */
#skillsPopup .ai-seg {
    position: sticky; top: 0; z-index: 6;
    box-shadow: 0 0 0 6px #fff, 0 6px 10px -6px rgba(15, 28, 53, .12);
}
/* the strip above the stuck switch (the results' top padding) is filled too, so no text shows through */
#skillsPopup .ai-seg::before {
    content: ''; position: absolute; left: -8px; right: -8px; top: -30px; height: 30px;
    background: #fff; pointer-events: none;
}

/* ── Phones: the AI popups use the whole screen, the main button is always in sight, and the
   results get the room. Checked on iPhone SE (320 x 568) and iPhone 13. ─────────────────── */
@media (max-width: 640px) {
  html body #skillsPopup .skills-popup-overlay,
  html body #jobDescPopup .skills-popup-overlay { padding: 0 !important; align-items: stretch !important; }
  html body #skillsPopup .skills-popup-card,
  html body #jobDescPopup .skills-popup-card { height: 100dvh !important; max-height: 100dvh !important; border-radius: 0 !important; }
  /* an empty job post box needn't push the button off the screen; it still grows as they paste */
  html body #skillsPopup #generateTab textarea.popup-textarea,
  html body #jobDescPopup .popup-textarea { min-height: 96px !important; }
  /* "Write summary & skills" / "Write bullets": pinned to the bottom while the form scrolls */
  html body #skillsPopup #generateSummarySkillsBtn,
  html body #jobDescPopup #generateJobDescBtn { position: sticky !important; bottom: 8px !important; z-index: 3 !important; box-shadow: 0 0 0 8px #fff, 0 -14px 14px 2px #fff !important; }
  /* the results list fills the screen between the header and the buttons (it was capped at 48% of the screen) */
  html body #skillsPopup #aiResults, html body #skillsPopup #librarySummariesResults, html body #skillsPopup #librarySkillsResults,
  html body #jobDescPopup #jobDescResults, html body #jobDescPopup #libraryBulletsResults { flex: 1 1 auto !important; max-height: none !important; }
  /* results: the main choice across the top, the rest side by side on one row */
  html body #skillsPopup #generateTab .action-buttons { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
  html body #skillsPopup #generateTab .action-buttons > .ai-apply-cta { display: contents !important; }
  html body #skillsPopup #generateTab .action-buttons button { width: 100% !important; min-width: 0 !important; height: 44px !important; margin: 0 !important; padding: 0 6px !important; font-size: 13.5px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html body #skillsPopup #generateTab #applyBothBtn { grid-column: 1 / -1 !important; order: -1 !important; }
  html body #jobDescPopup .action-buttons { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  html body #jobDescPopup .action-buttons button { width: 100% !important; min-width: 0 !important; height: 44px !important; margin: 0 !important; white-space: nowrap !important; }
  html body #jobDescPopup .action-buttons #addBulletsBtn,
  html body #jobDescPopup .action-buttons #addLibraryBulletsBtn { grid-column: 1 / -1 !important; order: -1 !important; }
}
