/* ══════════════════════════════════
   Delta Loyalty Modal — v2
   ══════════════════════════════════ */

.delta-welcome-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 35, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9999;
    display: none;
}

.delta-main {
    direction: rtl;
    font-family: inherit;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    position: fixed;
    width: min(440px, 96vw);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

/* ── Header ── */
.delta-header {
    background: #1B2A4A;
    padding: 2rem 1.5rem 2.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.delta-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.delta-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 2rem;
    left: 2rem;
    height: 3px;
    background: #E07233;
    border-radius: 3px 3px 0 0;
}

.delta-header h3 {
    font-weight: 700;
    font-size: 17px;
    margin: 0 0 0.5rem;
    color: #ffffff;
    position: relative;
    z-index: 1;
    line-height: 1.55;
}

.delta-header p {
    font-weight: 400;
    font-size: 12.5px;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

.delta-header p strong {
    color: #f5a05e;
    font-weight: 600;
}

/* ── Form ── */
.delta-form {
    padding: 1.5rem 1.5rem 0;
}

.delta-form div {
    margin-bottom: 0.85rem;
}

.delta-form p {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin: 0 0 0.35rem;
    text-align: right;
    line-height: 1;
}

.delta-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 13.5px;
    text-align: right;
    background: #fafafa;
    color: #1B2A4A;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.delta-form input[type="text"]:focus {
    border-color: #1B2A4A;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(27, 42, 74, 0.08);
}

.delta-welcome-error {
    font-size: 11px;
    color: #e05050;
    margin-top: 4px;
    display: none;
}

/* ── Footer ── */
.delta-footer {
    display: flex;
    gap: 0.6rem;
    padding: 1rem 1.5rem 1.5rem;
}

.delta-btn {
    border-radius: 10px;
    padding: 0.72rem 1rem;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid #e0e0e0;
    background: transparent;
    color: #777;
    transition: background 0.15s, color 0.15s;
}

.delta-btn:hover {
    background: #f5f5f5;
}

.delta-btn.delta-close {
    flex: 1;
}

.delta-btn.delta-charge {
    flex: 2;
    background: #1B2A4A;
    border-color: #1B2A4A;
    color: #ffffff;
    font-weight: 700;
}

.delta-btn.delta-charge:hover {
    background: #243660;
    border-color: #243660;
}

.delta-btn:disabled {
    background: #e0e0e0;
    border-color: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}

/* ── Close button ── */
.delta-close-modal {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 2;
}

.delta-close-modal button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}

.delta-close-modal button:hover {
    background: rgba(255, 255, 255, 0.28);
}

.delta-close-modal button img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* ── Toast ── */
.delta-toast {
    direction: rtl;
    font-family: inherit;
    background: #ffffff;
    padding: 2rem 1.5rem;
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    width: min(320px, 92vw);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

.delta-toast h3 {
    font-weight: 700;
    color: #1B2A4A;
    margin: 1rem 0 0.4rem;
    font-size: 15px;
}

.delta-toast p {
    font-weight: 400;
    color: #888;
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
}

/* ── Hidden states ── */
.delta-members-modal,
.delta-welcome-credit,
.delta-welcome-failed,
.delta-welcome-modal {
    display: none;
}

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
    .delta-main {
        width: 96vw;
        border-radius: 16px;
        /* روی موبایل مودال را کمی بالاتر بیار تا کیبورد رویش نیاد */
        top: 45%;
    }

    .delta-header {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .delta-header h3 {
        font-size: 15px;
    }

    .delta-header p {
        font-size: 11.5px;
    }

    .delta-form {
        padding: 1.25rem 1.25rem 0;
    }

    .delta-form input[type="text"] {
        padding: 0.6rem 0.8rem;
        font-size: 16px; /* مهم: زیر 16px روی iOS زوم می‌کنه */
    }

    .delta-footer {
        padding: 0.85rem 1.25rem 1.25rem;
    }

    .delta-btn {
        font-size: 12.5px;
        padding: 0.65rem 0.5rem;
    }
}
.delta-close-modal button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    transition: background 0.15s;
    padding: 0;
    line-height: 1;
}

.delta-close-modal button:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}