/* =====================================================================
   login-updates.css
   ---------------------------------------------------------------------
   The collapsed updates strip shown on the Admin, Parent and Student
   login pages: one headline, an Updates toggle that reveals its card, and
   a More button into the notification modal.

   Shared rather than inlined per page - all three logins render the same
   markup from SystemUpdatesUi.RenderLoginUpdates, so three copies of these
   rules would drift apart on the first change.

   Colours assume the strip sits on a dark left panel, which is true on all
   three logins.
   ===================================================================== */

/* ===== Login updates strip: one headline, collapsed detail =====
   Replaces the earlier scrolling timeline. The card is hidden until the Updates
   button is pressed, so what greets a person is the illustration and a single
   line of news rather than a wall of release notes. */
.login-updates {
    width: 100%;
    max-width: 480px;
    margin: 1.25rem auto 0;
}

.lu-headline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    text-align: left;
    color: #ffffff;
}

.lu-headline-icon {
    color: #fcd34d;
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.lu-headline-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.lu-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.lu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: inherit;
}

.lu-btn:hover {
    transform: translateY(-1px);
}

.lu-btn-updates {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.lu-btn-updates:hover {
    background: rgba(255, 255, 255, 0.26);
}

.lu-btn-more {
    background: rgba(252, 211, 77, 0.2);
    color: #fef3c7;
    border: 1px solid rgba(252, 211, 77, 0.5);
}

.lu-btn-more:hover {
    background: rgba(252, 211, 77, 0.3);
}

/* Collapsed by default; the toggle adds .lu-open on the wrapper. */
.lu-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.2s ease, margin-top 0.28s ease;
}

.login-updates.lu-open .lu-panel {
    max-height: 320px;
    opacity: 1;
    margin-top: 0.85rem;
}

.lu-item {
    position: relative;
}

.lu-card {
    text-align: left;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: background 0.2s ease;
}

.lu-card:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lu-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.lu-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.lu-badge-module {
    background: rgba(16, 185, 129, 0.22);
    color: #d1fae5;
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.lu-badge-ann {
    background: rgba(245, 158, 11, 0.22);
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.lu-date {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.lu-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
}

.lu-summary {
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* "More" lifts the 2-line clamp and shows the documentation link. */
.login-updates.lu-full .lu-summary {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
}

.login-updates.lu-full .lu-panel {
    max-height: 420px;
    overflow-y: auto;
}

.lu-link {
    display: none;
    margin-top: 0.6rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #fef3c7;
    text-decoration: underline;
}

.login-updates.lu-full .lu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lu-link:hover,
.lu-link:focus {
    color: #ffffff;
}

/* ============================================================================
   WHAT'S NEW - trigger with a count, and the timeline modal behind it
   ----------------------------------------------------------------------------
   Replaces the old expand-in-place card. The login panel has very little room to
   expand into, so the strip is now just a labelled trigger carrying a count and
   the updates themselves open in a modal with room for the whole timeline.

   The strip sits on the tenant-coloured artwork panel, so it is styled in white
   alpha rather than a fixed colour - it has to stay legible on whatever colour a
   school picked. The modal sits on its own white surface and uses the --acs-*
   tokens normally.
   ============================================================================ */
.login-updates {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 4px auto 0;
    max-width: 92%;
}

.lu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lu-trigger:hover,
.lu-trigger:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
}

.lu-trigger-icon {
    font-size: 12px;
    opacity: 0.95;
}

/* The count is the point of the strip - it has to read as a number, not a chip. */
.lu-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 9999px;
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.login-updates .lu-headline-text {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   MODAL
   ============================================ */
.lu-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 8, 23, 0.55);
    backdrop-filter: blur(4px);
}

.lu-modal.is-open {
    display: flex;
}

.lu-modal[hidden] {
    display: none;
}

.lu-modal-card {
    width: 100%;
    max-width: 560px;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--login-fg, #010816);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    text-align: left;
}

.lu-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--login-border, #e2e8f0);
}

.lu-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--login-label, #1e293b);
}

.lu-modal-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--login-muted, #4b5563);
}

.lu-modal-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: var(--login-muted, #4b5563);
    font-size: 15px;
    cursor: pointer;
}

.lu-modal-close:hover,
.lu-modal-close:focus-visible {
    background: var(--login-input-bg, #f0f0f3);
    outline: none;
}

/* The timeline itself. The rail is drawn once behind the nodes rather than per
   item, so a short list does not end in a dangling line. */
.lu-timeline {
    position: relative;
    padding: 18px 20px 20px 20px;
    overflow-y: auto;
}

.lu-timeline::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 26px;
    bottom: 26px;
    width: 2px;
    background: var(--login-border, #e2e8f0);
}

.lu-modal .lu-item {
    position: relative;
    display: block;
    padding: 0 0 16px 26px;
}

.lu-modal .lu-item:last-child {
    padding-bottom: 0;
}

.lu-modal .lu-node {
    position: absolute;
    left: -0.5px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--acs-accent, #3377ff);
    box-shadow: 0 0 0 3px #ffffff;
}

.lu-modal .lu-card {
    background: var(--login-input-bg, #f8fafc);
    border: 1px solid var(--login-border, #e2e8f0);
    border-radius: 10px;
    padding: 12px 14px;
}

.lu-modal .lu-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.lu-modal .lu-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--login-label, #1e293b);
}

.lu-modal .lu-summary {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--login-muted, #4b5563);
}

.lu-modal .lu-date {
    font-size: 11.5px;
    color: var(--login-muted, #4b5563);
    white-space: nowrap;
}

.lu-modal .lu-link {
    display: inline-block;
    margin: 6px 0 0 26px;
    font-size: 12.5px;
}

@media (max-width: 640px) {
    .lu-modal {
        padding: 12px;
    }

    .lu-modal-card {
        max-height: 90vh;
    }

    .login-updates .lu-headline-text {
        display: none;
    }
}
