/* =========================================================
   SOLID i18n / RTL — keep layout stable, flip text safely
========================================================= */

html[dir="rtl"],
html[dir="rtl"] body,
body.is-rtl {
    overflow-x: hidden;
}

html[dir="rtl"] body,
body.is-rtl {
    direction: rtl;
    text-align: right;
}

/* Keep complex chrome layouts LTR so logo/nav grid stays intact */
html[dir="rtl"] .ashunt-header-v2,
html[dir="rtl"] .ashunt-header-v2 .ashunt-topbar,
html[dir="rtl"] .ashunt-header-v2 .ashunt-mainbar,
html[dir="rtl"] .ashunt-header-v2 .ashunt-header-menu,
html[dir="rtl"] .ashunt-footer-partners-grid,
html[dir="rtl"] .ashunt-home-slider,
html[dir="rtl"] .carousel,
html[dir="rtl"] [data-ltr] {
    direction: ltr;
    text-align: left;
}

/* Textual areas follow page direction */
html[dir="rtl"] .ashunt-footer-column,
html[dir="rtl"] .ashunt-footer-description,
html[dir="rtl"] .ashunt-footer-bottom,
html[dir="rtl"] .ashunt-footer-legal,
html[dir="rtl"] .ashunt-footer-credit,
html[dir="rtl"] .ashunt-section-heading,
html[dir="rtl"] .ashunt-legal-page,
html[dir="rtl"] .ashunt-login-heading,
html[dir="rtl"] .ashunt-login-form,
html[dir="rtl"] .ashunt-dl-page,
html[dir="rtl"] .ashunt-events-page,
html[dir="rtl"] .ashunt-guide-page,
html[dir="rtl"] .ashunt-store-page,
html[dir="rtl"] .ashunt-dash-page,
html[dir="rtl"] .ashunt-rk-page {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] code,
html[dir="rtl"] pre,
html[dir="rtl"] [data-ltr] {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .dropdown-menu,
html[dir="rtl"] .menu-sub:not(.ashunt-header-v2 .menu-sub),
html[dir="rtl"] .modal-content,
html[dir="rtl"] .table {
    text-align: right;
}

html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-angle-right {
    transform: scaleX(-1);
}

/* Language menu */
.ashunt-lang-menu .menu-link.is-active-lang {
    color: #efc657 !important;
}

.ashunt-lang-menu .menu-link.is-active-lang .menu-title {
    color: #efc657 !important;
}

/* Arabic typography without breaking Latin UI chrome */
html[dir="rtl"] body,
html[lang="ar"] body {
    font-family: "El Messiri", "Manrope", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] .ashunt-header-v2,
html[dir="rtl"] .ashunt-header-v2 .menu-title,
html[dir="rtl"] .ashunt-header-v2 .ashunt-auth-btn {
    font-family: "Manrope", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* =========================================================
   BETA centered modal (config beta = true)
========================================================= */

.ashunt-beta-modal[hidden] {
    display: none !important;
}

.ashunt-beta-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.ashunt-beta-modal__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(120, 70, 10, 0.28), transparent 70%),
        rgba(2, 3, 6, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ashunt-beta-modal__panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 30px 26px 24px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(239, 198, 87, 0.38);
    background:
        linear-gradient(180deg, rgba(28, 22, 14, 0.98) 0%, rgba(10, 11, 14, 0.98) 100%);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.65),
        0 0 40px rgba(220, 167, 47, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-align: center;
    animation: ashuntBetaIn 0.32s ease;
}

.ashunt-beta-modal__shine {
    position: absolute;
    top: -40%;
    left: 50%;
    width: 140%;
    height: 70%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(239, 198, 87, 0.16), transparent 68%);
    pointer-events: none;
}

@keyframes ashuntBetaIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ashunt-beta-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 198, 87, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #efc657;
    font-size: 1.05rem;
    cursor: pointer;
    transition: 0.18s ease;
}

.ashunt-beta-modal__close:hover {
    color: #1a1205;
    background: linear-gradient(180deg, #efc657, #c89020);
    border-color: #efc657;
    box-shadow: 0 0 18px rgba(239, 198, 87, 0.35);
}

.ashunt-beta-modal__head {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
}

.ashunt-beta-modal__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 auto 14px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 220, 140, 0.55);
    background: linear-gradient(180deg, #ffd87a 0%, #efc657 40%, #c89020 100%);
    color: #1a1205;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    box-shadow:
        0 8px 20px rgba(200, 140, 30, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ashunt-beta-modal__title {
    margin: 0 0 10px;
    color: #fff8e8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 18px rgba(239, 198, 87, 0.22);
}

.ashunt-beta-modal__text {
    margin: 0 auto;
    max-width: 34ch;
    color: rgba(245, 230, 190, 0.88);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.55;
}

.ashunt-beta-modal.is-last-day .ashunt-beta-modal__badge {
    background: linear-gradient(180deg, #ffe08a, #d4a017);
    color: #1a1205;
}

.ashunt-beta-modal.is-last-day .ashunt-beta-modal__text {
    max-width: 42ch;
    color: #ffe9b0;
}

.ashunt-beta-countdown {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    margin: 0 0 20px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(239, 198, 87, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.22));
}

.ashunt-beta-countdown__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 72px;
    padding: 10px 4px;
    border-radius: 14px;
    border: 1px solid rgba(239, 198, 87, 0.22);
    background:
        linear-gradient(180deg, rgba(40, 30, 16, 0.85), rgba(12, 12, 14, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ashunt-beta-countdown__item strong {
    color: #ffd76a;
    font-size: 1.45rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-shadow: 0 0 16px rgba(239, 198, 87, 0.35);
}

.ashunt-beta-countdown__item span {
    color: rgba(238, 242, 247, 0.58);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ashunt-beta-countdown__sep {
    display: flex;
    align-items: center;
    color: rgba(239, 198, 87, 0.55);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    padding-bottom: 14px;
}

.ashunt-beta-modal__actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ashunt-beta-modal__social {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 18px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid transparent;
    color: #fff !important;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.ashunt-beta-modal__social-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.22);
    color: #efc657;
    font-size: 0.95rem;
    box-shadow: inset 0 0 0 1px rgba(239, 198, 87, 0.28);
}

.ashunt-beta-modal__social-label {
    line-height: 1;
}

.ashunt-beta-modal__social--facebook {
    background: linear-gradient(105deg, #3b6fd4 0%, #2454b5 55%, #1c4598 100%);
    border-color: rgba(120, 165, 255, 0.35);
}

.ashunt-beta-modal__social--discord {
    background: linear-gradient(105deg, #8b9cf5 0%, #6f7fe0 45%, #5865f2 100%);
    border-color: rgba(170, 185, 255, 0.35);
}

.ashunt-beta-modal__social:hover {
    color: #fff !important;
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36);
}

.ashunt-beta-modal__social:active {
    transform: translateY(0);
}

html.ashunt-beta-open,
html.ashunt-beta-open body {
    overflow: hidden;
}

html[dir="rtl"] .ashunt-beta-modal__close {
    right: auto;
    left: 12px;
}

@media (max-width: 575.98px) {
    .ashunt-beta-modal__panel {
        padding: 26px 16px 18px;
        border-radius: 18px;
    }

    .ashunt-beta-modal__title {
        font-size: 1.3rem;
    }

    .ashunt-beta-modal__text {
        font-size: 0.86rem;
    }

    .ashunt-beta-countdown {
        gap: 3px;
        padding: 8px;
    }

    .ashunt-beta-countdown__item {
        min-height: 62px;
        border-radius: 12px;
    }

    .ashunt-beta-countdown__item strong {
        font-size: 1.15rem;
    }

    .ashunt-beta-countdown__sep {
        font-size: 0.95rem;
        padding-bottom: 12px;
    }

    .ashunt-beta-modal__social {
        min-height: 48px;
        border-radius: 12px;
    }
}
