/* ========== NOTIFICATION BARS (Oct 2026) ==========
   One or more bars stacked between the navigation bar and the page
   content (includes/notification_bar.php renders them; index.php
   includes that right after includes/navigation.php and before
   .container). Deliberately normal block-flow elements, NOT fixed or
   absolutely positioned - each bar just takes up its own natural
   height and pushes the next thing down, so there's never an overlap
   to avoid or a gap to account for, and adding/removing a bar never
   requires touching any offset/margin elsewhere on the page.
   navigation.css's nav IS `position: sticky`, but sticky still
   reserves its normal-flow space (unlike `position: fixed`), so
   nothing here needed to change to accommodate it either. */

.notification-bars {
    width: 100%;
}

/* Oct 2026 follow-up: originally each bar kind was a full-width solid
   color fill (deep blue for the announcement, bright gold for account
   info) - readable, but it looked like a separate banner ad bolted onto
   the page rather than part of the site, and neither color was tied to
   the theme at all (same flat blue/gold in dark mode AND light mode).
   Restyled to the same "recessed box with a colored accent border" look
   the rest of the site already uses for this exact purpose (.log-entry,
   .ticket-row, .command-item, etc.) - a neutral var(--oil-black) panel
   background with a colored left border and matching icon tint to tell
   the two kinds apart at a glance, same as before, just without the
   full-bleed color block. Entirely built from the site's existing
   theme variables (--oil-black/--steel-gray/--rust-orange/
   --warning-yellow), already redefined per-theme in light-mode.css, so
   this now follows dark/light mode automatically with no separate
   override block needed there. Flashbang mode is unaffected either way
   - its blanket `body, body *` override already forces every
   background/text color on the page regardless of what's set here. */
.notification-bar {
    width: 100%;
    padding: 12px 20px;
    box-sizing: border-box;
    background: var(--oil-black);
    border-bottom: 2px solid var(--steel-gray);
    border-left: 4px solid var(--steel-gray);
}

.notification-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-bar-icon {
    font-size: 1.1em;
    flex-shrink: 0;
}

.notification-bar-text {
    flex: 1;
    line-height: 1.5;
}

/* Site announcement (console's /announce) - everyone, guests included.
   Rust-orange accent - deliberately distinct from the account-info
   bar's amber below, so a visitor can tell "this is news" apart from
   "this is about my account" at a glance without reading either one
   first, same as before. Text itself isn't set here - it inherits
   body's color, already correct for either theme. */
.notification-bar-announcement {
    border-left-color: var(--rust-orange);
}

.notification-bar-announcement .notification-bar-icon {
    color: var(--rust-orange);
}

/* Account info (currently: email verification reminder) - amber/
   warning, matching the --warning-yellow convention used for caution-
   level messaging elsewhere on the site (e.g. console.php's own
   output-warning lines). */
.notification-bar-account {
    border-left-color: var(--warning-yellow);
}

.notification-bar-account .notification-bar-icon {
    color: var(--warning-yellow);
}

.notification-bar-account .notification-bar-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--rust-orange);
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
}

.notification-bar-account .notification-bar-link-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.notification-bar-resend-message {
    display: none;
    margin-top: 6px;
    font-size: 0.9em;
    font-weight: bold;
}

.notification-bar-resend-message.show {
    display: block;
}

/* Tuned for dark mode (this stylesheet's own default) - readable
   against var(--oil-black)'s dark value, matching the brighter
   green/red already used for the same success/error meaning elsewhere
   in dark mode (e.g. console.php's .output-success/.output-error).
   light-mode.css overrides both to a deeper, less saturated shade more
   readable against its much lighter version of var(--oil-black). */
.notification-bar-resend-message.success {
    color: #4CAF50;
}

.notification-bar-resend-message.error {
    color: #F44336;
}

/* Future bar kinds (e.g. a "random events" announcement) slot in the
   same way - add a .notification-bar-<kind> rule here with its own
   background/color, and a matching conditional block in
   includes/notification_bar.php. */

@media (max-width: 600px) {
    .notification-bar {
        padding: 10px 14px;
    }
    .notification-bar-inner {
        font-size: 0.9em;
    }
}

/* ========== RANDOM EVENT CARD (Oct 2026) ==========
   The card includes/random_event_section.php renders at the top of the
   page content on eligible pages. Same recessed "oil-black panel with a
   colored accent border" look as the notification bars above - orange/
   red for a negative event, green for a positive one. */
.random-event {
    display: flex;
    gap: 18px;
    align-items: stretch;
    background: var(--oil-black);
    border: 2px solid var(--steel-gray);
    border-left-width: 6px;
    padding: 16px;
    margin: 0 0 20px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.45);
}
.random-event-negative { border-left-color: #DC3545; }
.random-event-positive { border-left-color: var(--success-green, #6B8E23); }
.random-event-image {
    flex: 0 0 200px;
    min-height: 140px;
    background: #000;
    border: 2px solid var(--steel-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.random-event-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.random-event-fallback-icon { display: none; font-size: 3em; }
.random-event-image.no-image .random-event-fallback-icon { display: block; }
.random-event-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.random-event-kind { font-size: 0.75em; text-transform: uppercase; letter-spacing: 2px; opacity: 0.7; }
.random-event-negative .random-event-kind { color: #DC3545; opacity: 1; }
.random-event-positive .random-event-kind { color: var(--success-green, #6B8E23); opacity: 1; }
.random-event-title { margin: 0; font-family: 'Rajdhani', sans-serif; color: var(--warning-yellow); font-size: 1.4em; }
.random-event-text { margin: 0; line-height: 1.5; }
.random-event-effects { display: flex; flex-wrap: wrap; gap: 8px; }
.random-event-effect { padding: 2px 10px; border: 1px solid var(--steel-gray); font-weight: bold; font-size: 0.9em; }
.random-event-effect.is-loss { color: #DC3545; border-color: #DC3545; }
.random-event-effect.is-gain { color: var(--success-green, #6B8E23); border-color: var(--success-green, #6B8E23); }
.random-event-note { font-size: 0.8em; opacity: 0.7; font-style: italic; }
.random-event-btn {
    align-self: flex-start;
    margin-top: auto;
    background: var(--rust-orange);
    color: #fff;
    border: 2px solid var(--dark-rust);
    padding: 8px 26px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    font-size: 1.05em;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0,0,0,0.5);
}
.random-event-btn:hover { background: var(--dark-rust); }
.random-event-btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 640px) {
    .random-event { flex-direction: column; }
    .random-event-image { flex-basis: auto; min-height: 160px; }
}
.random-event-countdown { font-family: 'Rajdhani', sans-serif; font-size: 1.6em; font-weight: bold; color: var(--warning-yellow); margin-top: auto; }

/* ========== ACHIEVEMENT UNLOCKED BAR (Oct 2026) ==========
   includes/achievement_bar.php. Sits after the notification bars and
   before .container (so above the random event card). Only rendered when
   an achievement was just earned. Same recessed panel look, gold accent. */
.achievement-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--oil-black);
    border: 2px solid var(--steel-gray);
    border-left: 6px solid var(--warning-yellow, #F0B429);
    padding: 10px 16px;
    margin: 12px auto;
    width: calc(100% - 50px);
    max-width: 1350px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.45);
    box-sizing: border-box;
}
.achievement-bar-badge { width: 44px; height: 44px; object-fit: contain; flex: 0 0 44px; box-sizing: border-box; background: var(--oil-black); border: 2px solid var(--rust-orange); border-radius: 50%; }
.achievement-bar-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.achievement-bar-points { opacity: 0.8; font-size: 0.9em; }
.achievement-bar-link, .achievement-bar-link:visited { color: var(--rust-orange); font-weight: bold; white-space: nowrap; }
@media (max-width: 600px) {
    .achievement-bar { width: calc(100% - 16px); padding: 8px 10px; }
    .achievement-bar-badge { width: 36px; height: 36px; flex-basis: 36px; }
}
