/* ── Personalisation Feed Bar ────────────────────────── */
.xpf-bar {
    background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

/* Setup Row */
.xpf-setup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.xpf-setup-left { display: flex; align-items: center; gap: 10px; }
.xpf-setup-icon { font-size: 22px; }
.xpf-setup-title { font-size: 14px; font-weight: 700; color: #1e293b; }
.xpf-setup-sub { font-size: 12px; color: #64748b; margin-top: 1px; }
.xpf-setup-btn {
    padding: 9px 18px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.xpf-setup-btn:hover { background: linear-gradient(135deg,#4f46e5,#4338ca); }

/* Profile + Switch Row */
.xpf-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.xpf-profile-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    color: #3730a3;
    font-weight: 600;
}
.xpf-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    opacity: 0.7;
}
.xpf-edit-btn:hover { opacity: 1; }

/* Toggle Group */
.xpf-toggle-group {
    display: flex;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.xpf-toggle-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    transition: all 0.2s;
}
.xpf-toggle-btn.is-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* ── Modal ──────────────────────────────────────────── */
.xpf-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(4px);
}
.xpf-modal-overlay.is-open { display: flex; }

.xpf-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 460px;
    margin: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    position: relative;
    animation: xpfIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes xpfIn {
    from { opacity:0; transform:scale(0.94) translateY(12px); }
    to   { opacity:1; transform:scale(1) translateY(0); }
}
.xpf-modal-close {
    position: absolute; top: 14px; right: 14px;
    background: #f1f5f9; border: none; border-radius: 50%;
    width: 30px; height: 30px; cursor: pointer;
    font-size: 13px; display: flex; align-items: center; justify-content: center;
}

/* Steps Indicator */
.xpf-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 24px;
}
.xpf-step {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    background: #f1f5f9; color: #94a3b8; border: 2px solid #e2e8f0;
    transition: all 0.2s;
}
.xpf-step.is-active  { background: #6366f1; color: #fff; border-color: #6366f1; }
.xpf-step.is-done    { background: #10b981; color: #fff; border-color: #10b981; }
.xpf-step-line       { flex: 1; height: 2px; background: #e2e8f0; max-width: 40px; }

/* Step Panels */
.xpf-step-panel       { display: none; }
.xpf-step-panel.is-active { display: block; }
.xpf-step-panel h3    { font-size: 18px; font-weight: 800; color: #1e293b; margin: 0 0 4px; }
.xpf-step-sub         { font-size: 13px; color: #64748b; margin: 0 0 18px; }

/* State Search */
.xpf-state-search-wrap { position: relative; }
.xpf-state-list {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    max-height: 200px; overflow-y: auto; z-index: 9; box-shadow: 0 8px 24px rgba(0,0,0,.1);
    display: none;
}
.xpf-state-list.is-open { display: block; }
.xpf-state-item {
    padding: 10px 14px; font-size: 13px; cursor: pointer; transition: background 0.1s;
}
.xpf-state-item:hover { background: #f8fafc; }
.xpf-selected-state {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
    background: #f0fdf4; border: 1px solid #86efac;
    border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600; color: #065f46;
}
.xpf-clear-btn {
    background: none; border: none; color: #0369a1; font-size: 12px; cursor: pointer; margin-left: auto;
}

/* Qualification Grid */
.xpf-qual-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px;
}
.xpf-qual-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
    background: #fff; cursor: pointer; font-size: 13px; font-weight: 600;
    color: #374151; transition: all 0.15s; text-align: left;
}
.xpf-qual-btn:hover    { border-color: #6366f1; background: #f5f3ff; }
.xpf-qual-btn.is-active{ border-color: #6366f1; background: #eef2ff; color: #4338ca; }
.xpf-qual-icon         { font-size: 18px; flex-shrink: 0; }

/* Sectors */
.xpf-sectors-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.xpf-sector-chip {
    padding: 6px 14px; border: 1.5px solid #e2e8f0; border-radius: 20px;
    background: #fff; font-size: 13px; font-weight: 600; color: #374151;
    cursor: pointer; transition: all 0.15s;
}
.xpf-sector-chip:hover    { border-color: #6366f1; color: #4338ca; }
.xpf-sector-chip.is-active{ background: #eef2ff; border-color: #6366f1; color: #4338ca; }

/* Extra Row */
.xpf-extra-row { display: flex; gap: 12px; margin-bottom: 16px; }
.xpf-mini-field { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.xpf-mini-field label { font-size: 11px; font-weight: 700; color: #374151; }

/* Inputs */
.xpf-input {
    padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 13px; color: #1e293b; outline: none; width: 100%; box-sizing: border-box;
}
.xpf-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.xpf-input--sm   { max-width: 100px; }
.xpf-select {
    padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 13px; background: #fff; width: 100%;
}

/* Step Actions */
.xpf-step-actions {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid #f1f5f9;
}
.xpf-next-btn, .xpf-save-btn {
    padding: 10px 22px; background: linear-gradient(135deg,#6366f1,#4f46e5);
    color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px;
}
.xpf-back-btn {
    padding: 10px 16px; background: #f1f5f9; color: #64748b;
    border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.xpf-skip-btn {
    font-size: 12px; color: #94a3b8; background: none; border: none; cursor: pointer;
}
.xpf-spinner {
    width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff; border-radius: 50%; animation: xpfSpin 0.65s linear infinite;
}
@keyframes xpfSpin { to { transform: rotate(360deg); } }

/* Done */
.xpf-done-icon { font-size: 56px; text-align: center; margin-bottom: 12px; }
.xpf-step-panel:has(.xpf-done-icon) { text-align: center; }

/* ── Mobile ─────────────────────── */
@media (max-width: 768px) {
    .xpf-switch-row  { flex-direction: column; align-items: stretch; }
    .xpf-toggle-group{ justify-content: center; }
    .xpf-setup-row   { flex-direction: column; gap: 10px; text-align: center; }
    .xpf-setup-btn   { width: 100%; }
    .xpf-qual-grid   { grid-template-columns: 1fr; }
    .xpf-modal       { padding: 24px 16px; }
}


/* ── Step 1 additions ──────────────────────────────── */
.xpf-field-block        { margin-bottom: 16px; }
.xpf-field-label        { font-size: 13px; font-weight: 700; color: #374151; display: block; margin-bottom: 6px; }
.xpf-field-hint         { font-size: 11px; color: #94a3b8; margin: 4px 0 0; }
.xpf-optional           { font-size: 11px; font-weight: 400; color: #94a3b8; }

/* District select */
#xpf-district-block     { animation: xpfIn 0.2s ease; }

/* Central Govt block */
.xpf-central-block {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 14px;
}
.xpf-central-row        { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.xpf-central-info       { display: flex; align-items: flex-start; gap: 10px; flex: 1; }
.xpf-central-icon       { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.xpf-central-title      { font-size: 13px; font-weight: 700; color: #1e40af; margin-bottom: 3px; }
.xpf-central-sub        { font-size: 11px; color: #64748b; line-height: 1.4; }
.xpf-central-status     { font-size: 12px; color: #15803d; margin-top: 10px; padding-top: 10px; border-top: 1px solid #bbf7d0; }

/* Toggle switch */
.xpf-central-toggle    { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.xpf-central-toggle input { opacity: 0; width: 0; height: 0; }
.xpf-central-slider {
    position: absolute; inset: 0; background: #d1d5db; border-radius: 24px; cursor: pointer;
    transition: 0.3s;
}
.xpf-central-slider::before {
    content: ''; position: absolute;
    height: 18px; width: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.xpf-central-toggle input:checked + .xpf-central-slider { background: #10b981; }
.xpf-central-toggle input:checked + .xpf-central-slider::before { transform: translateX(18px); }

/* Selected state display */
.xpf-selected-state-name { font-weight: 700; }

/* ── Rozgar / Classic / Keyword page bar adjustments ── */
.rz-page .xpf-bar,
.cc-wrap .xpf-bar {
    margin-bottom: 16px;
    border-radius: 10px;
}

/* ----------- special notes for Personalisation in Pages -------- */
.xpf-special-note {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 10px 14px; font-size: 13px; color: #1e40af; margin-bottom: 12px;
}
.xpf-special-note a { color: #6366f1; font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   Personalised Column Feed (xpfc-*) — Rozgar/Classic/Keyword
   Same pattern as cc-* and rz-* columns
══════════════════════════════════════════════════════════ */

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

@media (max-width: 1100px) {
    .xpfc-columns-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .xpfc-columns-grid { grid-template-columns: 1fr; gap: 10px; }
}

.xpfc-col {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: box-shadow .2s;
}
.xpfc-col:hover { box-shadow: 0 4px 18px rgba(0,0,0,.10); }

.xpfc-col-header {
    background: linear-gradient(135deg, var(--xpfc-h1, #6366f1), var(--xpfc-h2, #4f46e5));
    padding: 10px 14px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.xpfc-col-title {
    font-size: 13px; font-weight: 800; color: #fff;
    margin: 0; letter-spacing: .02em; text-transform: uppercase; line-height: 1;
}
.xpfc-col-count {
    background: rgba(255,255,255,.22); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
}

.xpfc-col-list { list-style: none; margin: 0; padding: 4px 0 0; }

.xpfc-item {
    border-bottom: 1px solid #f3f4f6;
    opacity: 0; transform: translateX(-10px);
    animation: xpfcItemIn .35s ease forwards;
}
.xpfc-item:last-child { border-bottom: none; }

@keyframes xpfcItemIn {
    to { opacity: 1; transform: translateX(0); }
}

.xpfc-item-link {
    display: flex; align-items: flex-start; gap: 0;
    padding: 7px 12px 7px 10px;
    text-decoration: none; color: inherit;
    transition: background .12s;
}
.xpfc-item-link:hover { background: var(--xpfc-acc, #eff6ff); }

.xpfc-item-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--xpfc-dot, #6366f1);
    flex-shrink: 0; margin-top: 5px; margin-right: 8px;
}
.xpfc-item-body {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 3px;
}
.xpfc-item-title {
    font-size: 12.5px; font-weight: 500; color: #1e293b;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .12s;
}
.xpfc-item-link:hover .xpfc-item-title { color: var(--xpfc-h1, #6366f1); }

.xpfc-item-meta {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.xpfc-item-date { font-size: 10px; color: #9ca3af; margin-left: auto; white-space: nowrap; }

.xpfc-badge {
    font-size: 9.5px; font-weight: 700;
    padding: 1px 5px; border-radius: 4px; white-space: nowrap; line-height: 1.5;
}
.xpfc-active   { background: #dcfce7; color: #166534; }
.xpfc-upcoming { background: #dbeafe; color: #1e40af; }
.xpfc-closed   { background: #fee2e2; color: #991b1b; }
.xpfc-archived { background: #f3f4f6; color: #6b7280; }
.xpfc-update   { background: #fef3c7; color: #92400e; }

.xpfc-col-footer {
    padding: 8px 12px 10px;
    background: linear-gradient(to bottom, #fafbfc, #f5f7fa);
    border-top: 1px solid #f1f5f9;
}
.xpfc-viewmore {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; width: 100%;
    padding: 7px 12px;
    background: var(--xpfc-acc, #eef2ff);
    color: var(--xpfc-h1, #6366f1);
    border: 1px solid currentColor; border-radius: 6px;
    font-size: 11.5px; font-weight: 700;
    text-decoration: none; transition: all .15s; opacity: .85;
}
.xpfc-viewmore:hover {
    opacity: 1;
    background: var(--xpfc-h1, #6366f1);
    color: #fff;
    transform: translateY(-1px);
}

/* Empty state */
.xpf-col-empty {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    border-radius: 14px;
    border: 1.5px dashed #e2e8f0;
    margin-top: 10px;
}
.xpf-col-empty-icon { font-size: 42px; opacity: .4; margin-bottom: 12px; }
.xpf-col-empty p    { color: #94a3b8; font-size: 14px; line-height: 1.6; margin: 0; }
