/* ==========================================================================
   registration.css — storefront registration page (registration/index)
   --------------------------------------------------------------------------
   Scoped to the registration page only (loaded by layout/header_reg.php).
   Goal: one crafted, readable card + centered logo + clean cookie bar that
   hold up over ANY photographer background (red felt, sunset, dark haunt,
   solid color). Neutral, tenant-agnostic palette; boldness spent only on the
   submit button.
   ========================================================================== */

:root {
    --reg-ink:      #1b1e2b;
    --reg-ink-soft: #3a3f52;
    /* Was #737a8c, which is 4.29:1 on white and 4.01:1 on --reg-field-bg — under
       AA for the 0.66-0.86rem text this token carries (eyebrow, subtitle, consent
       copy, photo-pass labels). #5c6377 is 5.99:1 / 5.59:1 and reads the same. */
    --reg-muted:    #5c6377;
    --reg-line:     #e6e8ef;
    --reg-line-2:   #d7dae4;
    --reg-field:    #ffffff;
    --reg-field-bg: #f6f7fb;
    --reg-req:      #c0392b;
}

/* ---- Logo -----------------------------------------------------------------
   style.css (which sets img.logo height) is NOT loaded on registration pages,
   so the logo rendered unconstrained inside a lopsided grid. Constrain + centre
   it here. Markup simplified in header_reg.php to a single centred row. */
#company-logo-container { padding: 12px 0 2px; }
#company-logo-container .reg-logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
}
#company-logo-container img.logo,
#company-logo-container #company-logo {
    max-height: 110px;
    max-width: 72vw;
    width: auto;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* ---- Shell ---------------------------------------------------------------- */
.reg-shell {
    max-width: 560px;
    margin: 0 auto;
    padding: 6px 16px 80px;
    box-sizing: border-box;
}

/* ---- Card ----------------------------------------------------------------- */
.reg-card {
    position: relative;
    background: rgba(255, 255, 255, 0.975);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32), 0 2px 0 rgba(255, 255, 255, 0.5) inset;
    overflow: hidden;
    padding: 38px 34px 32px;
    text-align: left;
    color: var(--reg-ink);
}
/* the one quiet flourish — a hairline accent across the top edge */
.reg-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--reg-ink), #4a5170 55%, var(--reg-ink));
}

@media (max-width: 575px) {
    .reg-shell { padding: 4px 12px 90px; }
    .reg-card  { padding: 30px 20px 26px; border-radius: 18px; }
}

/* ---- Card header ---------------------------------------------------------- */
.reg-card__head { text-align: center; margin-bottom: 24px; }
.reg-card__eyebrow {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--reg-muted);
    margin-bottom: 8px;
}
.reg-card__title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--reg-ink);
    margin: 0 0 6px;
    line-height: 1.15;
    text-shadow: none;
}
.reg-card__subtitle {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--reg-muted);
    margin: 0;
    line-height: 1.45;
}

/* ---- Fields --------------------------------------------------------------- */
.reg-card .reg-field { margin-bottom: 15px; padding: 0; }
.reg-card .reg-field > label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--reg-ink-soft);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

/* inputs / selects / textareas — override BS3 / theme styling */
.reg-card .form-control {
    height: 50px;
    border: 1.5px solid var(--reg-line-2);
    border-radius: 12px;
    background: var(--reg-field);
    color: var(--reg-ink);
    font-size: 1rem;
    box-shadow: none;
    padding: 10px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.reg-card textarea.form-control { height: auto; min-height: 92px; }
.reg-card .form-control::placeholder { color: #aab0be; }
.reg-card .form-control:focus {
    border-color: var(--reg-ink);
    box-shadow: 0 0 0 4px rgba(27, 30, 43, 0.10);
    outline: none;
}

/* input group: seamless icon "addon" fused to the field */
.reg-card .input-group { display: flex; width: 100%; }
.reg-card .input-group .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
    flex: 1 1 auto;
    width: 1%;
}
.reg-card .input-group-addon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 0 12px;
    background: var(--reg-field-bg);
    border: 1.5px solid var(--reg-line-2);
    border-right: none;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    color: #9198a8;
    font-size: 0.95rem;
}
.reg-card .input-group:focus-within .input-group-addon { border-color: var(--reg-ink); color: var(--reg-ink); }
.reg-card .input-group:focus-within .form-control {
    border-color: var(--reg-ink);
    box-shadow: 0 0 0 4px rgba(27, 30, 43, 0.10);
}
.reg-card .input-group-addon .phone-flag { margin-right: 6px; }

/* radio / checkbox option groups rendered inside a .form-control box */
.reg-card .form-control .radio,
.reg-card .form-control .checkbox { margin: 4px 0; }
.reg-card .form-control .radio label,
.reg-card .form-control .checkbox label {
    font-weight: 500;
    color: var(--reg-ink-soft);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Consent -------------------------------------------------------------- */
.reg-consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    margin-top: 4px;
    margin-bottom: 12px;
    background: var(--reg-field-bg);
    border: 1px solid var(--reg-line);
    border-radius: 12px;
}
.reg-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    flex: 0 0 auto;
    accent-color: var(--reg-ink);
    cursor: pointer;
}
.reg-consent label {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--reg-muted);
    cursor: pointer;
}
.reg-consent .reg-consent__req { color: var(--reg-req); font-weight: 700; }

/* ---- Submit --------------------------------------------------------------- */
.reg-card .reg-submit {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 16px 20px;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    border: none;
    border-radius: 13px;
    cursor: pointer;
    background: linear-gradient(180deg, #2a2f42, var(--reg-ink));
    box-shadow: 0 10px 24px rgba(15, 17, 26, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.reg-card .reg-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 17, 26, 0.42);
    filter: brightness(1.08);
}
.reg-card .reg-submit:active { transform: translateY(0); }

/* location select + loading spinner */
.reg-card .reg-field--location { margin-top: 4px; }
#searching { padding: 40px 0; }

/* ==========================================================================
   Photo pass — registration/photopass_view (shown after saveEntry, and at
   /registration/photopass/<code>). Same .reg-card shell as the form, with the
   QR + code laid out as a ticket stub: this screen gets held up to a
   photographer on a phone, so the code is the loudest thing on it.
   ========================================================================== */
.reg-card.reg-pass { padding-bottom: 26px; }

/* Centred to match the ticket below it: the whole pass is one column a customer
   holds up to a photographer, and a left-ragged confirmation line above a
   centred QR reads as two different cards stacked. */
.reg-pass__notice {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    gap: 10px;
    margin: 0 0 20px;
    padding: 12px 15px;
    background: #eef7f1;
    border: 1px solid #cfe6d8;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.45;
    color: #22603d;
}
.reg-pass__notice-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 50%;
    background: #2f7d51;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

/* ---- Ticket (QR + code stub) ---------------------------------------------- */
.reg-pass__ticket {
    border: 1px solid var(--reg-line);
    border-radius: 16px;
    background: var(--reg-field-bg);
    padding: 22px 18px 0;
    overflow: hidden;
}
.reg-pass__qr {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 268px;
    margin: 0 auto;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--reg-line-2);
    border-radius: 12px;
}
/* qrcode.js emits a <canvas> plus a fallback <img>; keep whichever shows square
   and inside the card on a narrow phone. */
.reg-pass__qr canvas,
.reg-pass__qr img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 240px;
}
.reg-pass__qr table { margin: 0 auto; }

.reg-pass__code {
    margin: 18px -18px 0;          /* bleed to the ticket edge for the stub */
    padding: 15px 18px 19px;
    border-top: 2px dashed var(--reg-line-2);
    background: #fff;
    text-align: center;
}
.reg-pass__code-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--reg-muted);
    margin-bottom: 5px;
}
.reg-pass__code-value {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.1;
    color: var(--reg-ink);
    word-break: break-all;
}
@media (max-width: 400px) {
    .reg-pass__code-value { font-size: 1.9rem; letter-spacing: 0.1em; }
}

/* ---- Pre-purchase blocks --------------------------------------------------- */
.reg-pass__block {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--reg-line);
    border-radius: 14px;
    background: var(--reg-field-bg);
    text-align: center;
}
.reg-pass__block--offer {
    background: linear-gradient(180deg, #fff8ef, #fdf1e3);
    border-color: #efdcc2;
}
.reg-pass__block-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--reg-ink);
    margin: 0 0 8px;
}
.reg-pass__block-note {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--reg-muted);
    margin: 0;
}
.reg-pass__items {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    text-align: left;
}
.reg-pass__items li {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--reg-ink-soft);
    padding: 8px 0;
    border-bottom: 1px solid var(--reg-line);
}
.reg-pass__items li:last-child { border-bottom: none; }

.reg-pass__cta {
    display: inline-block;
    margin-top: 14px;
    padding: 13px 26px;
    border-radius: 12px;
    background: linear-gradient(180deg, #2a2f42, var(--reg-ink));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 17, 26, 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.reg-pass__cta:hover,
.reg-pass__cta:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 17, 26, 0.38);
    filter: brightness(1.08);
}
.reg-pass__cta:active { transform: translateY(0); }

/* ---- Foot ------------------------------------------------------------------ */
.reg-pass__foot { margin-top: 22px; text-align: center; }
.reg-pass__back {
    display: inline-block;
    padding: 8px 6px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--reg-muted);
    text-decoration: none;
}
.reg-pass__back:hover,
.reg-pass__back:focus { color: var(--reg-ink); text-decoration: underline; }

.reg-pass__cta:focus-visible,
.reg-pass__back:focus-visible {
    outline: 3px solid rgba(27, 30, 43, 0.4);
    outline-offset: 2px;
}

/* ==========================================================================
   Cookie consent — reg-page-only restyle of the shared .popupWindowCookie
   component into a clean bottom sheet. Only overridden here because
   registration.css loads on registration pages alone. `display` is left to
   the fadeIn/fadeOut JS; !important beats the global width:100% + theme bg.
   ========================================================================== */
.popupWindowCookie {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 24px)) !important;
    min-height: 0 !important;
    padding: 16px 18px !important;
    margin: 0 !important;
    background: rgba(23, 26, 38, 0.94) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.9) !important;
    text-align: left;
}
.popupWindowCookie .h4 { display: none; }            /* redundant "Cookie Consent" heading */
.popupWindowCookie br { display: none; }
.popupWindowCookie .cookie-content-wrapper { gap: 14px; align-items: center; }
.popupWindowCookie .cookie-text {
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}
.popupWindowCookie .cookie-text a { color: #fff; }
.popupWindowCookie .cookie-button {
    margin-left: 0;
    flex: 0 0 auto;
    background: #fff !important;
    color: var(--reg-ink) !important;
    border: 0 !important;
    border-radius: 10px;
    padding: 11px 20px;
    font-weight: 700;
}
.popupWindowCookie .popupWindowCloseCookie { top: 8px; right: 12px; }
