* {
    box-sizing: border-box;
}

html {
    height: 100%;
    /* Page can scroll (touch/mouse/keys) but no scrollbar is drawn. */
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Montserrat, Arial, sans-serif;
    /* EBS CVI main gradient (Deep Blue -> Blending Blue -> Neutral White -> Highlight Teal 1).
       Sized/pinned explicitly so it always covers the full screen exactly once, even when
       there are few events and body's natural content height is short. */
    background-image: linear-gradient(180deg, #001f4c 0%, #006acc 45%, #ffffff 63%, #6fdeb9 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    /* Keep the gradient pinned to the screen while the content scrolls. */
    background-attachment: fixed;
}

/*
  Layout below uses CSS tables (display:table/table-row/table-cell) instead
  of flexbox. MagicInfo's embedded browser doesn't reliably apply flexbox
  (display:flex is ignored, children fall back to normal block/inline flow),
  but table display has been supported since CSS2.1 and behaves the same in
  modern browsers, so it's the safer choice for side-by-side layouts here.
*/

.date-bar {
    padding: 2%;
    font-size: large;
    display: table;
    width: 100%;
    margin-bottom: 1rem;
}

#events {
    text-align: center;
}

.no-events {
    font-size: 3rem;
    display: inline-block;
    color: #001f4c;
    background: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
}

.date-bar-clock {
    color: white;
    display: table-cell;
    white-space: nowrap;
    text-align: right;
    padding-left: 1rem;
    font-size: 2.7rem;
}

/*TEXT ∨∨*/

.date-bar-text {
    color: white;
    display: table-cell;
    width: 100%;
    font-size: 2.7rem;
}

/*
  Font size is set once on .event and inherited from there (not repeated on
  `a`/.event-text) so it's the single knob the event-font-size query param
  drives. .event-time/.event-room below size themselves in em rather than
  rem specifically so they scale with that same knob -- see the note there.
*/
.event {
    font-size: 2.7rem;
}

.event-text {
    overflow-wrap: anywhere;
    align-items: center;
}

/*TEXT ^^*/

/*
  Event categories, colours drawn from the EBS CVI brand palette:
  - study      = TimeEdit teaching activities (lecture, seminar, exam
                 variants, group coaching) -> Light Blue idle / Highlight
                 Teal 2 active (CVI's own documented pairing).
  - other      = other TimeEdit activities (meeting, training, introweek)
                 -> Academic Gold (Extended Accent Palette).
  - nexudus    = Nexudus-sourced bookings, whether via the direct API
                 integration or a TimeEdit reservation labelled "Booking
                 from Nexudus" -> Deep Lavender (Extended Accent Palette).
  - fallback   = any activity type not listed above (TimeEdit's vocabulary
                 drifts over time and isn't fully known ahead of time)
                 -> Subtle Grey, CVI's colour for low-priority details.
  Fallback rules are listed first so a more specific rule below wins the
  cascade tie (equal selector specificity, later declaration wins).
*/

/*
  Colours are solid (not alpha over the page background) on purpose: the
  page background is now a multi-colour gradient, and a translucent card
  lets it bleed through differently depending on where the card sits on
  screen, so the same category visibly shifted colour top-to-bottom. Idle
  shades are pre-mixed pastel tints of the active colour, not a runtime
  blend, so a category reads as one consistent colour regardless of
  position; the gradient stays visible in the gaps between rows and behind
  the empty-day message instead.
*/

/*ACTIVE COLORS*/
.event.event-active {
    background-color: #dddddd !important;
}

.event-lecture.event-active,
.event-seminar.event-active,
.event-exam-1.event-active, .event-oral-exam.event-active, .event-exam-2.event-active, .event-oral-exam-2.event-active, .event-make-up-exam.event-active,
.event-group-coaching.event-active {
    background-color: #45c295 !important;
}

.event-meeting.event-active, .event-training.event-active, .event-introweek.event-active {
    background-color: #f0cb78 !important;
}

.event-nexudus.event-active, .event-booking-from-nexudus.event-active {
    background-color: #bba7f2 !important;
}
/*ACTIVE COLORS*/

/*EVENT COLORS VV*/
.event {
    background-color: #f3f3f3;
}

.event-lecture,
.event-seminar,
.event-exam-1, .event-oral-exam, .event-exam-2, .event-oral-exam-2, .event-make-up-exam,
.event-group-coaching {
    background-color: #d9f9f7;
}

.event-meeting, .event-training, .event-introweek {
    background-color: #faedd0;
}

.event-nexudus, .event-booking-from-nexudus {
    background-color: #e7e0fa;
}
/*EVENT COLORS ^^*/

.event, .event-Lecture, .event-exam, .event- {
    display: table;
    width: calc(100% - 1rem);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 3px;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Width/padding are in em (relative to .event's own font-size), not rem,
   so this column scales together with the event-font-size query param
   instead of staying a fixed pixel size while only the text shrinks/grows. */
.event-time {
    display: table-cell;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
    width: 5.56em;
    padding-left: 0.4em;
    padding-right: 0.4em;
}

.event-type {
    visibility: hidden;
}

.event {
    margin-top: 0.5rem;
}

.event-info {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}
.event-room {
    display: table-cell;
    vertical-align: middle;
    word-break: keep-all;
    width: 5.56em;
    text-align: center;
    padding-left: 0.4em;
    padding-right: 0.4em;
}

.event-summary {
    white-space: wrap;
}

.event-title {
    text-wrap: balance;
    text-align: center;
}

.event-lecturer {
    text-align: center;
    font-style: italic;
}

@media (min-width: 1700px) {
    :root {
        /* --screen-gap: 0.5rem;
        --event-margin-top: 0.7rem;

        --event-font-size: 2.7rem;
        --event-font-size-large: 1.5rem;
        --event-line-height: 1.1; */

        --event-time-padding-left: 5rem;
        --event-room-padding-right: 5rem;
    }
}
@media (max-width: 1200px) {
    .no-events {
        font-size: 1.7rem;
    }
    .date-bar-text, .date-bar-clock {
        font-size: 2rem;
    }
}