/*
 * The published demo accounts — Include/inc_demo_accounts.php
 *
 * Self-contained, for the same reason social-login.css is: the same markup is dropped
 * into three different design systems — the hn-* homepage sign-in card, the .eduui
 * /login/ card, and the hn-sc-* showcase hero, which is dark where the other two are
 * light. Nothing here inherits from any of them beyond the font; everything else is
 * stated, and colours are literal values rather than brand tokens so the panel cannot
 * come out looking like a different component depending on where you found it.
 *
 * EVERY BORDER IS WRITTEN TWO CLASSES DEEP. redesign-ui.css carries
 *
 *     .eduui *, .eduui :after, .eduui :before { box-sizing: border-box; border: 0 solid #e9ecef }
 *
 * at specificity (0,1,0) — a tie with a bare class — and it loads AFTER this file, so on
 * every .eduui page a single-class border rule loses the tie and is zeroed. /login/ is
 * .eduui. One extra class puts the borders back without touching the reset, which plenty
 * of other things rely on.
 *
 * The dark variant is a MODIFIER, not a media query or a parent-selector trick: the hero
 * sets .oex-demo--on-dark itself, because it is the only surface that knows its own
 * ground, and a panel that guessed from its container would guess wrong the first time
 * somebody moved it.
 */

.oex-demo-panel {
    margin-top: 22px;
    font-family: inherit;
    text-align: left;
}

.oex-demo-panel-head {
    margin-bottom: 14px;
}

.oex-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff3e2;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.6;
}

.oex-demo-panel .oex-demo-title {
    margin: 10px 0 4px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.oex-demo-panel .oex-demo-sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

/* Two cards side by side wherever there is room for them, one column where there is not.

   auto-fit with a 200px floor rather than a breakpoint: this panel appears inside a
   420px sign-in card, inside a full-width hero column and inside a phone bottom sheet,
   and those three are not distinguishable by viewport width. minmax(0, 1fr) rather than
   minmax(200px, 1fr) on the second half — a 1fr track's implicit min-width is auto, which
   a long email address in .oex-demo-creds pushes wider than its share, and the row then
   overflows the card it sits in. */
.oex-demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.oex-demo-panel .oex-demo-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid #e2e5ea;
    border-radius: 14px;
    background: #fff;
}

.oex-demo-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.oex-demo-panel .oex-demo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 15px;
}

.oex-demo-card-who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.oex-demo-role {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

/* The person whose account it is. Truncated rather than wrapped: a second line here
   pushes the button down on one card and not the other, and two cards side by side with
   their buttons at different heights read as a mistake. */
.oex-demo-name {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oex-demo-panel .oex-demo-blurb {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #4b5563;
}

/* The tap. Deliberately the strongest thing in the panel — it is the one action the
   whole demo host exists to offer — and `margin-top: auto` pins it to the bottom of its
   card so the pair line up however long the two blurbs turn out to be. */
.oex-demo-panel .oex-demo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f39c12;
    color: #1f2937;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.oex-demo-panel .oex-demo-btn:hover,
.oex-demo-panel .oex-demo-btn:focus-visible {
    background: #e08e0b;
}

.oex-demo-panel .oex-demo-btn:active {
    transform: translateY(1px);
}

/* The credentials. Two rows of label + value, laid out as a grid so the two values line
   up under each other; the value wraps by character because an email address has no
   spaces to break at and would otherwise decide the width of the card. */
.oex-demo-panel .oex-demo-creds {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #eef0f3;
    font-size: 11.5px;
    line-height: 1.5;
}

.oex-demo-creds dt {
    margin: 0;
    color: #9ca3af;
    font-weight: 600;
}

.oex-demo-creds dd {
    margin: 0;
    min-width: 0;
    color: #374151;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
    -webkit-user-select: all;
    user-select: all;
}

.oex-demo-panel .oex-demo-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 12px 0 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #6b7280;
}

.oex-demo-note .fa {
    margin-top: 2px;
    flex: 0 0 auto;
}

/* ── Compact: the showcase hero ────────────────────────────────────────────────────
   Buttons and nothing else. The hero's job is to get somebody moving in one tap; the
   credentials, the blurbs and the "this resets nightly" note all belong on the sign-in
   panel further down, where a visitor who wants to read before they click has gone
   looking for them. */
.oex-demo-panel.oex-demo--compact {
    margin-top: 18px;
}

.oex-demo--compact .oex-demo-panel-head {
    margin-bottom: 10px;
}

.oex-demo--compact .oex-demo-title {
    font-size: 15px;
}

.oex-demo--compact .oex-demo-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.oex-demo--compact .oex-demo-card {
    gap: 8px;
    padding: 12px;
}

/* ── On a dark ground ──────────────────────────────────────────────────────────────
   Only the colours change. Every rule above still supplies the geometry, so the two
   variants cannot drift apart in anything but hue. */
.oex-demo-panel.oex-demo--on-dark .oex-demo-title {
    color: #f8fafc;
}

.oex-demo--on-dark .oex-demo-sub,
.oex-demo--on-dark .oex-demo-note {
    color: rgba(226, 232, 240, .78);
}

.oex-demo-panel.oex-demo--on-dark .oex-demo-card {
    border-color: rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .55);
}

.oex-demo--on-dark .oex-demo-role {
    color: #f1f5f9;
}

.oex-demo--on-dark .oex-demo-name,
.oex-demo--on-dark .oex-demo-blurb {
    color: rgba(203, 213, 225, .82);
}

.oex-demo-panel.oex-demo--on-dark .oex-demo-icon {
    border-color: rgba(129, 140, 248, .35);
    background: rgba(79, 70, 229, .22);
    color: #c7d2fe;
}

.oex-demo-panel.oex-demo--on-dark .oex-demo-creds {
    border-top-color: rgba(148, 163, 184, .22);
}

.oex-demo--on-dark .oex-demo-creds dt {
    color: rgba(148, 163, 184, .9);
}

.oex-demo--on-dark .oex-demo-creds dd {
    color: #e2e8f0;
}

.oex-demo--on-dark .oex-demo-badge {
    background: rgba(234, 88, 12, .18);
    color: #fdba74;
}

/* ── Closing the panel off from the form below it ──────────────────────────────────
   The full panel is followed on both of its surfaces by an ordinary sign-in form, and
   without a break the "reset every night" note reads as a caption to the Username field.
   Written as a caption on a rule rather than a plain margin, because the gap has
   something to say: the form underneath is the other way in, not more of the demo.

   Specificity: :not() contributes its argument, so this selector is (0,2,0) and wins the
   tie against `.eduui * { border: 0 solid }` — see the note at the top of this file. */
.oex-demo-panel:not(.oex-demo--compact) {
    margin-bottom: 4px;
}

.oex-demo-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    color: #6b7280;
    font-size: 12.5px;
    line-height: 1.2;
}

.oex-demo-panel .oex-demo-divider::before,
.oex-demo-panel .oex-demo-divider::after {
    content: "";
    flex: 1 1 auto;
    border-top: 1px solid #e2e5ea;
}

.oex-demo-divider > span {
    flex: 0 0 auto;
}
