html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

tr.now-happening td {
    background-color: #e7fbe7;
}

tr.expired td {
    background-color: #f8f9fa;
    color: #6c757d;
}
/* align the left radio with multi-line address content */
.addr-radio {
    margin-top: .15rem; /* small vertical nudge */
    width: 1.05rem;
    height: 1.05rem;
}
/* make radios bigger + themed */
.addr-radio {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #0d6efd; /* Bootstrap primary */
}

.addr-radio:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem; /* bigger click target */
    height: 2.25rem;
    padding: 0;
    font-size: 1.25rem; /* bigger icon */
}

/* 🎨 GLOBAL THEME: 11PM Serenades */
:root {
    --night-sky-top: #1a1333; /* Deep midnight purple/blue */
    --night-sky-bot: #2c1e4a; /* Lighter purple gradient */
    --lamp-gold: #ffd700; /* The street lamp glow */
    --heart-pink: #f687b3; /* The floating hearts */
    --note-blue: #63b3ed; /* The music notes */
    --glass-bg: rgba(0, 0, 0, 0.4); /* Semi-transparent background */
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #f0f0f0;
    --text-muted: #a0a0a0;
    color-scheme: dark; /* native pieces (date pop-up, select lists, scroll bars, autofill) follow the dark page */
}

/* 1. Base Structure */
html {
    position: relative;
    min-height: 100%;
}

body {
    background: linear-gradient(180deg, var(--night-sky-top) 0%, var(--night-sky-bot) 100%);
    background-attachment: fixed; /* Keeps gradient fixed while scrolling */
    color: var(--text-color);
    margin-bottom: 60px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 2. Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--lamp-gold);
    text-shadow: 0px 0px 10px rgba(255, 215, 0, 0.2);
    font-family: 'Georgia', serif; /* Optional: adds that classy serenade feel */
}

a {
    color: var(--note-blue);
    text-decoration: none;
    transition: color 0.2s;
}

    a:hover {
        color: var(--heart-pink);
    }

.text-muted {
    color: var(--text-muted) !important;
}

/* Bootstrap's form help text is dark grey, almost invisible on the dark theme (e.g. "Only users with public
   profiles can be invited." on My Invitations > Send Invite). */
.form-text {
    color: var(--text-muted);
}

/* 3. Bootstrap Component Overrides */

/* Cards (Glassmorphism) */
.card {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px); /* Blurs the background behind the card */
    color: var(--text-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* The blur makes each card its own layer, so a menu opened in a card (z-index 1060) stayed inside it: the cards after it and the page footer were drawn over the
   open menu and took its clicks (owner, 2026-11-13: Manage photos, the Delete item of a photo near the bottom could not be clicked; the footer's links showed through).
   While its menu is open, the card is raised above the page. */
.card:has(.dropdown-menu.show) {
    z-index: 1061;
}

.card-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    color: var(--lamp-gold);
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
}

/* Forms & Inputs */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

    .form-control:focus, .form-select:focus {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: var(--heart-pink);
        color: #fff;
        box-shadow: 0 0 0 0.25rem rgba(246, 135, 179, 0.25);
    }

    .form-control::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

/* Primary Buttons (Gold) */
.btn-primary {
    background-color: var(--lamp-gold);
    border-color: var(--lamp-gold);
    color: #1a1333; /* Dark text for contrast */
    font-weight: bold;
}

    .btn-primary:hover, .btn-primary:focus, .btn-primary:active {
        background-color: #e6c200 !important;
        border-color: #e6c200 !important;
        color: #000 !important;
    }

    /* A disabled primary button used to fall back to Bootstrap's blue; keep it the site's gold, dimmed. */
    .btn-primary:disabled, .btn-primary.disabled {
        background-color: var(--lamp-gold);
        border-color: var(--lamp-gold);
        color: #1a1333;
        opacity: 0.45;
    }

/* Secondary Buttons (Outlines) */
.btn-outline-secondary {
    color: var(--text-color);
    border-color: var(--text-muted);
}

    .btn-outline-secondary:hover {
        background-color: var(--text-muted);
        color: #000;
    }

/* Tables */
.table {
    color: var(--text-color);
    --bs-table-color: var(--text-color);
    --bs-table-hover-color: #fff;
    --bs-table-hover-bg: rgba(255,255,255,0.1);
}

    .table thead th {
        border-bottom: 2px solid var(--lamp-gold);
        color: var(--lamp-gold);
    }

    .table td {
        border-bottom: 1px solid var(--glass-border);
    }

/* A plain .table sits on the dark page: transparent rows, not Bootstrap's white (.table-dark keeps its own colours) */
.table:not(.table-dark) {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, .04);
    --bs-table-striped-color: var(--text-color);
    --bs-table-active-bg: rgba(255, 255, 255, .08);
    --bs-table-active-color: var(--text-color);
    --bs-table-border-color: var(--glass-border);
}

/* Alerts/Toasts */
.toast {
    background-color: rgba(26, 19, 51, 0.95);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Footer */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    background-color: rgba(0,0,0,0.3);
    border-top: 1px solid var(--glass-border);
}

/* Add to site.css if you want to standardize Chat UI */
.chat-panel {
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.chat-window {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--note-blue);
    border-radius: 10px;
}

/* 🌍 Language Selector Fine-Tuning */
.serenade-lang-select {
    background-color: rgba(0, 0, 0, 0.3) !important; /* Semi-transparent dark */
    color: var(--lamp-gold) !important; /* Gold text */
    border: 1px solid var(--lamp-gold) !important; /* Gold border */
    border-left: none !important; /* Merge with icon */
    cursor: pointer;
    font-weight: 500;
}

.serenade-lang-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(251, 211, 141, 0.25) !important; /* Gold glow */
    border-color: var(--heart-pink) !important;
}

/* 🛑 CRITICAL FIX: Style the dropdown options */
/* Browsers often default these to white bg/black text, breaking dark themes. */
.serenade-lang-select option {
    background-color: #1a1333; /* Match your Deep Midnight Blue theme */
    color: #fff; /* White text for readability */
    padding: 10px;
}

/* Style the icon span to match */
.serenade-lang-select + .input-group-text,
.input-group-text:has(+ .serenade-lang-select) {
    border-color: var(--lamp-gold) !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    color: var(--lamp-gold) !important;
}

/* 🌍 Serenade Dropdown Styling */
.serenade-dropdown {
    background-color: var(--night-sky-top); /* Dark Purple/Blue background */
    border: 1px solid var(--lamp-gold); /* Gold Border */
    color: var(--text-color);
    backdrop-filter: blur(10px); /* Glass effect */
}

/* Ensure links/text inside the ViewComponent look correct */
.serenade-dropdown form,
.serenade-dropdown select,
.serenade-dropdown label {
    color: var(--text-color) !important;
}

/* If the component uses a standard select, style it to match */
.serenade-dropdown .form-select {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--lamp-gold);
}

.serenade-dropdown .form-select option {
    background-color: var(--night-sky-top); /* Fixes white option background */
    color: #fff;
}

/* Fix for dropdown menus being obscured by main content or navbar */
.dropdown-menu {
    /* Bootstrap default is 1000. Increase it to guarantee stacking over any fixed/sticky content. */
    z-index: 1060 !important;
    /* Ensures the menu container itself has the dark background/glass effect */
    background-color: var(--night-sky-top);
    border: 1px solid var(--glass-border);
}

/* Make sure the navbar & its dropdowns sit above page content */
header,
header .navbar {
    position: relative;
    z-index: 2000; /* higher than cards/hero/etc. */
}

/* A dialog and its backdrop sit above the header, not under it */
.modal-backdrop { z-index: 2190; }
.modal { z-index: 2200; }

/* Extra safety: boost dropdown menus inside the navbar */
header .navbar .dropdown-menu {
    z-index: 2100;
}

/* --- FIX: DROPDOWN TEXT CONTRAST (BLACK ON BLACK) --- */

/* 1. Ensure all default text inside the dark menu is light. */
.dropdown-menu {
    color: var(--text-color);
    /* Sets the background color again, just in case */
    background-color: var(--night-sky-top);
}

/* 2. Target the links (.dropdown-item) and enforce light text color */
.dropdown-menu .dropdown-item {
    color: var(--text-color) !important;
    transition: background-color 0.2s, color 0.2s;
    /* Remove any border that might interfere */
    border: none !important;
}

/* 3. Style the hover state using theme colors (Gold/Pink) */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    /* Use a lightened background color matching the gold theme */
    background-color: rgba(255, 215, 0, 0.15) !important;
    color: var(--lamp-gold) !important;
}

/* 4. Fix nested button text (like the Sign Out link) */
.dropdown-menu .dropdown-item .btn-link {
    color: var(--text-color) !important;
    font-weight: normal;
}

/* Ensure the divider is visible */
.dropdown-divider {
    border-top: 1px solid var(--glass-border);
}

/* --- AMENITIES LIST FIX: Custom Dark List Group --- */

/* 1. Target the List Group Container (.list-group) */
.list-group.dark-list-group {
    /* Remove default light background set by Bootstrap's base .list-group class */
    background-color: transparent !important;
    /* Use the glass border for clean separation */
    border-color: var(--glass-border) !important;
}

/* 2. Target the List Items (.list-group-item) */
.list-group-item.dark-list-group-item {
    /* Make the item transparent so the card/body background shows through */
    background-color: transparent !important;
    /* Ensure text is light by default */
    color: var(--text-color) !important;
    /* Use theme separator color */
    border-color: var(--glass-border) !important;
    /* Ensure the icon color is visible */
    font-weight: 500;
}

/* 3. Handle Hover/Focus States */
.list-group-item.dark-list-group-item:hover,
.list-group-item.dark-list-group-item:focus {
    /* Apply a subtle theme background on hover */
    background-color: rgba(255, 255, 255, 0.08) !important;
    /* Highlight text with the primary gold/yellow */
    color: var(--lamp-gold) !important;
}

/* 4. Ensure Check/X Icons Maintain Correct Color */
.list-group-item.dark-list-group-item .text-success {
    /* Standard success color is usually light green; override it with gold for consistency */
    color: var(--lamp-gold) !important;
}

.list-group-item.dark-list-group-item .text-muted {
    /* Keep muted color slightly brighter for visibility */
    color: var(--text-muted) !important;
}

/* --- THEME OVERRIDE: Custom Callout Box (Used for Notices/Warnings) --- */
.themed-callout {
    /* Background: Use a dark, slightly transparent gradient to contrast with the deep body background */
    background: linear-gradient(90deg, rgba(251, 211, 141, 0.05) 0%, rgba(26, 19, 51, 0.9) 100%);
    /* Border: Use the heart-pink or lamp-gold for emphasis */
    border: 1px solid var(--heart-pink);
    border-left: 5px solid var(--lamp-gold); /* Strong emphasis line */

    color: var(--text-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.themed-callout h4,
.themed-callout strong {
    color: var(--lamp-gold) !important;
}

.themed-callout ol,
.themed-callout p {
    color: var(--text-color);
    opacity: 0.9;
}

/* Must be in site.css */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.1); /* Dark, transparent background for the box */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff; /* Ensure text in the box is light */
}

/* This is often the trickiest part: forcing the individual options to display a dark background 
so the light text is readable when the menu drops down. */
.form-select option {
    background-color: var(--night-sky-top); /* Forces the menu background to be dark */
    color: #fff;
}

/* Add this to site.css to ensure date/time input text is gold */
.form-control[type="datetime-local"],
.form-control-dark-text {
    /* Ensures the entered text is theme-compliant light/gold */
    color: var(--lamp-gold) !important;
    /* Sets the blinking cursor color */
    caret-color: var(--heart-pink) !important;
    /* Ensures the input background is dark/transparent (from global form-control style) */
}

/* This is often necessary to style the icons/arrows inside date inputs */
.form-control[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Invert the color of the native icon (usually black) to white/light */
}

/* --- THEME OVERRIDE: Custom Info Callout Pop --- */
.themed-callout-info-pop {
    /* Background: Use a subtle dark background that hints at the Note Blue accent */
    background: linear-gradient(90deg, rgba(99, 179, 237, 0.1) 0%, rgba(26, 19, 51, 0.85) 100%);
    /* Border: Strong Note Blue border on the left */
    border: 1px solid var(--note-blue);
    border-left: 5px solid var(--note-blue);
    color: var(--text-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.themed-callout-info-pop h4 {
    /* Ensure header stands out with gold */
    color: var(--lamp-gold) !important;
}

.themed-callout-info-pop strong {
    /* Ensure strong text uses theme colors */
    font-weight: 700;
}

/* Toast animation: slide from top-right & fade in */
.toast.slide-in {
    opacity: 0;
    transform: translateY(-20px) translateX(20px); /* slight diagonal slide */
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.toast.slide-in.show {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Bounce-in animation */
@keyframes toast-bounce-in {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }

    60% {
        opacity: 1;
        transform: translateY(10px) scale(1.03);
    }

    80% {
        transform: translateY(-5px) scale(0.98);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* Apply the animation when toast becomes visible */
.toast.bounce-in.show {
    animation: toast-bounce-in 0.6s cubic-bezier(.34,1.56,.64,1) forwards;
}

.event-hero-card .card-body {
    padding: 0; /* full-bleed image */
}

.event-hero-img {
    width: 100%;
    max-width: none;
    height: 320px; /* adjust to taste: 280–420px works well */
    object-fit: cover; /* crop instead of squish */
    display: block;
    border-radius: 0 0 .5rem .5rem; /* or 0 if you prefer square corners */
}

/* Recommendation panel wrapper */
.recommendation-panel {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Each recommendation row */
.recommendation-item {
    position: relative;
    padding: 0.85rem 1rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(90deg, #111827, #020617);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out;
}

    /* Last item border cleanup */
    .recommendation-item:last-child {
        border-bottom: none;
    }

/* Accent bar on the left of each item */
.recommendation-accent {
    width: 4px;
    border-radius: 999px;
    align-self: stretch;
    background: #6b7280;
}

    /* System vs user accent colors */
    .recommendation-accent.accent-system {
        background: linear-gradient(180deg, #22c55e, #16a34a);
    }

    .recommendation-accent.accent-user {
        background: linear-gradient(180deg, #eab308, #f97316);
    }

/* Hover effect to make them “pop” */
.recommendation-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.6);
    background: radial-gradient(circle at top left, #1f2937, #020617);
}

/* Title emphasis */
.recommendation-title {
    font-size: 1rem;
    color: #e5e7eb;
}

/* View button */
.recommendation-view-btn {
    white-space: nowrap;
    border-radius: 999px;
}

.recommendation-thumb-wrap {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.recommendation-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Make links readable inside dark tables */
.table-dark a.hpn-title,
.table-dark a.hpn-title:visited {
    color: var(--text-color) !important; /* or #f8f9fa */
}

    .table-dark a.hpn-title:hover,
    .table-dark a.hpn-title:focus {
        color: var(--lamp-gold) !important; /* or var(--heart-pink) */
        text-decoration: underline;
    }


/* Keep your dark theme – don't let list-group reset it to white */
.recommendation-list .list-group-item {
    background-color: transparent; /* use parent card background */
    color: inherit; /* keep existing text color */
    border-color: rgba(255, 255, 255, 0.12); /* subtle divider on dark bg */
}

/* Tiny thumbnail */
.recommendation-thumb-wrap {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.recommendation-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-on-dark {
    color: #f8f9fa; /* Bootstrap light */
}

    .link-on-dark:hover {
        color: #ffffff; /* pure white on hover */
    }

.table a.hpn-title {
    color: var(--bs-light);
}

    .table a.hpn-title:hover {
        color: #fff;
        text-decoration: underline;
    }


/* Force table background to pure black */
.table-midnight {
    background-color: #000000 !important;
    border-color: #333 !important; /* Subtle border for separation */
}

    /* Ensure individual cells are also black (Bootstrap sometimes overrides this) */
    .table-midnight td,
    .table-midnight th {
        background-color: #000000 !important;
        color: #ffffff; /* Bright white text for maximum pop */
        border-bottom: 1px solid rgba(255, 215, 0, 0.2); /* Faint gold separator */
    }

    /* Make the hover effect a deep rich gray/gold mix instead of standard gray */
    .table-midnight tbody tr:hover td {
        background-color: #111111 !important; /* Very subtle lift */
        cursor: pointer;
    }

.cat.is-selected {
    background: linear-gradient(90deg, #ff5a82, #5cc6ff) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 12px 26px rgba(255,90,130,.18) !important;
}

/* Profile Drawer Styles */
.profile-hero {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    /* Gradient overlay for text readability */
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(33,37,41,1));
}

.profile-avatar-container {
    position: absolute;
    bottom: -40px;
    left: 20px;
    border-radius: 50%;
    padding: 4px;
    background: #212529; /* Matches offcanvas bg */
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #212529;
}

.offcanvas-body-custom {
    padding-top: 50px; /* Space for the avatar overlap */
    padding-bottom: 80px; /* Space for sticky footer */
}

.sticky-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: rgba(33, 37, 41, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

/* --- Global Status Bar --- */
.status-bar {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 500;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-success {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 78, 59, 0.6) 100%);
    border-left: 4px solid #34d399;
}

.status-warning {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, rgba(120, 53, 15, 0.6) 100%);
    border-left: 4px solid #fbbf24;
}

.status-error {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(127, 29, 29, 0.6) 100%);
    border-left: 4px solid #f87171;
}

.status-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.05);
}

/* Tile Icon (Small square in the list) */
.tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0; /* Prevent squishing */
}

/* Details Icon (Larger square in the offcanvas header) */
.details-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Ensure the X is always visible on top of any image */
.btn-close-hero {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
    /* The Magic: Dark semi-transparent bubble */
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    padding: 10px; /* Bigger touch target */
    box-sizing: content-box; /* Keeps the X icon size correct */
    width: 1em;
    height: 1em;
    transition: all 0.2s ease;
}

.btn-close-hero:hover {
    background-color: rgba(0, 0, 0, 0.85); /* Darker on hover */
    transform: scale(1.1); /* Subtle zoom */
}

/* Dark modal list styling */
#venuePickerModal .list-group-item {
    background-color: #0b0d10;
    color: #e9ecef;
    border-color: rgba(255,255,255,0.15);
}

#venuePickerModal .list-group-item:hover,
#venuePickerModal .list-group-item:focus {
    background-color: #12161c;
    color: #fff;
}

#venuePickerModal .list-group-item.active {
    background-color: rgba(255, 193, 7, 0.18); /* warning glow */
    border-color: rgba(255, 193, 7, 0.45);
    color: #fff;
}

#venuePickerModal .form-control::placeholder {
    color: rgba(255,255,255,0.45);
}

/* ================================
   Modals (dark theme)
   ================================
   Bootstrap's modal is white; with the site's light body text that was white-on-white. Every modal now uses
   the site's night-sky look (same palette as the cards). */
.modal-content {
    background: linear-gradient(180deg, var(--night-sky-top) 0%, var(--night-sky-bot) 100%);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.modal-header,
.modal-footer {
    border-color: var(--glass-border);
}

.modal-title {
    color: var(--lamp-gold);
}

.modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* white X on the dark header */
    opacity: 0.75;
}

    .modal .btn-close:hover {
        opacity: 1;
    }

.modal .text-muted {
    color: var(--text-muted) !important;
}

.modal .list-group-item {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    border-color: var(--glass-border);
}

.modal label.list-group-item {
    cursor: pointer;
}

    .modal .list-group-item:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }

    /* the chosen option (e.g. the date in the invite popup) glows gold */
    .modal .list-group-item:has(input:checked) {
        background-color: rgba(255, 215, 0, 0.14);
        border-color: rgba(255, 215, 0, 0.55);
    }

.modal .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.45);
}

    .modal .form-check-input:checked {
        background-color: var(--lamp-gold);
        border-color: var(--lamp-gold);
    }

    .modal .form-check-input[type="radio"]:checked {
        /* dark dot on the gold fill (Bootstrap's default dot is white, which vanishes on gold) */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%231a1333'/%3e%3c/svg%3e");
    }

/* A list-group inside a card: Bootstrap's rows are white, which glares on the dark cards (e.g. the sent-invites
   list on Happenings > Invites > Manage). Opt in with class="list-group list-group-dark". */
.list-group-dark .list-group-item {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    border-color: var(--glass-border);
}

    .list-group-dark .list-group-item:hover {
        background-color: rgba(255, 255, 255, 0.08);
    }

/* radio / checkbox choices inside a dark list (e.g. the date picker on My Invitations > Send Invite) */
.list-group-dark label.list-group-item {
    cursor: pointer;
}

.list-group-dark .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.45);
}

    .list-group-dark .form-check-input:checked {
        background-color: var(--lamp-gold);
        border-color: var(--lamp-gold);
    }

    .list-group-dark .form-check-input[type="radio"]:checked {
        /* dark dot on the gold fill (Bootstrap's default dot is white, which vanishes on gold) */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%231a1333'/%3e%3c/svg%3e");
    }

.list-group-dark .list-group-item:has(input:checked) {
    background-color: rgba(255, 215, 0, 0.14);
    border-color: rgba(255, 215, 0, 0.55);
}

/* A .card blurs what is behind it (backdrop-filter), which makes it the stacking context for anything
   position:fixed inside it. A modal placed inside a card therefore ends up UNDER Bootstrap's page backdrop and
   every click lands on the backdrop, not on the modal's buttons. Safety net for any modal still nested in a card
   (the invite popup itself now sits outside): no blur on a card that contains a modal. */
.card:has(.modal) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* ================================
   Dark Accordion Variant
   ================================ */

.accordion-dark .accordion-item {
    background-color: #1e1e1e;
    border-color: #2a2a2a;
}

.accordion-dark .accordion-button {
    background-color: #1e1e1e;
    color: #f1f1f1;
    border-bottom: 1px solid #2a2a2a;
}

    .accordion-dark .accordion-button:not(.collapsed) {
        background-color: #242424;
        color: #ffffff;
        box-shadow: none;
    }

    .accordion-dark .accordion-button::after {
        filter: invert(1); /* makes caret white */
    }

.accordion-dark .accordion-body {
    background-color: #181818;
    color: #d6d6d6;
    border-top: 1px solid #2a2a2a;
}

/* Dark Mode Exploding Container */
.event-type-container {
    display: none;
    background: #1e1e2e; /* Deep dark background */
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
    border: 1px solid #333 !important;
    color: #f8f9fa;
}

/* Dark Mode Event Cards */
.event-card {
    background-color: #2a2a3c !important; /* Slightly lighter dark card */
    border: 1px solid #3f3f5a !important;
    border-left: 4px solid var(--bs-info) !important; /* Cyan accent border */
    border-radius: 0.5rem !important; /* Rounded individual cards */
    transition: background 0.2s, transform 0.2s;
    color: #f8f9fa !important;
}

    .event-card:hover {
        background-color: #3b3b54 !important; /* Lighter hover state */
        transform: translateX(4px); /* Slight pop-out effect on hover */
        color: #ffffff !important;
    }

.app-dropdown-menu {
    min-width: 320px;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.9rem;
    background: #170b3a;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.28);
}

.app-dropdown-menu-account {
    max-height: 78vh;
    overflow-y: auto;
}

.app-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.5rem 0.8rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

    .app-dropdown-header i {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.45);
    }

.app-dropdown-divider {
    margin: 0.5rem 0.2rem;
    border-top-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.app-dropdown-item {
    border-radius: 0.75rem;
    padding: 0.72rem 0.85rem;
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    background: transparent;
    transition: background-color 0.16s ease, transform 0.16s ease;
}

    .app-dropdown-item:hover,
    .app-dropdown-item:focus {
        background-color: rgba(255, 255, 255, 0.06);
        color: #ffffff !important;
        transform: translateX(1px);
    }

.app-dropdown-item-main {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

    .app-dropdown-item-main i {
        width: 1.1rem;
        text-align: center;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
    }

.app-dropdown-item-signout {
    color: #ffb4b4 !important;
}

    .app-dropdown-item-signout .app-dropdown-item-main i {
        color: #ff7b7b;
    }

    .app-dropdown-item-signout:hover,
    .app-dropdown-item-signout:focus {
        background-color: rgba(255, 107, 107, 0.12);
        color: #ffd0d0 !important;
    }

/* =====================================================================================================================
   THEME NORMALIZATION
   The site is a dark "night sky" theme: gold (--lamp-gold) is the ONE primary accent for actions and headings; links are
   --note-blue; surfaces are the translucent "glass" panels above. The pink-to-violet gradient (--fe-match-from/to) belongs
   to Match Lab and the dating pages only - do not use it elsewhere.
   Bootstrap's stock light components (alerts, bg-light / bg-white, accordions, light buttons, light tables) used to show up
   as bright boxes on this background; they are restyled here once instead of page by page.
   ===================================================================================================================== */
:root {
    --fe-match-from: #ff5a82;   /* Match Lab / dating accent - reserved */
    --fe-match-to: #7873f5;
    --fe-success: #4ade80;
    --fe-warning: var(--lamp-gold);
    --fe-danger: #fb7185;
    --fe-info: var(--note-blue);
}

/* Alerts: glass panel with a coloured left edge instead of a pastel box */
.alert {
    background-color: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--fe-info);
}
.alert-success { border-left-color: var(--fe-success); }
.alert-info { border-left-color: var(--fe-info); }
.alert-warning { border-left-color: var(--fe-warning); }
.alert-danger { border-left-color: var(--fe-danger); }
.alert-secondary, .alert-light { border-left-color: var(--text-muted); }
.alert .alert-heading, .alert h4, .alert h5 { color: var(--lamp-gold); text-shadow: none; }
.alert .alert-link, .alert a:not(.btn) { color: var(--lamp-gold); text-decoration: underline; }
.alert .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* Light backgrounds used as containers become glass (badges that use bg-light keep their light chip + dark text) */
.bg-light:not(.badge):not(.input-group-text):not(.ratio):not([class*="bg-opacity"]),
.bg-white:not(.badge):not(.input-group-text):not(.ratio):not([class*="bg-opacity"]) {
    background-color: var(--glass-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--glass-border) !important;
}
.bg-light:not(.badge):not(.input-group-text):not(.ratio) .text-dark, .bg-white:not(.badge):not(.input-group-text):not(.ratio) .text-dark { color: var(--text-color) !important; }
.table-light, .table > thead.table-light > tr > *, .table > :not(caption) > .table-light > * {
    --bs-table-bg: rgba(255, 255, 255, 0.06);
    --bs-table-color: var(--lamp-gold);
    color: var(--lamp-gold);
    border-color: var(--glass-border);
}

/* Accordions (the plain .accordion used to be white; .accordion-dark stays as an alias) */
.accordion {
    --bs-accordion-bg: var(--glass-bg);
    --bs-accordion-color: var(--text-color);
    --bs-accordion-border-color: var(--glass-border);
    --bs-accordion-btn-bg: rgba(255, 255, 255, 0.05);
    --bs-accordion-btn-color: var(--lamp-gold);
    --bs-accordion-active-bg: rgba(255, 215, 0, 0.08);
    --bs-accordion-active-color: var(--lamp-gold);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.2);
}
.accordion-button::after { filter: invert(1) brightness(1.5); }

/* Plain list groups follow the glass surface */
.list-group { --bs-list-group-bg: transparent; --bs-list-group-color: var(--text-color); --bs-list-group-border-color: var(--glass-border); }

/* The gold accent as a text colour (icons and small labels that used Bootstrap's blue text-primary) */
.text-accent { color: var(--lamp-gold) !important; }

/* Field help text: readable, small, and close to its field */
.form-text { font-size: 0.8rem; margin-top: 0.25rem; }

/* Breadcrumbs: links in the link colour, the current page in gold, muted separators */
.breadcrumb { --bs-breadcrumb-divider-color: var(--text-muted); --bs-breadcrumb-item-active-color: var(--lamp-gold); }
.breadcrumb-item.active { color: var(--lamp-gold); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* Small utilities (used instead of style="" on pages) */
.min-w-0 { min-width: 0; }
.pre-wrap { white-space: pre-wrap; }
.pre-line { white-space: pre-line; }
/* a field only a bot fills in: out of sight and out of the tab order */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.profile-width { max-width: 760px; }

/* Page widths, thumbnails and small helpers (used instead of style="" on pages) */
.page-w480 { max-width: 480px; }
.page-w560 { max-width: 560px; }
.page-w640 { max-width: 640px; }
.page-w680 { max-width: 680px; }
.page-w760 { max-width: 760px; }
.page-w860 { max-width: 860px; }
.page-w1000 { max-width: 1000px; }
.page-w1100 { max-width: 1100px; }
.cover-fit { object-fit: cover; }
.text-theme { color: var(--text-color); }
.thumb-48 { width: 48px; height: 48px; object-fit: cover; }
.thumb-72x42 { width: 72px; height: 42px; object-fit: cover; border-radius: 8px; }
.announce-img { max-width: 220px; max-height: 160px; object-fit: contain; }
.field-w260 { max-width: 260px; }
.btn-close-sm { font-size: .6rem; }
.cursor-pointer { cursor: pointer; }
.recipient-suggestions { z-index: 1070; max-height: 260px; overflow-y: auto; }
.panel-dim { background-color: rgba(0, 0, 0, .15); }
.panel-info { background-color: rgba(13, 202, 240, .08); }
.btn-slot { width: 200px; }

/* The footer: the divider line is drawn lower inside it (not at the very top edge) */
footer.footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .15);
}
.link-hover:hover { color: var(--lamp-gold) !important; text-decoration: underline !important; }

/* The sign-in layout */
.auth-card { max-width: 440px; margin: 1.5rem auto 3rem; }
.auth-card.auth-wide { max-width: 600px; }
.auth-card .auth-brand { letter-spacing: .02em; }
.auth-card .auth-rules li { list-style: none; }
.auth-card .auth-rules li::before { content: "\25CB"; display: inline-block; width: 1.2rem; opacity: .6; }
.auth-card .auth-rules li.ok { color: var(--bs-success); }
.auth-card .auth-rules li.ok::before { content: "\2713"; opacity: 1; }

/* The reading layout (articles, blogs, venue comments) */
.reading { max-width: 720px; margin: 0 auto 3rem; }
.reading-body p { font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.1rem; white-space: pre-line; color: var(--text-color); }
.reading-figure img { width: 100%; max-height: 420px; object-fit: cover; object-position: center 20%; }

/* About */
.about-hero { max-width: 760px; }
.about-block .bi-icon { width: 44px; height: 44px; }

/* The layout: the glass navigation bar, the language menu and the status bar's title */
.navbar-glass { background-color: rgba(0, 0, 0, .3); backdrop-filter: blur(10px); }
.navbar-glass .nav-link { white-space: nowrap; }   /* a link is never broken over two lines ("Match" / "Lab"); the bar collapses before it runs out of room */
.menu-w260 { min-width: 260px; }
.status-title { letter-spacing: 1px; font-size: .7rem; }

/* Small form and tile helpers (Match Lab and People you may meet) */
.select-w90 { width: 90px; }
.select-w160 { width: 160px; }
.tile-72 { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, .06); flex: 0 0 auto; }
.tile-72 img { width: 100%; height: 100%; object-fit: cover; }
.icon-lg { font-size: 1.6rem; }

/* One-off sizes and boxes (these were style="" attributes on single pages) */
.page-w600 { max-width: 600px; }
.page-w960 { max-width: 960px; }
.field-w160 { max-width: 160px; }
.field-w250 { max-width: 250px; }
.field-w320 { max-width: 320px; }
.field-w360 { max-width: 360px; }
.field-w420 { max-width: 420px; }
.field-w20rem { max-width: 20rem; }
.field-min14rem { min-width: 14rem; }
.max-w-10rem { max-width: 10rem; }
.select-w130 { width: 130px; }
.menu-w300 { min-width: 300px; }
.flex-18 { flex: 1 1 18rem; }
.col-w80 { width: 80px; }
.col-w120 { width: 120px; }
.col-w200 { width: 200px; }
.col-pct-25 { width: 25%; }
.col-pct-30 { width: 30%; }
.thumb-140x100 { width: 140px; height: 100px; }
.thumb-160x112 { width: 160px; height: 112px; }
.thumb-56 { width: 56px; height: 56px; object-fit: cover; }
.box-56 { width: 56px; height: 56px; }
.box-28 { width: 28px; height: 28px; }
.box-72x42 { width: 72px; height: 42px; border-radius: 8px; }
.max-h-220 { max-height: 220px; }
.max-h-360 { max-height: 360px; }
.scroll-360 { max-height: 360px; overflow: auto; }
.scroll-12rem { max-height: 12rem; overflow: auto; }
.viewer-img { max-height: 78vh; }
.pre-wrap-break { white-space: pre-wrap; word-break: break-word; }
.font-inherit { font-family: inherit; }
.lh-15 { line-height: 1.5; }
.lh-16 { line-height: 1.6; }
.bg-dim { background: rgba(0, 0, 0, .12); }
.bg-scrim { background: rgba(0, 0, 0, .55); }
.fs-65 { font-size: .65rem; }
.title-icon { font-size: 1.35rem; }
.icon-md { font-size: 1.5rem; }
.icon-xl { font-size: 3.5rem; }
.drop-zone { border-style: dashed !important; cursor: pointer; }
.svg-static { pointer-events: none; display: block; }
.story-pic { display: block; margin: 0 auto; width: auto; max-width: 100%; max-height: 55vh; aspect-ratio: 9 / 16; background: #1A1333; }

/* Keyboard users: the first Tab stop jumps over the navbar to the page's main content */
.skip-link {
    position: absolute;
    left: .5rem;
    top: -4rem;
    z-index: 3000;
    padding: .5rem 1rem;
    border-radius: .375rem;
    background: #FFD700;
    color: #1A1333;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: .5rem; color: #1A1333; }
main:focus { outline: none; }

/* Visitors who asked their device for less motion get none: no slides, bounces, hover zooms or animated scrolling */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Accent colours on the dark page. Bootstrap's primary, success, danger and secondary are its light-theme colours and read at only 3.2 to 4.2 : 1 on the midnight
   background (AA needs 4.5 : 1). Text, outline buttons and nav tabs use Bootstrap's own dark-mode shades instead (6.0 to 8.3 : 1); filled buttons, badges and alerts are unchanged. */
:root {
    --fe-text-primary: #6ea8fe;
    --fe-text-success: #75b798;
    --fe-text-danger: #ea868f;
    --fe-text-secondary: #a7acb1;
    --bs-form-invalid-color: #ea868f;
    --bs-form-invalid-border-color: #ea868f;
    --bs-form-valid-color: #75b798;
    --bs-form-valid-border-color: #75b798;
}
.text-primary { color: var(--fe-text-primary) !important; }
.text-success { color: var(--fe-text-success) !important; }
.text-danger { color: var(--fe-text-danger) !important; }
.text-secondary { color: var(--fe-text-secondary) !important; }
.btn-outline-primary {
    --bs-btn-color: #6ea8fe; --bs-btn-border-color: #6ea8fe;
    --bs-btn-hover-color: #1a1333; --bs-btn-hover-bg: #6ea8fe; --bs-btn-hover-border-color: #6ea8fe;
    --bs-btn-focus-shadow-rgb: 110, 168, 254;
    --bs-btn-active-color: #1a1333; --bs-btn-active-bg: #6ea8fe; --bs-btn-active-border-color: #6ea8fe;
    --bs-btn-disabled-color: #6ea8fe; --bs-btn-disabled-border-color: #6ea8fe;
}
.btn-outline-success {
    --bs-btn-color: #75b798; --bs-btn-border-color: #75b798;
    --bs-btn-hover-color: #1a1333; --bs-btn-hover-bg: #75b798; --bs-btn-hover-border-color: #75b798;
    --bs-btn-focus-shadow-rgb: 117, 183, 152;
    --bs-btn-active-color: #1a1333; --bs-btn-active-bg: #75b798; --bs-btn-active-border-color: #75b798;
    --bs-btn-disabled-color: #75b798; --bs-btn-disabled-border-color: #75b798;
}
.btn-outline-danger {
    --bs-btn-color: #ea868f; --bs-btn-border-color: #ea868f;
    --bs-btn-hover-color: #1a1333; --bs-btn-hover-bg: #ea868f; --bs-btn-hover-border-color: #ea868f;
    --bs-btn-focus-shadow-rgb: 234, 134, 143;
    --bs-btn-active-color: #1a1333; --bs-btn-active-bg: #ea868f; --bs-btn-active-border-color: #ea868f;
    --bs-btn-disabled-color: #ea868f; --bs-btn-disabled-border-color: #ea868f;
}
.nav-pills, .nav-tabs { --bs-nav-link-color: #6ea8fe; --bs-nav-link-hover-color: #9ec5fe; }
/* Tap targets (WCAG 2.2 AA asks for 24 x 24 px; phones are better at 32 to 44). The 24 px floor is for everyone; the larger sizes only where the main pointer is a finger. */
:root { --fe-link-min: 24px; --fe-badge-min: 24px; }
a.badge, button.badge { display: inline-flex; align-items: center; min-height: var(--fe-badge-min); }
.link-row a, a.link-pad, a.auth-brand,
a.text-decoration-none:not(.btn):not(.stretched-link):not(.navbar-brand):not(.card):not(p a),
a.small:not(p a):not(li a) { display: inline-flex; align-items: center; min-height: var(--fe-link-min); }
.form-range { height: 1.75rem; }
.form-check-input { width: 1.15em; height: 1.15em; margin-top: .2em; }
.form-check-label { min-height: 24px; }
@media (pointer: coarse) {
    :root { --fe-link-min: 32px; --fe-badge-min: 30px; }
    .btn { min-height: 40px; }
    .btn-sm { min-height: 38px; padding-top: .45rem; padding-bottom: .45rem; }
    .page-link { min-height: 44px; display: inline-flex; align-items: center; }
    .navbar-brand { min-height: 44px; display: inline-flex; align-items: center; }
    .navbar-toggler { min-height: 44px; min-width: 44px; }
    .nav-pills .nav-link, .nav-tabs .nav-link { min-height: 40px; }
    .form-control:not(.form-control-sm), .form-select:not(.form-select-sm) { min-height: 44px; }
    .form-control-sm, .form-select-sm { min-height: 36px; }
    .form-range { height: 2rem; }
    .form-check-input { width: 1.35em; height: 1.35em; margin-top: .1em; }
    .form-check-label { min-height: 28px; padding-top: .1rem; }
    footer a { display: inline-block; padding-top: .5rem; padding-bottom: .5rem; }
}
/* One accent colour: the checked state of switches, boxes and radios, the slider thumb and the active pill are the site's gold with midnight marks
   (the modals and dark lists already did this one by one), not Bootstrap's blue. */
.form-check-input:checked { background-color: var(--lamp-gold); border-color: var(--lamp-gold); }
.form-check-input:checked[type="checkbox"] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%231a1333' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-check-input:checked[type="radio"] {
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%231a1333'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:checked {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%231a1333'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffd700'/%3e%3c/svg%3e");
}
.form-range::-webkit-slider-thumb { background-color: var(--lamp-gold); }
.form-range::-moz-range-thumb { background-color: var(--lamp-gold); }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 1px #1a1333, 0 0 0 .25rem rgba(255, 215, 0, .35); }
.form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px #1a1333, 0 0 0 .25rem rgba(255, 215, 0, .35); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--lamp-gold); --bs-nav-pills-link-active-color: #1a1333; }
/* Keyboard focus. Bootstrap's own ring on links in the navbar, the pager, the menu button and close buttons is a 25 % blue glow (about 1.3 : 1 on the dark page;
   WCAG asks for 3 : 1). These get a gold outline instead, for keyboard focus only (:focus-visible), so a mouse click shows nothing new. Buttons and fields keep their rings. */
.nav-link:focus-visible, .page-link:focus-visible, .navbar-toggler:focus-visible, .btn-close:focus-visible,
.dropdown-item:focus-visible, .list-group-item-action:focus-visible, .navbar-brand:focus-visible {
    outline: 2px solid var(--lamp-gold);
    outline-offset: 2px;
    box-shadow: none;
}
/* The contents bar on the long text pages is closed and already in the HTML, so filling its list later moves nothing */
.toc-bar > summary { cursor: pointer; }

/* Text size on phones. The page is set in 14 px under 768 px (the template's html rule at the top), and iPhone Safari zooms the page in when a field whose text is under
   16 px is tapped, and does not zoom back. So text typed into a field is 16 px on phones. And text that came out tiny (a pill inside .small is 9 px) has a floor.
   The base size and everything else are unchanged. */
@media (max-width: 767.98px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="color"]),
    select, select.form-select, select.form-select-sm, textarea, textarea.form-control { font-size: 16px; }
}
.badge { font-size: max(.75em, 11.5px); }
.form-text { font-size: max(.875em, 12px); }
.fs-65, .shared-event-type { font-size: max(.65rem, 11px); }
/* Printing: the page is light text on dark panels, and browsers print without background colours, so print as black on white and leave out the controls.
   The rules sit in a cascade layer: an !important rule in a layer beats an !important rule outside one whatever its specificity, so the utility classes
   (.text-white, .text-warning, .shadow-lg, ...) cannot bring the dark look back. */
@media print {
    @layer print {
        html, body, *, *::before, *::after {
            background: none !important;
            color: #000 !important;
            text-shadow: none !important;
            -webkit-text-fill-color: currentColor !important;
            filter: none !important;
            backdrop-filter: none !important;
            box-shadow: none !important;
        }
        body { background: #fff !important; }
        header, footer, .navbar, .skip-link, .status-bar, nav[aria-label="breadcrumb"], .dropdown, .dropdown-menu, .modal, .modal-backdrop,
        .btn, button, iframe, [data-load-more], .no-print { display: none !important; }
        .card:has(iframe), .card:has(.leaflet-container) { display: none !important; }
        a { text-decoration: underline; }
        .text-muted, .form-text, small, .small { color: #444 !important; }
        ::placeholder { color: #555 !important; -webkit-text-fill-color: #555 !important; }
        .card, .list-group-item, .table, .table td, .table th, .alert, .badge { border: 1px solid #bbb !important; }
        .card, .list-group-item, tr, img { break-inside: avoid; }
        img { max-width: 100% !important; }
        main { padding: 0 !important; }
        h1, h2, h3, h4 { break-after: avoid; }
    }
}