/*
 * The site theme: the design system as it stands on the new homepage (public/css/new-home.css),
 * applied to every page built on the older templates. Loaded after public.css and Bootstrap, so
 * it only has to say where those differ from the system: the ground, the radii, the buttons, the
 * cards and accordions, the page banners, the footer, and the Bootstrap greens that a few page
 * bodies still carry.
 *
 * The reference is questrooms-design-system.md. Anything with its own stylesheet in the system
 * already — the homepage section, the booking form, the calculator — is left alone here.
 */

:root {
    --qr-bg: #0c111d;
    --qr-surface: #17212a;
    --qr-surface-2: #1e2a35;
    --qr-mint: #42dca3;
    --qr-mint-hover: #38c895;
    --qr-mint-soft: rgba(66, 220, 163, 0.12);
    --qr-text: #ffffff;
    --qr-muted: rgba(255, 255, 255, 0.64);
    --qr-faint: rgba(255, 255, 255, 0.4);
    --qr-hairline: rgba(255, 255, 255, 0.1);
    --qr-hairline-strong: rgba(255, 255, 255, 0.2);
    --qr-glow: 0 0 0 3px rgba(66, 220, 163, 0.18);
    --qr-danger: #ff6b6b;
    --qr-display: 'Saira Stencil One', 'Helvetica Neue', Arial, sans-serif;
    --qr-body: 'Cabin', 'Helvetica Neue', Arial, sans-serif;
    --qr-radius-card: 12px;
    --qr-radius-panel: 16px;
    --qr-radius-pill: 9999px;
}

/* ---------- Ground and type ---------- */

body {
    background-color: var(--qr-bg);
    color: var(--qr-text);
}

.darkGrayBkg {
    background-color: var(--qr-bg);
}

.brokenConcreteBkg,
.bg-dark {
    background-color: var(--qr-surface) !important;
}

::-webkit-scrollbar-track {
    background: var(--qr-bg);
}

::-webkit-scrollbar-thumb {
    background-color: var(--qr-hairline-strong);
}

a {
    color: var(--qr-mint);
}

a:hover,
a:focus {
    color: var(--qr-mint-hover);
}

:focus-visible {
    outline: 2px solid var(--qr-mint);
    outline-offset: 2px;
}

/* Section titles: Saira, uppercase, tight — as on the homepage. Everything below h2 is Cabin. */
h1,
.title,
.subtitle {
    letter-spacing: 0.02em;
    font-weight: 400 !important;
}

h1.fs-1,
.title.fs-1 {
    font-size: clamp(30px, 5vw, 48px) !important;
    line-height: 1.1;
}

h2.subtitle.fs-3,
.subtitle.fs-3 {
    font-size: clamp(26px, 4vw, 34px) !important;
    line-height: 1.15;
}

h3,
h5,
h6 {
    font-weight: 700 !important;
}

/* The old sheet paints every h4 mint; the accent is for actions and live figures, not headings. */
h4 {
    color: var(--qr-text) !important;
    font-weight: 700 !important;
}

p {
    line-height: 1.5;
}

hr {
    border-color: var(--qr-hairline);
    opacity: 1;
}

img {
    border-radius: var(--qr-radius-card);
}

.text-white-50 {
    color: var(--qr-muted) !important;
}

/* A few page bodies still carry Bootstrap's own green. */
.text-success {
    color: var(--qr-mint) !important;
}

.bg-success {
    background-color: var(--qr-mint-soft) !important;
    color: var(--qr-mint) !important;
}

.border-success {
    border-color: rgba(66, 220, 163, 0.4) !important;
}

.border-secondary {
    border-color: var(--qr-hairline) !important;
}

.rounded-3 {
    border-radius: var(--qr-radius-card) !important;
}

.rounded-4 {
    border-radius: var(--qr-radius-panel) !important;
}

.shadow-sm,
.shadow {
    box-shadow: none !important;
}

/* ---------- Buttons ---------- */

.btn {
    /* Flex, so the label sits centred whatever padding an old rule forces on a button (the game
       cards' Boka/Visa keep 6px from public.css and used to hang at the top of the pill). */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: var(--qr-radius-pill) !important;
    font-family: var(--qr-body);
    font-weight: 700;
    text-transform: none;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 14px;
}

/* One filled mint button per screen: the call to action. */
.btn-primary,
.btn-success,
.bookButton {
    background: var(--qr-mint) !important;
    border: 1px solid var(--qr-mint) !important;
    color: #0b0f0b !important;
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-success:hover,
.btn-success:focus-visible,
.bookButton:hover,
.btn:hover {
    background: var(--qr-mint-hover) !important;
    border-color: var(--qr-mint-hover) !important;
    color: #0b0f0b !important;
    box-shadow: var(--qr-glow);
}

/* The quiet companions: a hairline, white text, mint only on hover. */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-light,
.btn-default,
.moreButton {
    background: transparent !important;
    border: 1px solid var(--qr-hairline-strong) !important;
    color: var(--qr-text) !important;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-light:hover,
.btn-default:hover,
.moreButton:hover {
    background: transparent !important;
    border-color: var(--qr-mint) !important;
    color: var(--qr-mint) !important;
    box-shadow: none;
}

.btn-link,
.btn-link:hover {
    min-height: 0;
    padding: 0;
    background: none !important;
    border: 0 !important;
    color: var(--qr-text) !important;
    box-shadow: none;
    text-decoration: none;
    transform: none;
}

/* ---------- Navigation ---------- */

#mainNav {
    background-color: rgba(12, 17, 29, 0.85) !important;
    border-bottom: 1px solid var(--qr-hairline);
}

#mainNav.navbar-shrink {
    background: rgba(12, 17, 29, 0.92);
}

/* "Boka" and the phone number: mint pills, the same on the desktop bar and the phone bar.
   No display rule here — Bootstrap hides the phone bar's togglers on wide screens and the desktop
   link on narrow ones, and that must stay. */
#mainNav .navbarMainButton,
#mainNav a.navbarMainButton,
.navbar-collapse .navbarMainButton {
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px !important;
    border: 1px solid var(--qr-mint) !important;
    border-radius: var(--qr-radius-pill) !important;
    background: transparent !important;
    color: var(--qr-mint) !important;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 991.98px) {
    /* Logo, Boka, phone and the menu button share one row on a 390px screen. */
    #mainNav .navbar-toggler.navbarMainButton {
        display: inline-flex;
        min-height: 36px;
        padding: 6px 12px !important;
        margin-right: 6px;
        font-size: 13px;
    }
}

#mainNav .navbarMainButton:hover,
#mainNav a.navbarMainButton:hover,
.navbar-collapse .navbarMainButton:hover {
    background: var(--qr-mint) !important;
    color: #0b0f0b !important;
}

@media (min-width: 992px) {
    /* Centre the items on the list, not by making each item a flex box: a hover-opened dropdown
       is positioned from its item's static flow, and a centred flex item put it behind the bar. */
    #mainNav .navbar-nav {
        align-items: center;
    }

    /* Only on wide screens, where the link is shown: flex centres the label in the pill. */
    #mainNav a.navbarMainButton {
        display: inline-flex;
        margin-right: 8px;
    }

    /* The menu hangs from the bar's bottom edge, not from its 25px item: the item gives up its
       positioning, so "top: 100%" is the bar's, while "left: auto" keeps the menu under its link. */
    #mainNav .navbar-nav > .nav-item.dropdown {
        position: static;
    }

    #mainNav .navbar-nav > .nav-item.dropdown > .dropdown-menu {
        top: 100%;
        left: auto;
        margin-top: 0;
    }

    /* An invisible bridge over the bar's padding, so the pointer can travel from the link down
       to the menu without leaving the item and closing it. */
    #mainNav .navbar-nav > .nav-item.dropdown > .dropdown-menu::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        height: 40px;
    }
}

#mainNav .navbar-toggler {
    border-radius: var(--qr-radius-pill) !important;
}

.navbar-nav .dropdown-menu {
    background-color: var(--qr-surface);
    border: 1px solid var(--qr-hairline-strong);
    border-radius: var(--qr-radius-card);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ---------- Page banners ---------- */

/* The banner keeps its photo; the title sits straight in a glass panel instead of a tilted slab. */
.hero-image {
    border-radius: 0;
}

.titleWrapper,
.roomNameWrapper {
    transform: none;
    padding: 16px 28px;
    border: 1px solid var(--qr-hairline-strong);
    border-radius: var(--qr-radius-panel);
    background-color: rgba(12, 17, 29, 0.6);
}

.titleBkg,
.roomNameBkg {
    display: none;
}

.roomName,
.titleWrapper h1,
.titleWrapper .title {
    text-shadow: none;
    letter-spacing: 0.02em;
}

@media (max-width: 767px) {
    .hero-image {
        height: 200px;
    }

    .titleWrapper {
        margin-inline: 16px;
        padding: 12px 20px;
    }
}

/* Category banners on the homepage and the kids page: caption straight, at the foot of the photo. */
figure.effect-goliath {
    border-radius: var(--qr-radius-panel);
    margin-top: 0;
}

figure.effect-goliath h2 {
    transform: none;
    width: 100%;
    bottom: 0;
    padding: 24px 16px 16px;
    background: linear-gradient(to top, rgba(12, 17, 29, 0.9), rgba(12, 17, 29, 0));
    text-shadow: none;
    font-family: var(--qr-display);
    letter-spacing: 0.02em;
}

/* ---------- Cards, lists and accordions ---------- */

.card {
    background-color: var(--qr-surface) !important;
    border: 1px solid var(--qr-hairline) !important;
    border-radius: var(--qr-radius-panel) !important;
}

.card-body {
    color: var(--qr-text);
}

#list .card {
    background-color: var(--qr-surface);
    border: 1px solid var(--qr-hairline);
    margin-bottom: 8px;
}

#list .card:hover {
    background-color: var(--qr-surface-2);
}

#list .card button,
#list .card button:hover {
    background: transparent !important;
    border: 0 !important;
    color: var(--qr-text) !important;
    box-shadow: none;
    text-align: left;
    text-transform: none;
}

#list .card button h5 {
    margin: 0;
    font-size: 16px !important;
}

.list-group-item {
    background: transparent;
    border-color: var(--qr-hairline);
    color: var(--qr-text);
}

/* The FAQ pages: Bootstrap's old card accordion becomes hairline rows with a plus that turns. */
.accordion .card,
.accordion > .card {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--qr-hairline) !important;
    border-radius: 0 !important;
}

.accordion .card-header {
    padding: 0;
    background: transparent;
    border: 0;
}

.accordion .card-header .btn-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 16px 0;
    color: var(--qr-text) !important;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.accordion .card-header .btn-link::after {
    content: '+';
    flex: none;
    color: var(--qr-mint);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.2s ease;
}

.accordion .card-header .btn-link:not(.collapsed)::after {
    transform: rotate(45deg);
}

.accordion .card-header .btn-link:hover {
    color: var(--qr-mint) !important;
}

.accordion .card-body {
    padding: 0 0 20px;
    color: var(--qr-muted);
}

/* Bootstrap 5's own accordion, used by Quest-to-Go and the like. */
.accordion-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--qr-hairline);
}

.accordion-button {
    padding: 16px 0;
    background: transparent !important;
    color: var(--qr-text) !important;
    font-weight: 700;
    box-shadow: none !important;
}

.accordion-button::after {
    filter: invert(1);
    opacity: 0.7;
}

.accordion-button:not(.collapsed)::after {
    filter: none;
}

.accordion-body {
    padding: 0 0 20px;
    color: var(--qr-muted);
}

/* Package toggles (teambuilding, birthdays): a full-width row that opens its details. */
.btn[data-bs-toggle="collapse"]:not(.btn-link):not(.accordion-button) {
    width: 100%;
    justify-content: space-between;
    border-radius: var(--qr-radius-card) !important;
}

/* ---------- Forms on the older pages ---------- */

.form-control,
.form-select,
select.browser-default,
#wrapper input[type="text"],
#wrapper input[type="email"],
#wrapper input[type="tel"],
#wrapper input[type="number"],
#wrapper textarea,
#wrapper select {
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--qr-hairline-strong);
    border-radius: var(--qr-radius-card);
    background-color: var(--qr-surface-2);
    color: var(--qr-text);
    font-family: var(--qr-body);
    font-size: 16px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus,
#wrapper input:focus,
#wrapper textarea:focus,
#wrapper select:focus {
    border-color: var(--qr-mint);
    background-color: var(--qr-surface-2);
    color: var(--qr-text);
    box-shadow: var(--qr-glow);
    outline: none;
}

.form-control::placeholder,
#wrapper textarea::placeholder {
    color: var(--qr-faint);
}

.form-select,
#wrapper select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2342dca3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}

.form-check-input {
    border-color: var(--qr-hairline-strong);
    background-color: var(--qr-surface-2);
}

.form-check-input:checked {
    background-color: var(--qr-mint);
    border-color: var(--qr-mint);
}

.table {
    color: var(--qr-text);
    border-color: var(--qr-hairline);
}

/* ---------- Sections ---------- */

/* /book is the booking section and nothing else: it sits on the ground like on the homepage,
   not in the surface-coloured box the page template wraps every page body in. */
section#book.content-section {
    background-color: var(--qr-bg) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.content-section {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
}

/* The quotes and payment bands used to tilt a degree; the system keeps its geometry straight. */
#qoutes.content-section,
#accepted-payments.content-section {
    transform: none;
    width: 100%;
    margin: 0;
}

/* ---------- Footer ---------- */

#contact {
    border-top: 1px solid var(--qr-hairline);
}

#contact .subtitle {
    font-size: 22px !important;
}

#contact p {
    font-size: 15px;
}

#contact a {
    color: var(--qr-text);
}

#contact a:hover {
    color: var(--qr-mint);
}

#contact .fa-caret-right {
    color: var(--qr-faint);
}

#contact .green,
#contact a.green {
    color: var(--qr-mint);
}

/* ---------- Game page ---------- */

.counter .counters-item .fs-2 {
    font-family: var(--qr-display);
    letter-spacing: 0.02em;
}

.grid figure {
    border-radius: var(--qr-radius-card);
}

/* ---------- Dialogs ---------- */

div:where(.swal2-container) div:where(.swal2-popup) {
    border: 1px solid var(--qr-hairline-strong);
    border-radius: var(--qr-radius-panel);
}

.swal2-styled.swal2-select-btn {
    border-radius: var(--qr-radius-pill);
    background: transparent;
    border: 1px solid var(--qr-hairline-strong);
    color: var(--qr-text);
}

.swal2-styled.swal2-select-btn:hover {
    border-color: var(--qr-mint);
    color: var(--qr-mint);
    background: transparent;
}

.iziModal {
    background-color: var(--qr-surface) !important;
    border-radius: var(--qr-radius-panel);
}
