/* =====================================================================
   PortalPills.css  -  shared "liquid glass pill" styling
   Used by: DeptResources, UniversitySyllabus, SampleQuestions,
            UploadDoc, FacultyProfile
   Self-contained (no dependency on any page's :root variables).
   ===================================================================== */

/* ---------- 1. IDENTITY PILLS (name / id / dept / role) ---------- */
.identity-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.liquid-pill {
    --pa: #4f8fcf;               /* accent */
    --pt: #eaf3fc;               /* tint   */
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 18px 5px 5px;
    border-radius: 999px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #24395c;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, var(--pt) 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 2px #fff, 0 6px 14px rgba(40, 80, 140, 0.16);
    box-shadow:
        inset 0 1px 2px #fff,
        inset 0 -8px 12px color-mix(in srgb, var(--pa) 14%, transparent),
        0 8px 18px color-mix(in srgb, var(--pa) 22%, transparent),
        0 1px 2px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
    transition: transform 0.35s cubic-bezier(.2,.9,.3,1.3), box-shadow 0.35s ease;
}
.liquid-pill::before {               /* glossy highlight */
    content: '';
    position: absolute;
    z-index: -1;
    top: 0; left: 6%; right: 6%;
    height: 50%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0));
}
.liquid-pill::after {                /* moving shimmer */
    content: '';
    position: absolute;
    z-index: -1;
    top: 0; bottom: 0;
    width: 40%;
    left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.75), transparent);
    transform: skewX(-20deg);
    transition: left 0.8s ease;
}
.liquid-pill:hover { transform: translateY(-2px) scale(1.03); }
.liquid-pill:hover::after { left: 120%; }

.liquid-pill .pill-icon {
    width: 30px; height: 30px; flex: 0 0 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    color: #fff;
    background: var(--pa);
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--pa) 55%, white), var(--pa));
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 2px 5px rgba(0,0,0,0.15);
}
.liquid-pill .pill-icon i { margin: 0; }
.liquid-pill .pill-text { white-space: nowrap; }

.liquid-pill.pill-name { --pa:#4f8fcf; --pt:#e6f0fb; }   /* sky       */
.liquid-pill.pill-id   { --pa:#8a77c9; --pt:#eeeaf9; }   /* lavender  */
.liquid-pill.pill-dept { --pa:#4aa383; --pt:#e4f4ec; }   /* sage      */
.liquid-pill.pill-role { --pa:#d19a4a; --pt:#fbf0dd; }   /* champagne */


/* ---------- 2. DEPARTMENT MENU  (sidebar tabs as liquid pills) ----------
   Higher specificity than the inline .portal-menu rules some pages carry. */
.portal-menu.pill-menu .nav-item,
.pill-tabbar a {
    --pa: #4f8fcf;
    --pt: #e6f0fb;
}
.portal-menu.pill-menu .nav-item:nth-child(4n+2), .pill-tabbar a:nth-child(4n+2) { --pa:#8a77c9; --pt:#eeeaf9; }
.portal-menu.pill-menu .nav-item:nth-child(4n+3), .pill-tabbar a:nth-child(4n+3) { --pa:#4aa383; --pt:#e4f4ec; }
.portal-menu.pill-menu .nav-item:nth-child(4n+4), .pill-tabbar a:nth-child(4n+4) { --pa:#d19a4a; --pt:#fbf0dd; }

.portal-menu.pill-menu .nav-item { margin-bottom: 0; }
.portal-menu.pill-menu .nav-item + .nav-item { margin-top: 10px; }

.portal-menu.pill-menu .nav-item a,
.pill-tabbar a {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex !important;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 6px 18px 6px 6px;
    border-radius: 999px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    text-align: left;
    color: #24395c;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, var(--pt) 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 2px #fff, 0 5px 12px rgba(40, 80, 140, 0.14);
    box-shadow:
        inset 0 1px 2px #fff,
        inset 0 -8px 12px color-mix(in srgb, var(--pa) 13%, transparent),
        0 6px 14px color-mix(in srgb, var(--pa) 20%, transparent),
        0 1px 2px rgba(0, 0, 0, 0.05);
    transform: none;
    transition: transform 0.35s cubic-bezier(.2,.9,.3,1.3), box-shadow 0.35s ease, background 0.3s ease;
}
.portal-menu.pill-menu .nav-item a::before,
.pill-tabbar a::before {
    content: '';
    position: absolute; z-index: -1;
    top: 0; left: 6%; right: 6%; height: 50%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0));
}
.portal-menu.pill-menu .nav-item a::after,
.pill-tabbar a::after {
    content: '';
    position: absolute; z-index: -1;
    top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.75), transparent);
    transform: skewX(-20deg);
    transition: left 0.8s ease;
}

/* icon bubble */
.portal-menu.pill-menu .nav-item a i,
.pill-tabbar a i {
    width: 32px; height: 32px; flex: 0 0 32px;
    margin: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
    color: #fff;
    background: var(--pa);
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--pa) 55%, white), var(--pa));
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 2px 5px rgba(0,0,0,0.15);
}

.portal-menu.pill-menu .nav-item a:hover,
.pill-tabbar a:hover {
    color: #14284a;
    background: linear-gradient(180deg, #ffffff 0%, var(--pt) 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: inset 0 1px 2px #fff, 0 10px 20px rgba(40, 80, 140, 0.22);
    box-shadow:
        inset 0 1px 2px #fff,
        inset 0 -8px 12px color-mix(in srgb, var(--pa) 18%, transparent),
        0 12px 22px color-mix(in srgb, var(--pa) 30%, transparent);
}
.portal-menu.pill-menu .nav-item a:hover::after,
.pill-tabbar a:hover::after { left: 120%; }

/* current page */
.portal-menu.pill-menu .nav-item a.active,
.pill-tabbar a.active {
    color: #0f2342;
    border-color: var(--pa);
    background: linear-gradient(180deg, #ffffff 0%, var(--pt) 55%, var(--pt) 100%);
    box-shadow: inset 0 1px 2px #fff, 0 0 0 2px rgba(79,143,207,0.35), 0 8px 18px rgba(40, 80, 140, 0.22);
    box-shadow:
        inset 0 1px 2px #fff,
        inset 0 -10px 14px color-mix(in srgb, var(--pa) 22%, transparent),
        0 0 0 2px color-mix(in srgb, var(--pa) 45%, transparent),
        0 10px 20px color-mix(in srgb, var(--pa) 30%, transparent);
}
.portal-menu.pill-menu .nav-item a.active::marker { content: none; }


/* ---------- 3. FACULTY PROFILE - horizontal pill tab bar ---------- */
.pill-tabbar-wrap { background: transparent; padding: 22px 0 0; }
.pill-tabbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.pill-tabbar a { width: auto; }


/* ---------- 4. MOBILE ---------- */
@media (max-width: 768px) {
    .liquid-pill { font-size: 0.78rem; padding-right: 14px; }
    .portal-menu.pill-menu .nav-item a,
    .pill-tabbar a { font-size: 0.82rem; }
    .pill-tabbar a { flex: 1 1 calc(50% - 12px); }
}
