/*
 * Mobile Feed Top Section
 * File: /wp-content/themes/xila/assets/css/mobile-feed-top.css
 *
 * ONLY shown on mobile (≤ 768px).
 * Zero impact on desktop layout.
 *
 * Classes: xmft-* (xila mobile feed top)
 */

/* ───────────── DESKTOP: पूरा section hidden ───────────── */
.xmft-wrap {
    display: none;
}

/* ───────────── MOBILE: Show + full styling ───────────── */
@media (max-width: 768px) {

.xmft-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 12px 4px;
    /* Subtle gradient background जो section को feed से अलग करे */
    background: linear-gradient(180deg, #f0f4ff 0%, #f8fafc 100%);
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 4px;
}

/* ── Profile Card ───────────────── */
.xmft-top-row {
    width: 100%;
}

.xmft-profile-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #3b82f6 100%);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.xmft-profile-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    pointer-events: none;
}

.xmft-profile-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    border: 2px solid rgba(255,255,255,.35);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.xmft-profile-info { flex: 1; min-width: 0; }
.xmft-profile-greeting {
    font-size: 10.5px;
    color: rgba(255,255,255,.65);
    font-weight: 600;
    margin-bottom: 1px;
}
.xmft-profile-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xmft-profile-actions { flex-shrink: 0; }
.xmft-notif-btn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    font-size: 18px;
    text-decoration: none;
    transition: background .15s;
}
.xmft-notif-btn:hover { background: rgba(255,255,255,.25); }
.xmft-notif-dot {
    position: absolute;
    top: -2px; right: -2px;
    min-width: 17px; height: 17px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #2563eb;
    padding: 0 3px;
}

/* Login card (guest) */
.xmft-login-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #2563eb 100%);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.25);
}
.xmft-login-icon { font-size: 26px; flex-shrink: 0; }
.xmft-login-text { flex: 1; min-width: 0; }
.xmft-login-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}
.xmft-login-sub {
    font-size: 10.5px;
    color: rgba(255,255,255,.6);
    line-height: 1.3;
}
.xmft-login-cta {
    flex-shrink: 0;
    padding: 8px 18px;
    background: #fff;
    color: #2563eb;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all .15s;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.xmft-login-cta:hover {
    background: #eff6ff;
    transform: scale(1.04);
}

/* ── Feature Strip ────────────────── */
.xmft-feature-strip {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 4px;
    scrollbar-width: none;
}
.xmft-feature-strip::-webkit-scrollbar { display: none; }

/* Feature Card Base */
.xmft-feat-card {
    flex-shrink: 0;
    width: 90px;
    border-radius: 14px;
    padding: 12px 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.xmft-feat-card:active {
    transform: scale(.96);
}

/* Glow layer */
.xmft-feat-glow {
    position: absolute;
    bottom: -20px; right: -20px;
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    pointer-events: none;
}

.xmft-feat-icon {
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.xmft-feat-label {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.25;
    letter-spacing: .2px;
}

/* Badge */
.xmft-feat-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(255,255,255,.2);
    color: #fff;
    letter-spacing: .5px;
    border: 1px solid rgba(255,255,255,.25);
    transition: background .2s;
}
.xmft-feat-badge--live {
    background: #ef4444;
    border-color: #ef4444;
    animation: xmftPulse 1.5s ease-in-out infinite;
}
.xmft-feat-badge--hot  { background: #f97316; border-color: #f97316; }
.xmft-feat-badge--you  { background: #7c3aed; border-color: #7c3aed; }
.xmft-feat-badge--num  {
    background: rgba(255,255,255,.35);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

@keyframes xmftPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
    50%       { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

/* Card Color Themes */
.xmft-feat-card--today {
    background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 60%, #60a5fa 100%);
}
.xmft-feat-card--upcoming {
    background: linear-gradient(145deg, #92400e 0%, #d97706 60%, #fbbf24 100%);
}
.xmft-feat-card--examwatch {
    background: linear-gradient(145deg, #065f46 0%, #059669 60%, #34d399 100%);
}
.xmft-feat-card--trending {
    background: linear-gradient(145deg, #9b1c1c 0%, #dc2626 60%, #f87171 100%);
}
.xmft-feat-card--mydash {
    background: linear-gradient(145deg, #4c1d95 0%, #7c3aed 60%, #a78bfa 100%);
}
.xmft-feat-card--result {
    background: linear-gradient(145deg, #1e3a5f 0%, #0e7490 60%, #22d3ee 100%);
}
.xmft-feat-card--rozgar {
    background: linear-gradient(145deg, #1a2e05 0%, #16a34a 60%, #4ade80 100%);
}

/* ── Nav Chips Row ──────────────────── */
.xmft-nav-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 2px 0 2px;
}

.xmft-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all .12s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.xmft-chip:active {
    transform: scale(.96);
}
.xmft-chip.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: 0 1px 4px rgba(37,99,235,.12);
}

.xmft-chip-icon { font-size: 14px; line-height: 1; }
.xmft-chip-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}
.xmft-chip.is-active .xmft-chip-label { color: #2563eb; }
.xmft-chip:hover .xmft-chip-label { color: #2563eb; }
.xmft-chip:hover { border-color: #bfdbfe; background: #f8fbff; }

/* ── Filter Bar (Sector + EventType) ──────────────────── */
.xmft-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Sticky bar जो scroll पर visible रहे */
    position: sticky;
    top: 56px;   /* header height */
    z-index: 50;
    background: #f0f4ff;
    margin: 0 -12px;
    padding: 7px 12px 8px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Sector scroll */
.xmft-sector-scroll {
    flex: 1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.xmft-sector-scroll::-webkit-scrollbar { display: none; }

.xmft-sector-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .12s;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.xmft-sector-btn:hover { border-color: #93c5fd; color: #2563eb; background: #eff6ff; }
.xmft-sector-btn.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}

/* Event Type Dropdown */
.xmft-evtype-wrap {
    position: relative;
    flex-shrink: 0;
}

.xmft-evtype-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 20px;
    background: #1e293b;
    color: #fff;
    border: none;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .12s;
    box-shadow: 0 2px 8px rgba(15,23,42,.25);
}
.xmft-evtype-btn:hover { background: #334155; }
.xmft-evtype-btn svg { opacity: .7; transition: transform .15s; }
.xmft-evtype-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.xmft-evtype-label {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xmft-evtype-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 165px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    overflow: hidden;
    z-index: 200;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(.97);
    transition: all .15s ease;
}
.xmft-evtype-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.xmft-evtype-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    border-bottom: 1px solid #f8fafc;
    transition: background .1s;
}
.xmft-evtype-item:last-child { border-bottom: none; }
.xmft-evtype-item:hover { background: #f0f9ff; color: #2563eb; }
.xmft-evtype-item.is-active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

} /* end @media (max-width: 768px) */