/* ================================================================
 * live-events.css — the Live Events area
 *
 * Self-contained. learning.css has a .btn block whose braces do not
 * close where you would expect (the rule runs into the modal section),
 * so this page ships its own stylesheet rather than inheriting those.
 * The tokens match learning.css so the area still reads as part of the
 * same Academy.
 * ================================================================ */

/* Colour tokens are defined in academy-theme.css, which is loaded
   after this file and republishes the dashboard palette on the short
   token names used below. That is why this file declares none. */

* { box-sizing: border-box; }

/* body, header, h1 and .btn colours are owned by
   academy-theme.css; only layout stays here. */
.wrap { max-width: 1150px; margin: 0 auto; padding: 0 20px 40px; }

.head {
    max-width: 1150px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.head-title { display: flex; align-items: center; gap: 16px; }

/* ---------- buttons ---------- */
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* ---------- stat strip ---------- */
.stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px; margin-bottom: 22px;
}
.stat { padding: 14px 16px; }
.stat .k { font-size: 11px; letter-spacing: 1px; color: var(--mut); text-transform: uppercase; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 4px; }
.stat .v.long { font-size: 13px; font-weight: 600; line-height: 1.4; }

/* ---------- filters ---------- */
.filters {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-bottom: 18px;
}
.chip { display: inline-flex; align-items: center; gap: 7px; }
.chip .n { opacity: .75; font-size: 12px; }
.filters input {
    flex: 1 1 220px; min-width: 200px; border-radius: 99px;
    padding: 9px 15px; font-size: 13px;
}

/* ---------- event cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 16px; }
.card {
    padding: 18px;
    display: flex; flex-direction: column;
}

.card-top {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-bottom: 8px;
}
.badge {
    font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
    border-radius: 99px; padding: 3px 9px;
    display: inline-flex; align-items: center; gap: 6px;
}

.dot {
    width: 7px; height: 7px; border-radius: 50%;
    display: inline-block;
    animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.8); }
}

.card h3 { margin: 0 0 8px; font-size: 16px; }
.desc { font-size: 13px; color: var(--mut); margin: 8px 0; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--mut); margin: 6px 0; }

/* countdown / seat bar */
.bar { height: 6px; border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.fill { height: 100%; }
.bar-text { font-size: 12px; color: var(--mut); display: flex; justify-content: space-between; gap: 10px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--txt); }

.ok { font-size: 13px; }
.empty { color: var(--mut); font-size: 14px; padding: 24px 0; text-align: center; }
.signin { padding: 26px; text-align: center; margin-bottom: 22px; }
/* ---------- modal ---------- */
.modal {
    position: fixed; inset: 0;
    display: none; align-items: center; justify-content: center;
    z-index: 9999; padding: 20px;
}
.modal.active { display: flex; }
.modal-box {
    border-radius: 14px; padding: 24px; max-width: 660px;
    width: 100%; max-height: 88vh; overflow: auto; position: relative;
}
.close {
    position: absolute; top: 12px; right: 14px; background: none;
    border: none; color: var(--mut); font-size: 24px; cursor: pointer; line-height: 1;
}

.cert-sheet { border-radius: 16px; padding: 34px 26px; text-align: center; }
.cert-brand { font-size: 11px; letter-spacing: 3px; }
.cert-title { font-size: 19px; font-weight: 700; margin: 10px 0 18px; }
.cert-sub { font-size: 13px; margin: 6px 0; }
.cert-name { font-size: 26px; font-weight: 700; margin: 10px 0; }
.cert-course { font-size: 19px; margin: 10px 0; }
.cert-id { font-family: ui-monospace, Consolas, monospace; font-size: 13px; margin-top: 16px; }
.cert-note { font-size: 11px; margin-top: 6px; }
.cert-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ---------- toast ---------- */
#toast {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    padding: 12px 22px; border-radius: 10px; font-size: 14px;
    display: none; z-index: 10000; max-width: 90vw;
}

@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
    h1 { font-size: 20px; }
}