/* ============================================================
   registerflow.css
   Self-contained styles for the register / resend-register pages.
   All selectors use the .reg-* prefix so nothing here collides with
   logingpsbob.css, register.css, checkregistration.css or any base
   stylesheet. Pages keep their existing IDs (#txtName, #SubmitRegister
   etc.) so loginscript.js / qr.js / register.js continue to bind.
   ============================================================ */

/* Page shell: full-viewport flex container that vertically centres the
   card on desktop and lets the page scroll naturally on mobile. */
.reg-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* Card: glass-style panel. width:min() gives us a single rule that
   caps the width on desktop while still respecting narrow viewports. */
.reg-card {
    width: min(420px, 100%);
    background: linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,1.0) 100%);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.22);
    padding: 20px 22px 24px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    color: #1f2937;
}

.reg-card * { box-sizing: border-box; }

/* "Didn't get your link?" link sitting above the logo. */
.reg-resend {
    text-align: center;
    margin: 0 0 8px;
}
.reg-resend .ReSendRegistration {
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
    color: rgba(0,0,0,.78);
    font-size: 13px;
    background: rgba(255,255,255,.18);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* Logo block. Used by both #LogoPanel <img> (v2) and #LoginLogo background
   (v1 base64 logo) — the .reg-logo wrapper centres either approach. */
.reg-logo {
    background: #ffffff;
    border-radius: 14px;
    padding: 10px;
    margin: 0 auto 6px;
    max-width: 280px;
    text-align: center;
}
.reg-logo img {
    max-width: 100%;
    max-height: 64px;
    height: auto;
    display: block;
    margin: 0 auto;
}
/* v1 fallback: when the logo is a CSS background-image on a div (no <img>),
   give it a sensible height and aspect ratio. */
.reg-logo.reg-logo-bg {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 64px;
    padding: 6px;
}

.reg-title {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 4px 0 14px;
}

/* SSO buttons (v2 only — v1 doesn't expose them) */
.reg-sso {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.reg-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: box-shadow .12s ease, transform .12s ease;
}
.reg-sso-btn:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.10); transform: translateY(-1px); }
.reg-sso-btn i { font-size: 18px; }

/* Inline message box used by loginscript.js's ShowMessage helper. */
.reg-message {
    border: 1px solid #00C98E;
    background: #ffffff;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 8px 0 14px;
    text-align: center;
}
.reg-message #MessageLabel { color: #464646; display: block; margin-bottom: 8px; }
.reg-message .CloseMessageBox {
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
    color: #1f2937;
    font-size: 13px;
}

/* Field row: label stacked above input. */
.reg-field { display: block; margin-bottom: 10px; }
.reg-field-label {
    display: block;
    font-size: 13px;
    color: #2c2c2c;
    margin-bottom: 4px;
}
.reg-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px; /* 16px stops iOS from focus-zooming and shifting layout */
    color: #1e3a8a;
    background: #ffffff;
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.35);
    outline: none;
    transition: box-shadow .12s ease, border-color .12s ease;
}
.reg-input:focus {
    border-color: rgba(0,201,142,0.80);
    box-shadow: 0 10px 26px rgba(0,0,0,0.14), 0 0 0 4px rgba(0,201,142,0.16);
}
/* Selects share the same look as inputs. */
select.reg-input { padding: 9px 12px; appearance: auto; }

/* QR scan trigger row. Class .camerascan is the existing JS hook. */
.reg-scan {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin: 4px 0 10px;
    background: rgba(255,255,255,0.55);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #2c2c2c;
}
.reg-scan i { color: #00C98E; font-size: 18px; }

/* QR scanner panel (qr.js mounts the camera feed into #qrreader). */
.reg-qr-wrap {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
}
.reg-qr-wrap #qrreader { width: 100%; }
.reg-qr-tip { font-size: 12px; color: #555; margin: 8px 0 0; }

/* Primary submit button. Kept as a <div> with an inner <label> so
   loginscript.js's lockRegBtn helper (which sets the label text to
   "Registering..." while in-flight) still works. */
.reg-submit {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin-top: 6px;
    background: linear-gradient(135deg, #00C98E, #00b07a);
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.20);
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
    transition: transform .12s ease, box-shadow .12s ease;
}
.reg-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 40px rgba(0,0,0,0.28); }
.reg-submit:active { transform: translateY(0); }
.reg-submit label {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.reg-secondary {
    display: inline-block;
    text-align: center;
    margin-top: 14px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
    color: #1f2937;
    font-size: 13px;
    background: rgba(255,255,255,0.18);
    padding: 4px 8px;
    border-radius: 6px;
}

.reg-foot { text-align: center; margin-top: 14px; }

/* Post-registration / post-check success block */
.reg-success p {
    text-align: center;
    color: #2c2c2c;
    margin: 6px 0;
    line-height: 1.4;
}
.reg-success .reg-success-title { font-size: 18px; font-weight: 700; }
.reg-success .reg-back {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 22px;
    background: #00C98E;
    color: #ffffff;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

/* Optional advert image rendered below the auth card on pages that want
   one (e.g. Forgot Password). Background-image is supplied inline via the
   model's base64 logo data. The cshtml sets cursor:pointer + onclick when
   a click-through URL is provided. */
.reg-advert {
    display: block;
    margin: 20px auto 0;
    width: min(420px, 100%);
    height: 220px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
    background-color: rgba(255,255,255,0.10);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform .15s ease, box-shadow .15s ease;
}
.reg-advert.reg-advert-link {
    cursor: pointer;
}
.reg-advert.reg-advert-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(0,0,0,.45);
}

/* Tablets and phones */
@media (max-width: 760px) {
    .reg-shell { padding: 12px 10px; align-items: flex-start; }
    .reg-card { padding: 16px 14px 20px; border-radius: 18px; }
    .reg-title { font-size: 22px; }
    .reg-advert { height: 160px; }
}

/* Below 600px the advert can feel cramped — hide it so the card has the
   full focus on small phones. */
@media (max-width: 600px) {
    .reg-advert { display: none; }
}
