/*
 * Hotspot sign-in page styles (HotspotLoginPage.ss), for every layout. Rules that can only
 * match the "modern" layout's markup go in portal-modern.css, which only that layout loads,
 * after this file: a modern rule placed here would cost every other site's guests.
 *
 * Served by HotspotPortalAssetController at /hotspot-assets/portal.<version>.css, where the
 * version is a hash of this file, so a change reaches phones at once and an unchanged file
 * is cached for a year. Everything that depends on the site stays in the page itself: the
 * brand colours (--primary, --panel, --text on :root) and the side panel's background
 * image (.visual::before) are written inline by HotspotLoginPage.ss.
 *
 * Why it is not inline: iOS does not open the sign-in sheet when the page's HTML is over
 * about 128 KB, and this file and portal.js made up 88% of it (see docs/HOTSPOT_PORTAL_PAGE.md).
 */
:root {
    --bg: #efeae3;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", "Segoe UI", sans-serif;
    color: var(--text);
    background: #efeae3;
    background: radial-gradient(circle at 15% 10%, #fff5e7 0%, var(--bg) 45%, #e3dbd2 100%);
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.hero {
    width: 100%;
    max-width: 980px;
    display: grid;
    /* minmax(0, …): a long unbreakable line must not widen the card past the screen */
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 55px rgba(44, 24, 16, 0.16);
    background: var(--panel);
}

.visual {
    padding: 44px;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.visual::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.12;
}

.visual > * {
    position: relative;
    z-index: 1;
}

.brand {
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    text-transform: uppercase;
    opacity: 0.95;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site {
    margin-top: 18px;
    font-size: 2.05rem;
    line-height: 1.15;
    font-weight: 700;
}

.helper {
    margin-top: 16px;
    font-size: 0.95rem;
    opacity: 0.92;
    line-height: 1.45;
    max-width: 36ch;
}

.panel {
    padding: 40px 34px;
    background: var(--panel);
    min-width: 0;
}

.title {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.2;
    color: var(--text);
}

.logo {
    display: block;
    max-height: 44px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    margin-bottom: 12px;
}

/* Brand header layout / alignment helpers — apply to .panel and .modern-topbar */
.brand-header {
    display: flex;
    margin-bottom: 12px;
    gap: 10px;
    max-width: 100%;
    min-width: 0;
}
.brand-header.brand-header--stack { flex-direction: column; align-items: flex-start; }
.brand-header.brand-header--inline { flex-direction: row; align-items: center; }
.brand-header.brand-header--align-left { justify-content: flex-start; text-align: left; }
.brand-header.brand-header--align-center { justify-content: center; text-align: center; }
.brand-header.brand-header--align-right { justify-content: flex-end; text-align: right; }
.brand-header.brand-header--stack.brand-header--align-center { align-items: center; }
.brand-header.brand-header--stack.brand-header--align-right { align-items: flex-end; }
.brand-header .brand-header__logo {
    display: block;
    object-fit: contain;
    margin: 0;
}
.brand-header.brand-header--logo-sm .brand-header__logo { max-height: 32px; max-width: 160px; }
.brand-header.brand-header--logo-md .brand-header__logo { max-height: 44px; max-width: 220px; }
.brand-header.brand-header--logo-lg .brand-header__logo { max-height: 64px; max-width: 280px; }
.brand-header .brand-header__text {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    line-height: 1.35;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}
.brand-header.brand-header--inline .brand-header__text {
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: none;
}

.subtitle {
    margin-top: 10px;
    color: #78695f;
    line-height: 1.4;
    font-size: 0.95rem;
}

/* Title/subtitle centering controlled by the dashboard editor */
.screen--title-center .title,
.screen--title-center .subtitle,
.screen--title-center .context-line {
    text-align: center;
}

.pre-content {
    margin-top: 14px;
    border-radius: 12px;
    border: 1px solid #eadfce;
    background: #fffaf5;
    padding: 12px 13px;
    color: #5a3a27;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-line;
}

.package-highlights {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.package-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f6ece1;
    color: #7a3f20;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 10px;
}

.pricing-table-wrap {
    margin-top: 10px;
    border: 1px solid #eadfce;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.pricing-table thead {
    background: #f8f1e8;
    color: #7a5b45;
}

.pricing-table th,
.pricing-table td {
    padding: 8px 10px;
    text-align: left;
}

.pricing-table tbody tr {
    border-top: 1px solid #f0e6d9;
    color: #5a3a27;
}

.message {
    margin-top: 18px;
    border-radius: 14px;
    padding: 13px 14px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.message.error {
    background: #fff1f1;
    border: 1px solid #f0c3c3;
    color: #9f1d1d;
}

.message.success {
    background: #ebf8ef;
    border: 1px solid #b9e3c6;
    color: #0d7a44;
}

.message.compat {
    background: #fff8e8;
    border: 1px solid #efd8a3;
    color: #6a4a17;
}

.message[hidden] {
    display: none;
}

.iphone-tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 18px;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: left;
    background: #f2f6fc;
    border: 1px solid #ccdbf0;
    color: #2d4a72;
}

.iphone-tip[hidden] {
    display: none;
}

.iphone-tip__icon {
    flex: none;
    margin-top: 2px;
    opacity: 0.85;
}

.iphone-tip__info-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    vertical-align: -2px;
}

.form {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #9a897d;
    margin-bottom: 7px;
}

.field {
    width: 100%;
    padding: 12px 14px;
    border-radius: 11px;
    border: 1px solid #e4d9ce;
    background: #fff;
    color: var(--text);
    font-size: 1rem;
}

.phone-country-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 10px;
}

.field:focus {
    outline: 2px solid rgba(184, 92, 42, 0.22);
    border-color: var(--primary);
}

.button {
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 0.96rem;
    cursor: pointer;
}

.button-row {
    margin-top: 4px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

.button.secondary {
    background: #f8efe4;
    color: #7a3f20;
    border: 1px solid #e7d3be;
}

.button.secondary:hover {
    background: #f3e4d4;
}

.terms {
    margin-top: 16px;
    color: #86756a;
    font-size: 0.78rem;
    line-height: 1.45;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    color: #9a897d;
    font-size: 0.82rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4d9ce;
}

.wave-btn {
    margin-top: 8px;
    border: 2px solid #1dc0fb;
    border-radius: 12px;
    background: #fff;
    color: #1a1a2e;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 0.96rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background 0.15s;
}

.wave-btn:hover {
    background: #e8f9fe;
}

.wave-icon {
    width: 22px;
    height: 22px;
}

.wave-group {
    margin-top: 12px;
    padding: 18px 16px 16px;
    background: linear-gradient(180deg, #f4fdff 0%, #ecfaff 100%);
    border: 1px solid #d7edf7;
    border-radius: 18px;
}

.wave-eyebrow {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #1dc0fb;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.wave-heading {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #16313f;
    margin: 0 0 14px;
    line-height: 1.2;
}

.wave-profiles {
    display: grid;
    gap: 10px;
    margin: 0;
}

.wave-profile {
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(22, 49, 63, 0.06);
    cursor: pointer;
    -webkit-transition: -webkit-transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wave-profile:hover {
    box-shadow: 0 4px 12px rgba(22, 49, 63, 0.1);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

/* Visually hide the radio but keep it accessible (keyboard / screen readers). */
.wave-profile input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    margin: 0;
}

.wave-profile input[type="radio"]:focus-visible + .wave-profile-body {
    outline: 2px solid #1dc0fb;
    outline-offset: 4px;
    border-radius: 6px;
}

.wave-profile-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.wave-profile::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #cdd7dd;
    border-radius: 50%;
    flex-shrink: 0;
    background: #fff;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wave-profile.is-selected::before {
    border-color: #fff;
    background: #fff;
    box-shadow: inset 0 0 0 4px #1dc0fb;
}

.wave-profile-name {
    font-weight: 800;
    font-size: 1.02rem;
    color: #16313f;
    line-height: 1.2;
}

.wave-profile-meta {
    font-size: 0.84rem;
    color: #6b7e8a;
    line-height: 1.2;
}

.wave-profile-price {
    font-weight: 800;
    font-size: 1.25rem;
    color: #1dc0fb;
    white-space: nowrap;
    line-height: 1;
}

.wave-profile.is-selected {
    background: #1dc0fb;
    background: linear-gradient(135deg, #1dc0fb 0%, #1aa8db 100%);
    box-shadow: 0 8px 22px rgba(29, 192, 251, 0.32);
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.wave-profile.is-selected .wave-profile-name,
.wave-profile.is-selected .wave-profile-meta,
.wave-profile.is-selected .wave-profile-price {
    color: #fff;
}

.wave-trust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #d7edf7;
    font-size: 0.78rem;
    color: #6b7e8a;
}

.wave-trust-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wave-trust-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: #d7f0fb;
    color: #1dc0fb;
    text-transform: uppercase;
}

.wave-status {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #6f6258;
    min-height: 1.2em;
}

.connected-shell {
    width: 100%;
    max-width: 680px;
    background: var(--panel);
    border-radius: 28px;
    box-shadow: 0 20px 55px rgba(44, 24, 16, 0.16);
    padding: 44px 34px;
    text-align: center;
}

.connected-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    margin-bottom: 18px;
    background: #ebf8ef;
    color: #0d7a44;
    font-size: 2rem;
    font-weight: 700;
}

.connected-title {
    margin: 0;
    font-size: 1.9rem;
    color: var(--text);
}

.connected-copy {
    margin: 14px auto 0;
    max-width: 48ch;
    color: #6f6258;
    line-height: 1.5;
}

.connected-time {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 22px auto 0;
    padding: 16px 28px;
    border-radius: 18px;
    background: #ebf8ef;
    border: 1px solid rgba(13, 122, 68, 0.18);
}

.connected-time__label {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0d7a44;
    font-weight: 600;
}

.connected-time__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b5c34;
    font-variant-numeric: tabular-nums;
}

.connected-action {
    display: inline-block;
    margin: 24px auto 0;
    padding: 13px 30px;
    border: 0;
    border-radius: 999px;
    background: var(--primary, #0d7a44);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.connected-action:hover,
.connected-action:focus {
    opacity: 0.92;
}

.connected-hint {
    margin: 14px auto 0;
    max-width: 42ch;
    font-size: 0.82rem;
    color: #8a7d72;
    line-height: 1.45;
}

.resume-form {
    margin: 0;
}

.resume-alt {
    display: inline-block;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .visual {
        padding: 30px;
    }

    .site {
        font-size: 1.7rem;
    }

    .panel {
        padding: 30px 24px;
    }

    .phone-country-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 12px;
    }

    .hero {
        border-radius: 20px;
    }

    .visual {
        padding: 22px;
    }

    .site {
        font-size: 1.45rem;
    }

    .panel {
        padding: 24px 18px;
    }
}

/* Layout: card - centered single panel, no visual side */
body.layout-card .hero {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
}

body.layout-card .visual {
    display: none;
}

body.layout-card .panel {
    padding: 44px 40px;
    border-radius: 28px;
}

/* Layout: fullscreen - primary-color background, centered card */
body.layout-fullscreen {
    background: var(--primary) !important;
    background: linear-gradient(145deg, var(--primary) 0%, rgba(0, 0, 0, 0.72) 100%) !important;
}

body.layout-fullscreen .hero {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

body.layout-fullscreen .visual {
    display: none;
}

body.layout-fullscreen .panel {
    padding: 44px 40px;
    border-radius: 28px;
}

body.layout-fullscreen .connected-shell {
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

@media (max-width: 600px) {
    body.layout-card .panel,
    body.layout-fullscreen .panel {
        padding: 32px 24px;
    }
}

/* Connecting overlay — shows while a POST is in flight.
   Base styles use only widely-supported properties so legacy
   captive-portal WebViews (Android ≤9, older WebKit) render correctly.
   Modern browsers get progressive enhancements via @supports below. */
.connecting-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 24, 16, 0.55);
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-transition: opacity 0.2s, visibility 0s linear 0.2s;
    transition: opacity 0.2s, visibility 0s linear 0.2s;
}

/* Modern enhancement: blur the page behind the overlay. */
@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))) {
    .connecting-overlay {
        background: rgba(44, 24, 16, 0.4);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
    }
}

/* Modern enhancement: use the new logical-property shorthand. */
@supports (inset: 0) {
    .connecting-overlay { inset: 0; }
}

.connecting-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    -webkit-transition: opacity 0.2s;
    transition: opacity 0.2s;
}

.connecting-card {
    background: var(--panel);
    border-radius: 20px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: 0 20px 55px rgba(44, 24, 16, 0.22);
    max-width: 320px;
    width: 90%;
}

.connecting-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #f0e4d8;
    border-top-color: var(--primary);
    border-radius: 50%;
    -webkit-animation: spin 0.8s linear infinite;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 18px;
}

@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes spin {
    to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

.connecting-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.connecting-sub {
    margin: 8px 0 0;
    font-size: 0.875rem;
    color: #78695f;
}

/* ----- Vertical-specific extras (April 2026) ----- */
.context-line, .modern-context-line {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6b7e8a;
    margin: 0 0 6px;
}
.badge-pills {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.badge-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #2c1810;
    background: rgba(184, 92, 42, 0.08);
    border: 1px solid rgba(184, 92, 42, 0.18);
    border-radius: 999px;
    padding: 4px 10px;
}
.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.78rem;
    color: #4a3826;
    margin: 12px 0;
    line-height: 1.45;
}
.consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--brand, #b85c2a);
}
.consent a {
    color: var(--brand, #b85c2a);
    text-decoration: underline;
}
.secondary-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    transition: background 0.15s, opacity 0.15s;
}
.secondary-cta--outline, .modern-secondary-cta--outline {
    background: transparent;
    border: 1.5px solid var(--brand, #b85c2a);
    color: var(--brand, #b85c2a);
}
.secondary-cta--outline:hover, .modern-secondary-cta--outline:hover {
    background: rgba(184, 92, 42, 0.08);
}
.secondary-cta--ghost, .modern-secondary-cta--ghost {
    background: transparent;
    color: var(--brand, #b85c2a);
    border: 0;
}
.secondary-cta--solid, .modern-secondary-cta--solid {
    background: var(--brand, #b85c2a);
    color: #fff;
}
.secondary-cta--wave, .modern-secondary-cta--wave {
    background: linear-gradient(180deg, #fff, #eaf6ff);
    border: 1.5px solid #7cc8ff;
    color: #0c5485;
}
.secondary-cta--wave:hover, .modern-secondary-cta--wave:hover {
    background: #eaf6ff;
}
.cipa-disclosure {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f3f8f5;
    border: 1px solid #c8e2d2;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0 10px;
    font-size: 0.78rem;
    color: #2c4d3a;
    line-height: 1.45;
}
.cipa-disclosure svg {
    color: #2f7d52;
    flex-shrink: 0;
    margin-top: 1px;
}
.field--numeric-pin {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 14px 12px !important;
}
.modern-voucher-row--pin .field--numeric-pin {
    font-size: 1.4rem;
    letter-spacing: 0.4em;
}
.modern-custom-field {
    margin-top: 12px;
}
.modern-custom-field .field {
    width: 100%;
}
