/* اعلان‌های عمومی سایت (بنر و مودال) — سبک، بدون وابستگی */
.fliro-alert-root {
    position: fixed;
    inset-inline: 0;
    bottom: 16px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    pointer-events: none;
}

.fliro-alert {
    --tone: #3b82f6;
    pointer-events: auto;
    width: min(680px, 100%);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    background: #1b1325;
    border: 1px solid color-mix(in srgb, var(--tone) 45%, rgba(255, 255, 255, .12));
    border-inline-start: 4px solid var(--tone);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    color: #f3eefe;
    font-family: inherit;
    line-height: 1.7;
    animation: fliroAlertIn .28s ease both;
}

.fliro-alert.is-hiding {
    animation: fliroAlertOut .2s ease both;
}

.fliro-alert--success { --tone: #22c55e; }
.fliro-alert--warning { --tone: #f59e0b; }
.fliro-alert--danger { --tone: #ef4444; }
.fliro-alert--promo { --tone: #a855f7; }

.fliro-alert-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--tone) 22%, transparent);
    color: var(--tone);
    font-size: 16px;
    font-weight: 700;
}

.fliro-alert-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.fliro-alert-copy strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 2px;
}

.fliro-alert-copy p {
    margin: 0;
    font-size: 13px;
    color: #d9cfe9;
    white-space: pre-line;
    word-break: break-word;
}

.fliro-alert-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fliro-alert-link,
.fliro-alert-never,
.fliro-alert-close {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    border-radius: 9px;
    padding: 6px 9px;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.fliro-alert-link {
    color: #fff;
    background: var(--tone);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.fliro-alert-link:hover { filter: brightness(1.1); }

.fliro-alert-never {
    color: #cbb9e6;
    background: rgba(255, 255, 255, .08);
    white-space: nowrap;
}

.fliro-alert-never:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.fliro-alert-close {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
    color: #cbb9e6;
    background: transparent;
}

.fliro-alert-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* مودال */
.fliro-alert-modal-layer {
    position: fixed;
    inset: 0;
    z-index: 9995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(6, 3, 12, .68);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fliroFadeIn .2s ease both;
}

.fliro-alert-modal-layer[hidden] { display: none; }

.fliro-alert-modal {
    --tone: #3b82f6;
    width: min(520px, 100%);
    max-height: min(86vh, 640px);
    overflow: auto;
    background: #1b1325;
    border: 1px solid rgba(255, 255, 255, .12);
    border-top: 4px solid var(--tone);
    border-radius: 18px;
    padding: 22px;
    color: #f3eefe;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    font-family: inherit;
    animation: fliroModalIn .26s ease both;
}

.fliro-alert-modal--success { --tone: #22c55e; }
.fliro-alert-modal--warning { --tone: #f59e0b; }
.fliro-alert-modal--danger { --tone: #ef4444; }
.fliro-alert-modal--promo { --tone: #a855f7; }

.fliro-alert-modal h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.fliro-alert-modal p {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.9;
    color: #d9cfe9;
    white-space: pre-line;
    word-break: break-word;
}

.fliro-alert-modal-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fliro-alert-modal-foot .fliro-alert-link { padding: 9px 16px; font-size: 13px; }
.fliro-alert-modal-foot .fliro-alert-never { padding: 9px 14px; font-size: 13px; }
.fliro-alert-modal-foot .fliro-alert-close { margin-inline-start: auto; }

@keyframes fliroAlertIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fliroAlertOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(14px); }
}

@keyframes fliroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fliroModalIn {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
    .fliro-alert {
        align-items: flex-start;
        padding: 11px 12px;
        gap: 9px;
    }
    .fliro-alert-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .fliro-alert-link,
    .fliro-alert-never {
        text-align: center;
    }
    .fliro-alert-modal { padding: 18px 16px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .fliro-alert,
    .fliro-alert-modal-layer,
    .fliro-alert-modal { animation: none; }
}
