/* =========================================================
   Scroll Lock
========================================================= */

.mj-lock {
    overflow: hidden;
}


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

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

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


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

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

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


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

.mj-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);
}

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


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

@media (min-width: 720px) {
    .mj-modal:not(.mj-modal--phone) .mj-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;

        /* 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;
    }

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


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

.mj-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;
}

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

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


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

.mj-replace {
    padding: 70px 20px 40px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}


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

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

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

    z-index: 40;
}

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


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

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

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

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


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

.mj-content {
    display: block;
}

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

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

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

.mj-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;
}

.mj-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);
}

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

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

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

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

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

.mj-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
========================================================= */

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

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

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

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

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

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

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

.mj-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;
}

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

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


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

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

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

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

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

.mj-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 */
.mj-btn.mj-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) */
.mj-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 */
.mj-btn:not(.mj-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
========================================================= */

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

.mj-modal .field.Eighteen {
    margin-bottom: 10px;
}

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

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

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

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

.mj-modal input:not([type=checkbox]):not([type=submit]),
.mj-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;
}

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

.mj-modal .field.InternationalPhoneNumberField {
    width: calc(100% - 17px) !important;
    display: inline-block !important;
}

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

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

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

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

.mj-modal .checkbox-field input {
    float: left;
    margin-right: 5px;
    width: 18px;
    height: auto;
}

.mj-modal .checkbox-field label {
    margin-left: 0;
    float: left;
    width: calc(100% - 23px);
    color: white;
}

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

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

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

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

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

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

.mj-modal .Actions input[type=submit],
.mj-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 */
.mj-modal .js-mj-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;
}

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