/* Auth Journey — step and modal styles */

.aj-step {
}

.aj-step__title {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.2;
    color: white;
}

.aj-step__intro {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.aj-step__switch {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.aj-step__switch-link {
    color: #ffd700;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 4px;
}

.aj-step__actions {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.aj-step__actions input[type=submit],
.aj-step__actions button[type=submit] {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 18px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, #fffbe6 0%, #ffd700 30%, #b8860b 70%, #8b6914 100%);
    color: #000;
    border: none;
    text-align: center;
    box-sizing: border-box;
}

/* Section headings within a step */
.aj-step__section-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Summary list */
.aj-review__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin: 0 0 8px;
    font-size: 14px;
}

.aj-review__list dt {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}

.aj-review__list dd {
    margin: 0;
    color: white;
}

/* Payment preference */
.aj-payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.aj-payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    color: white;
    font-size: 14px;
}

.aj-payment-option input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin: 0;
    cursor: pointer;
    accent-color: #ffd700;
    flex-shrink: 0;
}

/* PEP info block */
.aj-pep-info {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(255, 215, 0, 0.4);
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* KYC drop zones */
.aj-kyc-uploads {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.aj-kyc-field {
    flex: 1;
    min-width: 0;
}

.aj-kyc-field input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.aj-kyc-dropzone {
    position: relative;
    border: 2px dashed rgba(184, 134, 11, 0.5);
    border-radius: 10px;
    height: 130px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aj-kyc-dropzone:hover,
.aj-kyc-dropzone.is-over {
    border-color: #ffd700;
    background: rgba(184, 134, 11, 0.06);
}

.aj-kyc-dropzone__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.aj-kyc-dropzone__icon {
    font-size: 28px;
    line-height: 1;
}

.aj-kyc-dropzone__label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.aj-kyc-dropzone__placeholder small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

.aj-kyc-dropzone__preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.aj-kyc-dropzone__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.aj-kyc-dropzone__remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Terms content — base box, also used as-is by the Marketing panel's plain
   content box (raw content, no title/scroll/checkbox-bar structure). */
.aj-terms-content {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
}

/* On the Terms panel specifically, each box also has a title and a checkbox
   bar — fixed header/scrollable body/fixed footer, like a mini modal. Header
   and footer sit outside __scroll as real siblings (not overlaid via sticky),
   so there's no need to reserve padding in __body for them. */
.aj-step--terms .aj-terms-content {
    max-height: none;
    overflow: hidden;
    padding: 0;
}

.aj-terms-content__title {
    margin: 0;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.aj-terms-content__scroll {
    max-height: 300px;
    overflow-y: auto;
}

.aj-terms-content__body {
    padding: 16px;
}

.aj-terms-content__checkbox-bar {
    padding: 12px 16px;
    background: rgba(20, 20, 20, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* OTP resend */
.aj-resend {
    font-size: 14px;
    margin-bottom: 16px;
}


/* Marketing opts hidden when unsubscribed */
.aj-marketing-opts.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Marketing preferences panel + warning banner (bindMarketing() in authjourney.js) */
.aj-marketing-panel {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
}

.aj-marketing-opts .checkbox-field + .checkbox-field {
    margin-top: 8px;
}

.aj-marketing-warning {
    background: rgba(252, 185, 43, 0.12);
    border: 1px solid rgba(252, 185, 43, 0.4);
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #FCB92B;
    /* Sits after all the checkboxes, right before the Continue button, so
       it's fine for it to push that button down/up when it appears. */
    display: none;
}

.aj-marketing-warning.is-visible {
    display: block;
}
/* =========================================================
   Scroll Lock
========================================================= */

.aj-lock {
    overflow: hidden;
}


/* =========================================================
   Modal Wrapper
========================================================= */

.aj-modal {
    font-size: 12px;
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.aj-modal.is-active {
    pointer-events: auto;
}


/* =========================================================
   Overlay
========================================================= */

.aj-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.aj-modal.is-active .aj-overlay {
    opacity: 1;
}


/* =========================================================
   Sliding Container
========================================================= */

.aj-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    height: 100%;
    max-height: 100%;
    background: #000;
    color: white;

    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(.22,.8,.22,1);

    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
}

.aj-modal.is-active .aj-container {
    transform: translateY(0);
}


/* =========================================================
   Desktop — Top Drop-in Panel
========================================================= */

@media (min-width: 720px) {
    .aj-modal:not(.aj-modal--phone) .aj-container {
        position: absolute;
        top: 24px;
        left: 50%;
        right: auto;
        bottom: auto;

        width: 640px;
        max-width: calc(100% - 40px);
        height: auto;
        max-height: 90vh;

        border-radius: 16px;
        overflow: hidden;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(184, 134, 11, 0.5) transparent;

        /* Gold gradient border — same treatment as game tiles */
        background:
            linear-gradient(#000, #000) padding-box,
            radial-gradient(ellipse at center, #fffbe6 0%, #ffd700 30%, #b8860b 60%, #8b6914 80%, #fffbe6 100%) border-box;
        border: 3px solid transparent;

        transform: translate(-50%, -30px);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .aj-modal:not(.aj-modal--phone).is-active .aj-container {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    .aj-modal:not(.aj-modal--phone) .aj-container::-webkit-scrollbar {
        width: 4px;
    }

    .aj-modal:not(.aj-modal--phone) .aj-container::-webkit-scrollbar-track {
        background: transparent;
        margin: 16px 0;
    }

    .aj-modal:not(.aj-modal--phone) .aj-container::-webkit-scrollbar-thumb {
        background: rgba(184, 134, 11, 0.5);
        border-radius: 4px;
    }

    .aj-modal:not(.aj-modal--phone) .aj-container::-webkit-scrollbar-thumb:hover {
        background: rgba(184, 134, 11, 0.8);
    }
}


/* =========================================================
   Shell Buttons (Back + Close) — fixed to top of container
========================================================= */

.aj-back {
    position: absolute;
    top: 16px;
    left: 16px;

    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    z-index: 30;
    padding: 6px 10px;
    border-radius: 10px;
}

.aj-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* =========================================================
   Close Button
========================================================= */

.aj-close {
    position: absolute;
    top: 16px;
    right: 16px;

    border: none;
    background: transparent;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 30;
    padding: 6px 10px;
    border-radius: 10px;
    opacity: 0.6;
}

.aj-close:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.aj-close.is-disabled {
    opacity: 0.2;
    pointer-events: none;
    cursor: default;
}


/* =========================================================
   Replace Zone
========================================================= */

.aj-replace {
    padding: 70px 30px 40px;
    width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   Loading Overlay
========================================================= */

.aj-loading {
    position: absolute;
    inset: 0;
    background: #000;

    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;

    z-index: 40;
}

.aj-loading-text {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    max-width: 320px;
}


/* =========================================================
   Spinner
========================================================= */

.aj-spinner {
    width: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    line-height: 1;
    color: #ffd700;
}

.aj-loading .aj-spinner {
    font-size: 36px;
}

.aj-wait__retry--hidden {
    display: none;
}


/* =========================================================
   Content typography / layout helpers
========================================================= */

.aj-content {
    display: block;
}

.aj-header {
    margin-bottom: 14px;
}

.aj-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: white;
}

.aj-body p {
    margin: 0 0 10px;
    color: white;
}

.aj-error {
    width: 100%;
    background: rgba(180, 0, 0, 0.2);
    color: #ff7070;
    border: 1px solid rgba(255, 80, 80, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.aj-total {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 3px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04);
}

.aj-total__label {
    font-size: 14px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}

.aj-total__value {
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
    color: #ffd700;
}

.aj-total__value .js-aj-total {
    font-variant-numeric: tabular-nums;
}

.aj-price {
    font-size: 14px;
    margin: 12px 0 24px 0 !important;
    color: rgba(255, 255, 255, 0.6);
}

.aj-price__label {
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.55);
}

.aj-price__value {
    font-weight: 700;
    font-size: 16px;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}


/* =========================================================
   Waiting Panel
========================================================= */

.aj-wait__row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.aj-wait__subtitle {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.aj-wait__hint {
    margin: 8px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.aj-wait__muted {
    margin: 6px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.aj-body p.aj-wait__charge-note {
    margin: -4px 0 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.aj-wait__ref {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.aj-wait__ref-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.aj-wait__ref-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 16px;
    font-weight: 600;
    color: white;
    word-break: break-word;
}

.aj-wait__ref-item + .aj-wait__ref-item {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.aj-wait__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* =========================================================
   Buttons
========================================================= */

.aj-btn {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 20px;
}

.aj-btn-stacked {
    width: 100%;
    margin-top: 20px;
}

.aj-retry-state {
    margin-bottom: 20px;
}

.aj-retry-state__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.aj-retry-state__subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* Gold — continue journey: retry */
.aj-btn.aj-wait__retry {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    font-size: 18px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(180deg, #fffbe6 0%, #ffd700 30%, #b8860b 70%, #8b6914 100%);
    color: #000;
    border: none;
    text-align: center;
    box-sizing: border-box;
}

/* Gold — continue journey: game exit choices (play winnings / pay out) */
.aj-btn-stacked {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 14px;
    font-size: 18px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, #fffbe6 0%, #ffd700 30%, #b8860b 70%, #8b6914 100%);
    color: #000;
    border: none;
    text-align: center;
    box-sizing: border-box;
}

/* Purple — secondary: close on error / contact support */
.aj-btn:not(.aj-wait__retry) {
    display: inline-block;
    padding: 8px 16px;
    font-size: 18px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, #fffbe6 0%, #ffd700 30%, #b8860b 70%, #8b6914 100%);
    color: #000;
    border: none;
    text-align: center;
    box-sizing: border-box;
}


/* =========================================================
   Form Fields
========================================================= */

.aj-modal .field {
    width: 100%;
    display: inline-block;
}

.aj-modal .field.eighteen {
    /* The DOB field above contributes no bottom margin of its own — its
       selects are deliberately excluded from the generic
       input:not([type=checkbox])/select:not(.dateselectorfield) margin rule
       above (see the .dateselector comment) — so this needs its own
       top margin too, not just bottom, to get breathing room on both sides. */
    margin-top: 10px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .aj-modal .field.eighteen {
        margin-bottom: 0;
    }
    .aj-modal .field {
        display: block;
    }
}

.aj-modal .field .field-holder {
    display: inline-block;
}

.aj-modal .field .label-edit {
    display: inline-block;
    margin-bottom: 6px;
    text-align: left;
    color: white;
}

.aj-modal .field .checkbox-labels {
    font-family: 'Open Sans', sans-serif;
    margin-top: 2px;
    color: white;
}

.aj-modal input:not([type=checkbox]):not([type=submit]):not([type=radio]),
.aj-modal select:not(.dateselectorfield) {
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    padding-left: 10px;
    padding-right: 10px;
    width: calc(100% - 17px) !important;
    background-color: #1c1a14 !important;
}

.aj-modal input:not([type=checkbox]):not([type=submit])::placeholder,
.aj-modal select:not(.dateselectorfield)::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.aj-modal .field.InternationalPhoneNumberField {
    display: inline-block !important;
}

.aj-modal .field.InternationalPhoneNumberField input {
    width: 100% !important;
}

/* Date of birth / expiry — screen.css lays these out with inline-block +
   32.3% widths, which is prone to wrapping once whitespace between the
   selects eats into that budget inside the modal's narrower width.
   Flex removes the whitespace-gap issue entirely. */
.aj-modal .dateselector {
    display: flex !important;
    gap: 8px;
    width: 100%;
}

.aj-modal .idExpiryDate .dateselector {
    margin-bottom: 10px;
}

.aj-modal .dateselectorfield {
    flex: 1;
    width: auto !important;
    min-width: 0;
}

.aj-modal #termsAndConditions .label-edit,
.aj-modal #competitionTermsAndConditions .label-edit {
    display: none;
}

@media (min-width: 768px) {
    .aj-modal #termsAndConditions .label-edit,
    .aj-modal #competitionTermsAndConditions .label-edit {
        display: inline-block;
    }
}

.aj-modal .terms-and-conditions div {
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* Flex, not float — floated checkbox + label align at their top edges,
   which rarely lines up with the label's text baseline since the native
   checkbox's height and the label's line-height don't match. Centering
   them on the cross-axis instead keeps the box level with the text
   regardless of either one's size. */
.aj-modal .checkbox-field .field-holder {
    display: flex;
    align-items: center;
}

.aj-modal .checkbox-field input {
    margin-right: 5px;
    width: 18px;
    height: auto;
    flex-shrink: 0;
}

.aj-modal .checkbox-field label {
    margin-left: 0;
    color: white;
}

.aj-modal .checkbox-field .yes-divider div {
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.6);
}

.aj-modal .message.error {
    background: rgba(180, 0, 0, 0.2);
    color: #ff7070;
    border-color: rgba(255, 80, 80, 0.35);
}

.aj-modal .message.good {
    background: rgba(0, 130, 0, 0.2);
    color: #6bff8a;
    border-color: rgba(80, 200, 80, 0.35);
}

.aj-modal .country-name {
    color: black;
}

/* =========================================================
   Form Action Buttons
========================================================= */

/* Gold — continue journey: form submit */
.aj-modal .Actions {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 20px;
}

.aj-modal .Actions input[type=submit],
.aj-modal .Actions button[type=submit] {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 18px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, #fffbe6 0%, #ffd700 30%, #b8860b 70%, #8b6914 100%);
    color: #000;
    border: none;
    text-align: center;
    box-sizing: border-box;
}

/* Purple — secondary: resend OTP code */
.aj-modal .js-aj-resend {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    background: linear-gradient(180deg, #fffbe6 0%, #ffd700 30%, #b8860b 70%, #8b6914 100%);
    color: #000;
    border: none;
    text-align: center;
    box-sizing: border-box;
}

.aj-modal .js-aj-resend.is-disabled,
.aj-modal .js-aj-resend:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
