/* "Recent Updates" popup on the home page (#myLargeModalLabel in Views/Jobs/Index.cshtml). */
.ru-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* Header */
.ru-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px;
    color: #fff;
    background: radial-gradient(circle at 92% -20%, rgba(255, 255, 255, .25), transparent 45%), linear-gradient(120deg, #be123c 0%, #e11d48 45%, #f97316 100%);
}
.ru-head-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    animation: ruBell 2.6s ease-in-out infinite;
}
.ru-head-text { flex: 1 1 auto; min-width: 0; }
.ru-title { margin: 0; font-family: 'Montserrat', 'Montserrat Fallback', 'Inter', sans-serif; font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.2px; line-height: 1.2; }
.ru-sub { margin: 1px 0 0; font-size: .78rem; line-height: 1.3; color: rgba(255, 255, 255, .88); }
.ru-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fff;
    color: #be123c;
    font-size: .72rem;
    font-weight: 800;
    vertical-align: 1px;
}
.ru-count[hidden] { display: none; }
.ru-x {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color .15s, transform .15s;
}
.ru-x:hover, .ru-x:focus-visible { background: rgba(255, 255, 255, .3); transform: rotate(90deg); outline: none; }

/* Search + type chips */
.ru-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 7px 18px;
    background: #fff;
    border-bottom: 1px solid #e8ebf3;
}
.ru-search {
    position: relative;
    flex: 0 1 280px;
    margin: 0;
}
.ru-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .85rem; pointer-events: none; }
.ru-search input {
    width: 100%;
    height: 31px;
    padding: 0 12px 0 34px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    font-size: .88rem;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ru-search input:focus { outline: none; border-color: #fb7185; background: #fff; box-shadow: 0 0 0 3px rgba(225, 29, 72, .14); }
.ru-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.ru-chips:empty { display: none; }
.ru-chip {
    --c: #475569;
    --bg: #f1f5f9;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 29px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s, background-color .15s, color .15s;
}
.ru-chip b { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg); color: var(--c); font-size: .7rem; line-height: 18px; }
.ru-chip:hover, .ru-chip:focus-visible { border-color: var(--c); color: var(--c); outline: none; }
.ru-chip.is-on { background: var(--c); border-color: var(--c); color: #fff; }
.ru-chip.is-on b { background: rgba(255, 255, 255, .25); color: #fff; }
.ru-chip[data-type=""] { --c: #be123c; --bg: #ffe4e6; }   /* "All" */

/* Type colours (chips, cards) */
.ru-job { --c: #4f46e5; --bg: #eef2ff; }
.ru-result { --c: #15803d; --bg: #dcfce7; }
.ru-admit { --c: #c2410c; --bg: #ffedd5; }
.ru-answer { --c: #7e22ce; --bg: #f3e8ff; }
.ru-syllabus { --c: #0f766e; --bg: #ccfbf1; }
.ru-admission { --c: #be185d; --bg: #fce7f3; }

/* Body */
.ru-body { padding: 7px 18px; background: #f8fafc; }
.ru-ad { text-align: center; overflow: hidden; margin-top: 7px; }
.ru-ad ins.adsbygoogle { max-width: 100%; }
.ru-ad ins.adsbygoogle[data-ad-status="unfilled"], .ru-ad.is-empty { display: none !important; }

.ru-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 6px; }
.ru-item {   /* colours (--c, --bg) come from the type class, e.g. .ru-job */
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 3px 24px 3px 8px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8ebf3;
    border-left: 3px solid var(--c);
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .15s, box-shadow .15s, border-color .15s;
    animation: ruIn .35s ease both;
}
.ru-item:hover, .ru-item:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 23, 42, .1); color: #0f172a; text-decoration: none; outline: none; }
.ru-item:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 10px 22px rgba(15, 23, 42, .1); }
.ru-item-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--c);
    font-size: .74rem;
}
.ru-item-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ru-item-title {   /* two lines at most; the full title is in the tooltip */
    font-size: .78rem; font-weight: 600; line-height: 1.2; color: #0f172a; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ru-item:hover .ru-item-title { color: var(--c); }
.ru-badge {
    align-self: flex-start;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--c);
    font-size: .58rem;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.ru-item-go { position: absolute; top: 8px; right: 8px; font-size: .66rem; color: #cbd5e1; transition: color .15s; }
.ru-item:hover .ru-item-go { color: var(--c); }

/* Loading placeholders, empty and error states */
.ru-skel { border-left-color: #e2e8f0; animation: none; }
.ru-skel .ru-item-icon, .ru-line {
    background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
    background-size: 200% 100%;
    animation: ruShimmer 1.2s linear infinite;
}
.ru-skel .ru-item-text { flex: 1 1 auto; padding-top: 3px; }
.ru-line { display: block; height: 9px; border-radius: 6px; width: 92%; }
.ru-line.short { width: 45%; }
.ru-empty { grid-column: 1 / -1; text-align: center; padding: 34px 12px; color: #64748b; font-size: .95rem; }
.ru-empty i { display: block; margin: 0 auto 10px; font-size: 1.6rem; color: #cbd5e1; }
.ru-retry { margin-left: 6px; border: 0; background: none; color: #e11d48; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Footer */
.ru-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 18px;
    background: #fff;
    border-top: 1px solid #e8ebf3;
}
.ru-all { color: #e11d48; font-weight: 700; font-size: .88rem; text-decoration: none; }
.ru-all i { font-size: .76rem; margin-left: 3px; transition: transform .15s; }
.ru-all:hover { color: #be123c; text-decoration: none; }
.ru-all:hover i { transform: translateX(3px); }
.ru-close {
    height: 31px;
    padding: 0 22px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(120deg, #e11d48, #f97316);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    box-shadow: 0 6px 14px rgba(225, 29, 72, .25);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.ru-close:hover, .ru-close:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(225, 29, 72, .32); outline: none; }

@keyframes ruIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ruShimmer { to { background-position: -200% 0; } }
@keyframes ruBell {
    0%, 70%, 100% { transform: rotate(0); }
    74% { transform: rotate(14deg); }
    80% { transform: rotate(-12deg); }
    86% { transform: rotate(8deg); }
    92% { transform: rotate(-4deg); }
}

/* Phones: near full screen, chips scroll sideways */
@media (max-width: 575px) {
    .ru-modal .modal-dialog { margin: 8px; }
    .ru-modal .modal-content { border-radius: 16px; }
    .ru-head { padding: 13px 14px; gap: 11px; }
    .ru-head-icon { width: 38px; height: 38px; font-size: 1rem; }
    .ru-title { font-size: 1.08rem; }
    .ru-sub { font-size: .76rem; }
    .ru-tools { padding: 10px 14px; }
    .ru-search { flex: 1 1 100%; }
    .ru-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
    .ru-chips::-webkit-scrollbar { display: none; }
    .ru-body { padding: 12px 14px; }
    .ru-grid { grid-template-columns: 1fr; gap: 6px; }
    .ru-foot { padding: 10px 14px; }
}

/* Dark theme */
html[data-theme="dark"] .ru-modal .modal-content, html[data-theme="dark"] .ru-body { background: #0b1220; }
html[data-theme="dark"] .ru-tools, html[data-theme="dark"] .ru-foot { background: #0f172a; border-color: #1e293b; }
html[data-theme="dark"] .ru-search input { background: #111c31; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .ru-chip { background: #111c31; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .ru-item { background: #111c31; border-color: #1e293b; border-left-color: var(--c); }
html[data-theme="dark"] .ru-item-title { color: #e2e8f0; }
html[data-theme="dark"] .ru-item-icon, html[data-theme="dark"] .ru-badge, html[data-theme="dark"] .ru-chip b { background: rgba(148, 163, 184, .14); }
html[data-theme="dark"] .ru-skel .ru-item-icon, html[data-theme="dark"] .ru-line { background: #1e293b; animation: none; }

@media (prefers-reduced-motion: reduce) {
    .ru-head-icon, .ru-item, .ru-skel .ru-item-icon, .ru-line { animation: none !important; }
    .ru-item, .ru-x, .ru-close, .ru-all i { transition: none !important; }
}
