/* =================================================================
 * Modals — single source of truth for all popup styling
 *
 * Used by:
 *   - Tool modals (signup, out-of-credits, locked-model, etc.) rendered via
 *     <x-tool-modals /> + <x-tool-modal /> components.
 *   - Terms-consent modal in resources/views/layout/master.blade.php
 *     (still inline-overrides only its own classes).
 *   - Bonus credit popup in resources/views/layout/master.blade.php.
 *   - Suspended-account modal in resources/views/partials/suspended-modal.blade.php.
 *
 * If you add a new modal, prefer reusing .signup-popup* classes and add
 * scoped overrides at the bottom of this file rather than introducing a
 * new base.
 * ================================================================= */

/* ── Base signup popup (also used by every tool modal) ──────────── */
.signup-popup-wrapper {
    max-width: 550px;
    margin: 0 auto;
    padding: 20px;
}
.signup-popup {
    background: #1A1A1E;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}
.signup-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.signup-popup-close:hover,
.signup-popup-close:focus {
    color: #fff;
}
.signup-popup-close:active {
    top: 14px;
}
.signup-popup-header .popup-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #EFFB53;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(239, 251, 83, 0.3);
}
.signup-popup-header .popup-icon i {
    font-size: 36px;
    color: #151518;
}
.signup-popup-header h3 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.signup-popup-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    margin-bottom: 20px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}
.signup-popup-benefits {
    background: rgba(30, 30, 35, 0.8);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}
.benefit-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.5;
}
.benefit-row:last-child {
    margin-bottom: 0;
}
.benefit-row i {
    color: #EFFB53;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.benefit-row strong {
    color: #EFFB53;
    font-weight: 600;
}
.benefit-row.signup-bonus-highlight {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(35, 46, 9, 0.92) 0%, rgba(27, 35, 10, 0.96) 100%);
    border: 1px solid rgba(239, 251, 83, 0.45);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    text-align: left;
}
.benefit-row.signup-bonus-highlight span {
    color: #EFFB53;
    font-weight: 700;
}
.benefit-row.signup-bonus-highlight .signup-bonus-highlight-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    flex: 0 0 auto;
}
.benefit-row.signup-bonus-highlight [data-signup-bonus-credits-text] {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: clamp(0.9rem, 1.9vw, 1.05rem);
    line-height: 1.28;
    text-align: left;
}
.signup-credits-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    font-weight: 800;
    color: #EFFB53;
    white-space: nowrap;
}
.signup-credits-inline i {
    font-size: 0.92em;
    line-height: 1;
}
.signup-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    text-decoration: none;
    text-transform: none;
    padding: 18px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
}
.signup-popup-btn i {
    font-size: 20px;
    margin-left: 0;
}
.signup-popup-note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: 18px;
    margin-bottom: 0;
    line-height: 1.5;
    padding: 0 10px;
}
.signup-popup-note strong {
    color: #EFFB53;
    font-weight: 600;
}
.result-signup-nudge {
    margin-top: 20px;
    padding: 30px 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(18, 18, 22, 0.98) 0%, rgba(27, 27, 34, 0.96) 100%);
    border: 1px solid rgba(239, 251, 83, 0.28);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.22);
    color: #fff;
}
.result-signup-nudge-title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 34px;
    line-height: 1.12;
}
.result-signup-nudge-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.6;
}
.result-signup-nudge-copy strong {
    color: #EFFB53;
    font-weight: 700;
}
.result-signup-nudge-actions {
    display: block;
    margin-top: 22px;
}
.result-signup-nudge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 300px;
    padding: 22px 40px;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    text-transform: none;
}
.result-signup-nudge-btn i {
    margin-left: 0;
    font-size: 22px;
}
.mfp-bg {
    background: rgba(0, 0, 0, 0.9) !important;
}
@media (max-width: 767.98px) {
    .signup-popup-wrapper {
        max-width: 360px;
        padding: 12px;
    }
    .signup-popup {
        padding: 30px 16px 20px;
        border-radius: 18px;
    }
    .signup-popup-header .popup-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    .signup-popup-header .popup-icon i {
        font-size: 32px;
    }
    .signup-popup-header h3 {
        font-size: 22px;
        line-height: 1.2;
    }
    .signup-popup-header p {
        font-size: 14px;
        margin-bottom: 20px;
        max-width: 300px;
    }
    .signup-popup-benefits {
        padding: 18px;
        margin-bottom: 22px;
    }
    .benefit-row {
        gap: 12px;
        font-size: 14px;
        margin-bottom: 14px;
    }
    .benefit-row.signup-bonus-highlight {
        padding: 12px 14px;
        gap: 12px;
        align-items: center;
    }
    .benefit-row.signup-bonus-highlight .signup-bonus-highlight-emoji {
        font-size: 24px;
    }
    .benefit-row.signup-bonus-highlight [data-signup-bonus-credits-text] {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    .signup-popup-btn {
        padding: 16px 20px;
        font-size: 16px;
    }
    .signup-popup-note {
        font-size: 12px;
        margin-top: 14px;
    }
    .result-signup-nudge {
        margin-top: 16px;
        padding: 22px 20px;
        border-radius: 18px;
    }
    .result-signup-nudge-title {
        font-size: 26px;
    }
    .result-signup-nudge-copy {
        font-size: 15px;
    }
    .result-signup-nudge-actions {
        margin-top: 18px;
    }
    .result-signup-nudge-btn {
        width: 100%;
        min-width: 0;
        padding: 18px 24px;
        font-size: 16px;
    }
}

/* ── Bonus credit popup (auth user shown after credit grant) ─────── */
.bonus-credit-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
}

.bonus-credit-popup-backdrop[hidden] {
    display: none;
}

.bonus-credit-popup {
    position: relative;
    width: min(100%, 460px);
    padding: 34px 30px 30px;
    border-radius: 18px;
    background: #17171c;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.bonus-credit-popup .signup-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.bonus-credit-popup .signup-popup-header {
    text-align: center;
}

.bonus-credit-popup .popup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: rgba(239, 251, 83, 0.12);
    color: #effb53;
    font-size: 26px;
}

.bonus-credit-popup h3 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
    color: #fff;
}

.bonus-credit-popup p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.bonus-credit-popup-amount {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
}

.bonus-credit-popup-amount i {
    color: var(--theme);
    font-size: 0.82em;
}

.bonus-credit-popup .signup-popup-benefits {
    padding: 0;
    margin: 22px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    text-align: inherit;
    backdrop-filter: none;
}

.bonus-credit-popup .benefit-row.signup-bonus-highlight {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    margin: 0;
    border: 1px solid rgba(239, 251, 83, 0.22);
    border-radius: 12px;
    background: rgba(239, 251, 83, 0.08);
    box-shadow: none;
    color: #fff;
    text-align: center;
    justify-content: center;
}

.bonus-credit-popup .benefit-row.signup-bonus-highlight .signup-bonus-highlight-copy {
    display: block;
    width: 100%;
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
}

.bonus-credit-popup .signup-popup-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    border: 0;
}

/* ── Suspended-account modal (always-on backdrop, danger icon) ───── */
.suspended-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
}

.suspended-popup .popup-icon {
    background: #ef4444;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.suspended-popup .popup-icon i {
    color: #fff;
}

.suspended-popup .signup-popup-benefits {
    margin-bottom: 0;
}

.suspended-modal-backdrop .signup-popup-wrapper {
    max-width: 640px;
}

.suspended-modal-backdrop .signup-popup-header p {
    max-width: 560px;
}
