/*
    SwimTech brand look for the portal's public pages (home, sign in), taken value for value from
    Austin's getswimtechapp.com pages and the www home page: dark-water hero, DM Sans, gold
    button, pool-tile stripe.

    Every class is prefixed st- because this file is global: Bootstrap already owns .btn, .badge,
    .card and friends, and an unprefixed copy of Austin's names would fight with them.
*/

.st-page {
    --st-deep: #062A3D;
    --st-water: #0D4761;
    --st-waterline: #14607F;
    --st-aqua: #2ED3C6;
    --st-gold: #FFC24A;
    --st-gold-dk: #E2A32E;
    --st-plaster: #F6FAFB;
    --st-ink: #0B1E28;
    --st-muted: #5B7683;
    --st-line: #DCE7EC;
    --st-haze: #C4DEE9;
    --st-mist: #9FC4D3;

    margin-top: 100px; /* clears the fixed portal header */
    background: var(--st-plaster);
    color: var(--st-ink);
    font-family: 'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* MainLayout caps page content at 1200px and pads its top; these pages run edge to edge. */
.content:has(.st-page) {
    max-width: none;
    padding-top: 0;
}

.st-page *,
.st-page *::before,
.st-page *::after {
    box-sizing: border-box;
}

.st-page a:focus-visible,
.st-page button:focus-visible {
    outline: 3px solid var(--st-gold);
    outline-offset: 4px;
}

.st-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================= HERO ================= */
/* Fills the window under the header, so a short page never leaves a white gap above the footer. */
.st-hero {
    min-height: calc(100vh - 100px - 26px);
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #0A4260 0%, var(--st-deep) 72%, #04202E 100%);
    color: #fff;
    text-align: center;
    padding: 64px 0 72px;
}

.st-hero > .st-wrap {
    width: 100%;
}

.st-eyebrow {
    color: var(--st-aqua);
    font-weight: 700;
    font-size: 17px;
    margin: 0 0 12px;
}

.st-h1 {
    color: #fff;
    font-family: inherit;
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.02;
    font-size: clamp(40px, 6.6vw, 76px);
    max-width: 16ch;
    margin: 0 auto 20px;
    text-wrap: balance;
}

.st-h1 .st-hl {
    color: var(--st-gold);
}

.st-sub {
    font-size: clamp(17px, 2.1vw, 21px);
    color: var(--st-haze);
    max-width: 52ch;
    margin: 0 auto 40px;
}

.st-sub strong {
    color: #fff;
    font-weight: 700;
}

.st-btn {
    display: inline-block;
    border: 0;
    background: var(--st-gold);
    color: var(--st-ink);
    font-family: inherit;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1;
    font-size: clamp(18px, 2.2vw, 21px);
    padding: 22px 40px 20px;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 9px 0 var(--st-gold-dk);
    transition: transform .12s ease, box-shadow .12s ease;
}

.st-btn:hover {
    color: var(--st-ink);
    transform: translateY(3px);
    box-shadow: 0 6px 0 var(--st-gold-dk);
}

.st-btn:disabled {
    cursor: wait;
    opacity: .75;
    transform: none;
}

/* Secondary actions on the dark hero. */
.st-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, .32);
    color: #fff;
    font-weight: 700;
    font-size: 15.5px;
    line-height: 1.4;
    text-decoration: none;
    background: rgba(255, 255, 255, .06);
    transition: border-color .15s ease, background-color .15s ease;
}

.st-ghost:hover {
    color: #fff;
    border-color: var(--st-gold);
    background: rgba(255, 255, 255, .1);
}

.st-ghost i {
    font-size: 14px;
    color: var(--st-gold);
}

/* "New to SwimTech?" and similar rows under the main action. */
.st-aside {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.st-aside-label {
    color: var(--st-mist);
    font-size: 15.5px;
    margin: 0 0 14px;
}

.st-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.st-tileline {
    height: 26px;
    background: repeating-linear-gradient(90deg, var(--st-waterline) 0 24px, #0E4E6B 24px 26px);
    border-top: 2px solid rgba(255, 255, 255, .13);
}

/* A white panel on the hero, for forms. */
.st-card {
    max-width: 440px;
    margin: 0 auto;
    padding: 32px 30px 28px;
    border-radius: 16px;
    background: #fff;
    color: var(--st-ink);
    text-align: left;
    box-shadow: 0 26px 60px rgba(0, 0, 0, .35);
}

/* ================= INNER PAGES ================= */
/* A headline band instead of a full-window hero, for pages whose content is the point
   (forms, the dashboard, legal text). Use as class="st-hero st-band". */
.st-hero.st-band {
    min-height: 0;
    padding: 52px 0 56px;
}

.st-band .st-h1 {
    font-size: clamp(34px, 5vw, 56px);
    max-width: 20ch;
}

.st-band .st-sub {
    margin-bottom: 0;
}

/* The light area under the band. */
.st-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px 64px;
}

.st-body-wide {
    max-width: 1080px;
}

/* A white card on the light background, like the step cards on Austin's pages. */
.st-panel {
    padding: 28px 26px;
    background: #fff;
    border: 1px solid var(--st-line);
    border-radius: 14px;
}

.st-panel + .st-panel {
    margin-top: 20px;
}

.st-panel-title {
    margin: 0 0 16px;
    font-family: inherit;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.015em;
    color: var(--st-ink);
}

.st-page .st-link,
.st-panel a:not([class]) {
    color: var(--st-water);
    font-weight: 700;
}

.st-page .st-link:hover,
.st-panel a:not([class]):hover {
    color: var(--st-waterline);
}

/* A smaller gold button for inside forms and cards. */
.st-btn.st-btn-sm {
    font-size: 17px;
    padding: 16px 26px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 0 var(--st-gold-dk);
    margin-bottom: 6px;
}

.st-btn.st-btn-sm:hover {
    box-shadow: 0 3px 0 var(--st-gold-dk);
}

.st-btn.st-btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Austin's secondary button on a light background. */
.st-ghost-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1.5px solid #C9D8DF;
    border-radius: 10px;
    background: #fff;
    color: var(--st-ink);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease;
}

.st-ghost-light:hover {
    border-color: var(--st-waterline);
    color: var(--st-ink);
}

.st-ghost-light:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.st-ghost-light i {
    color: #12877B;
}

/* Form fields inside .st-form: inputs (including TextBox), selects and textareas. */
.st-form label {
    display: block;
    margin-bottom: 7px;
    color: var(--st-ink);
    font-size: 15px;
    font-weight: 700;
}

.st-form input[type="text"],
.st-form input[type="email"],
.st-form input[type="password"],
.st-form input[type="tel"],
.st-form select,
.st-form textarea {
    width: 100%;
    border: 1px solid var(--st-line) !important;
    border-radius: 10px !important;
    background: var(--st-plaster) !important;
    font-family: inherit !important;
    font-size: 16px !important; /* 16px stops iOS zooming into the field */
    color: var(--st-ink);
}

.st-form input[type="text"],
.st-form input[type="email"],
.st-form input[type="password"],
.st-form input[type="tel"],
.st-form select {
    min-height: 48px;
}

.st-form .st-input {
    padding: 0 14px;
}

.st-form input:focus,
.st-form select:focus,
.st-form textarea:focus {
    border-color: var(--st-waterline) !important;
    box-shadow: 0 0 0 3px rgba(20, 96, 127, .15) !important;
    background: #fff !important;
    outline: none;
}

.st-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.45;
}

.st-alert i {
    margin-top: 3px;
}

.st-alert-error {
    background: #FDECEC;
    border: 1px solid #F5C2C2;
    color: #A12626;
}

.st-alert-success {
    background: #E7F7F2;
    border: 1px solid #B9E5D6;
    color: #0F6B55;
}

.st-alert-info {
    background: #EEF6F9;
    border: 1px solid #D3E6EE;
    color: var(--st-ink);
}

/* ================= PASSWORD PAGES ================= */
/* Forgot, reset and change password: the sign-in page's layout (hero + white card). The generic
   password-* and strength-* names are scoped to .st-card because /register uses the same names
   with its own styles. */
.pw-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 6px 2px;
    border: 0;
    background: none;
    color: #9FC4D3;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.pw-back:hover {
    color: #fff;
}

.pw-title.st-h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.pw-sub.st-sub {
    margin-bottom: 32px;
}

.pw-field {
    margin-bottom: 18px;
}

.st-card .validation-message {
    display: block;
    margin-top: 5px;
    color: #A12626;
    font-size: 14px;
}

.pw-submit {
    margin-top: 8px;
}

.pw-info {
    margin: 22px 0 0;
}

.pw-info ul {
    margin: 0;
    padding-left: 18px;
}

.pw-info li + li {
    margin-top: 3px;
}

.pw-again {
    width: 100%;
    margin-top: 16px;
}

.st-card .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.st-card .password-input-wrapper input {
    flex: 1;
}

.st-card .password-input-wrapper input {
    padding-right: 48px !important;
}

.st-card .password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    color: #5B7683;
    cursor: pointer;
}

.st-card .password-toggle:hover {
    color: #0B1E28;
}

/* Password rules checklist. */
.pw-rules {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #F6FAFB;
    list-style: none;
    font-size: 14px;
    color: #5B7683;
}

.pw-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pw-rules li + li {
    margin-top: 4px;
}

.pw-rules li.met {
    color: #0F6B55;
}

.pw-rules li i {
    color: #C9D8DF;
}

.pw-rules li.met i {
    color: #0F6B55;
}

.pw-rules .special-set {
    padding: 1px 6px;
    border-radius: 4px;
    background: #EEF3F5;
    color: #0B1E28;
    letter-spacing: .08em;
}

.pw-back-below {
    margin: 26px 0 0;
}

.pw-loading {
    color: #C4DEE9;
    font-size: 18px;
}

.pw-loading i {
    margin-bottom: 14px;
    font-size: 30px;
    color: #2ED3C6;
}

/* The gold tick from the thank-you page. */
.pw-done {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #FFC24A;
    color: #0B1E28;
    font-size: 26px;
    box-shadow: 0 0 0 10px rgba(255, 194, 74, .14), 0 0 0 22px rgba(255, 194, 74, .06);
}

.pw-error {
    margin: 16px 0 0;
}

.st-card .password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.st-card .strength-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #DCE7EC;
    overflow: hidden;
}

.st-card .strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .3s ease;
}

.st-card .strength-fill.strength-weak { background: #C0392B; }
.st-card .strength-fill.strength-fair { background: #E2A32E; }
.st-card .strength-fill.strength-good { background: #14607F; }
.st-card .strength-fill.strength-strong { background: #0F6B55; }

.st-card .strength-label {
    min-width: 56px;
    font-size: 14px;
    font-weight: 700;
}

.st-card .strength-label.strength-weak { color: #C0392B; }
.st-card .strength-label.strength-fair { color: #B7791F; }
.st-card .strength-label.strength-good { color: #14607F; }
.st-card .strength-label.strength-strong { color: #0F6B55; }
.pw-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.pw-forgot {
    font-size: 14.5px;
    text-decoration: none;
}

.pw-rules {
    margin-bottom: 20px;
}

@media (max-width: 560px) {
    .st-hero {
        padding: 48px 0 56px;
    }

    .st-card {
        padding: 26px 20px 22px;
    }

    .st-hero.st-band {
        padding: 40px 0 44px;
    }

    .st-body {
        padding: 24px 12px 48px;
    }

    .st-panel {
        padding: 22px 16px;
    }

    .st-actions .st-ghost {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-btn,
    .st-btn:hover {
        transition: none;
        transform: none;
        box-shadow: 0 9px 0 var(--st-gold-dk);
    }
}
