/* ==========================================================================
   Refer & Earn (/refer-and-earn.php)
   Built on the theme's palette and Poppins type; scoped to .refer-page so the
   theme's global rules elsewhere are untouched.
   ========================================================================== */

.refer-page {
    --refer-blue: #0080f6;
    --refer-blue-dark: #0069cc;
    --refer-ink: #001a32;
    --refer-text: #27313d;
    --refer-muted: #5b6573;
    --refer-line: #dfe5e9;
    --refer-tint: #eff7fe;
    background: #fff;
    color: var(--refer-text);
}

.refer-page a:focus-visible {
    outline: 3px solid var(--refer-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

.refer-eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--refer-blue-dark);
}

.refer-heading {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--refer-ink);
}

.refer-lead {
    margin: 0 0 36px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--refer-muted);
}

/* Hero --------------------------------------------------------------------- */

.refer-hero {
    overflow: hidden;
    padding: 72px 0 80px;
    background: var(--refer-tint);
    border-bottom: 1px solid #e1edf9;
}

.refer-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 56px;
}

.refer-hero__title {
    margin: 0 0 20px;
    font-size: 50px;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -.01em;
    color: var(--refer-ink);
}

.refer-hero__amount {
    white-space: nowrap;
    color: var(--refer-blue-dark);
}

.refer-hero__lead {
    max-width: 36em;
    margin: 0 0 30px;
    font-size: 18px;
    line-height: 1.7;
}

.refer-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
}

.refer-hero__actions .btn {
    margin: 0;
}

/* Outline button beside the primary one. !important because the theme's
   .btn-ghost colours use it; its lighter blue is too faint on the tint. */
.refer-hero__actions .refer-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    color: var(--refer-blue-dark) !important;
    border-color: var(--refer-blue-dark) !important;
}

.refer-hero__actions .refer-phone:hover,
.refer-hero__actions .refer-phone:focus {
    color: #fff !important;
    background: var(--refer-blue-dark) !important;
}

/* The font's handset faces the other way; mirror it. */
.refer-phone i {
    font-size: 18px;
    transform: scaleX(-1);
}

/* Gift card illustration, drawn in CSS so it stays sharp and carries the
   configured amount. */
.refer-card-stage {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 24px 0;
}

.refer-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 1.586;
    padding: 26px 28px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .24) 0, rgba(255, 255, 255, 0) 45%),
        linear-gradient(135deg, #0080f6 0%, #0058ad 100%);
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(0, 58, 115, .28);
    transform: rotate(-3deg);
}

.refer-card--back {
    position: absolute;
    top: 24px;
    right: 0;
    left: 0;
    background: #001a32;
    box-shadow: none;
    transform: rotate(5deg) translate(10px, 6px);
}

.refer-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.refer-card__brand {
    font-size: 20px;
    font-weight: 700;
}

.refer-card__type {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.refer-card__value {
    font-size: 60px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
}

.refer-card__note {
    font-size: 14px;
}

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

.refer-section {
    padding: 72px 0;
}

.refer-section--line {
    padding-top: 0;
}

.refer-section--form {
    background: var(--refer-tint);
    scroll-margin-top: 90px;
}

/* The theme resets every ul/li to display:block with no spacing. */
.refer-steps,
.refer-conditions {
    display: grid;
    margin: 0;
    padding: 0;
}

.refer-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    counter-reset: refer-step;
}

.refer-step {
    position: relative;
    padding-top: 66px;
    counter-increment: refer-step;
}

.refer-step:before {
    content: counter(refer-step);
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 46px;
    font-size: 19px;
    font-weight: 700;
    line-height: 46px;
    text-align: center;
    color: #fff;
    background: var(--refer-blue-dark);
    border-radius: 50%;
}

/* Rule joining each step to the next. */
.refer-step:not(:last-child):after {
    content: "";
    position: absolute;
    top: 23px;
    right: -40px;
    left: 58px;
    border-top: 2px solid #cfe3f8;
}

.refer-step h3,
.refer-conditions h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--refer-ink);
}

.refer-step p,
.refer-conditions p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}

.refer-conditions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.refer-conditions li {
    position: relative;
    padding: 24px 26px 24px 62px;
    border: 1px solid var(--refer-line);
    border-radius: 14px;
}

.refer-conditions li:before {
    content: "\eb91";
    position: absolute;
    top: 28px;
    left: 26px;
    font-family: icomoon;
    font-size: 17px;
    line-height: 1;
    color: var(--refer-blue);
}

/* Form ------------------------------------------------------------------------ */

.refer-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: start;
    gap: 56px;
}

.refer-form-intro__help {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
}

.refer-form-intro__help a {
    font-weight: 500;
    color: var(--refer-blue-dark);
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.refer-form {
    padding: 36px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 26, 50, .06), 0 12px 32px rgba(0, 26, 50, .08);
}

.refer-form fieldset {
    margin: 0 0 12px;
}

.refer-form legend {
    margin: 0 0 18px;
    padding: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--refer-ink);
    border: 0;
}

.refer-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

.refer-fields__wide {
    grid-column: 1 / -1;
}

.refer-form .required {
    color: #a90329;
}

.refer-form [aria-invalid="true"] {
    border-color: #a90329;
}

.refer-error {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
}

/* Off-screen rather than display:none, which bots tend to skip. */
.refer-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.refer-consent {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 10px;
    margin-bottom: 22px;
}

.refer-consent input {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
}

.refer-form .refer-consent label {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

.refer-consent .refer-error {
    grid-column: 2;
}

.refer-alert {
    margin-bottom: 20px;
}

.refer-form .btn {
    margin: 0;
}

.refer-form .btn[disabled] {
    opacity: .65;
}

.refer-terms {
    padding: 28px 0 36px;
    background: var(--refer-tint);
    border-top: 1px solid #e1edf9;
}

.refer-terms p {
    max-width: 62em;
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--refer-muted);
}

/* Responsive -------------------------------------------------------------------- */

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

    .refer-hero__grid,
    .refer-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .refer-hero__title {
        font-size: 40px;
    }

    .refer-card-stage {
        max-width: 340px;
    }

    .refer-section {
        padding: 56px 0;
    }

    .refer-section--line {
        padding-top: 0;
    }

    .refer-form-intro .refer-lead {
        margin-bottom: 14px;
    }
}

@media (max-width: 767px) {
    .refer-hero {
        padding: 56px 0 44px;
    }

    .refer-hero__title {
        font-size: 31px;
    }

    .refer-hero__actions .btn {
        flex: 1 1 auto;
    }

    .refer-hero__lead,
    .refer-lead {
        font-size: 16px;
    }

    .refer-lead {
        margin-bottom: 26px;
    }

    .refer-heading {
        font-size: 25px;
    }

    .refer-card {
        padding: 20px 22px;
    }

    .refer-card__value {
        font-size: 46px;
    }

    .refer-section {
        padding: 44px 0;
    }

    .refer-section--line {
        padding-top: 0;
    }

    .refer-steps,
    .refer-conditions,
    .refer-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .refer-steps {
        gap: 26px;
    }

    .refer-step:not(:last-child):after {
        display: none;
    }

    .refer-conditions li {
        padding: 20px 20px 20px 52px;
    }

    .refer-conditions li:before {
        top: 24px;
        left: 20px;
    }

    .refer-form {
        padding: 24px 20px;
    }

    .refer-form .btn {
        width: 100%;
    }
}
