/* ACCMAA — شريط العروض · العملات · مؤسسات الضرائب */

.accmaa-utility-stack {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    width: 100%;
}

/* ─── Promo countdown bar ─── */
.accmaa-promo-bar {
    background: linear-gradient(90deg, #7f1d1d 0%, #b45309 35%, #D4AF37 70%, #b45309 100%);
    background-size: 200% 100%;
    animation: promoShine 6s linear infinite;
    color: #fff;
    font-size: 0.82rem;
    box-shadow: 0 4px 20px rgba(180, 83, 9, 0.35);
}
@keyframes promoShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
.promo-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.promo-discount-badge {
    background: #fff;
    color: #b45309;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.promo-msg { font-weight: 600; flex: 1; min-width: 160px; text-align: center; }
.promo-msg i { color: #fef3c7; margin-left: 6px; }
.promo-countdown {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.25);
    padding: 6px 12px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
}
.cd-u { display: flex; flex-direction: column; align-items: center; min-width: 36px; }
.cd-u b { font-size: 1rem; line-height: 1; }
.cd-u small { font-size: 0.58rem; opacity: 0.85; }
.cd-sep { opacity: 0.6; font-weight: 700; padding: 0 2px; }
.promo-cta { flex-shrink: 0; }

/* ─── FX ticker bar ─── */
.accmaa-fx-bar {
    background: linear-gradient(90deg, #061f3d, #0A3669);
    color: rgba(255,255,255,0.92);
    font-size: 0.76rem;
    border-bottom: 1px solid rgba(212,175,55,0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    min-height: 34px;
    overflow: hidden;
}
.fx-bar-label {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--gold, #D4AF37);
    padding: 6px 0;
    white-space: nowrap;
}
.fx-bar-label i { margin-left: 6px; }
.fx-marquee-wrap {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.fx-marquee-track {
    display: flex;
    gap: 28px;
    width: max-content;
    animation: fxScroll 35s linear infinite;
    -webkit-animation: fxScroll 35s linear infinite;
    white-space: nowrap;
    padding: 7px 0;
    will-change: transform;
}

.fx-marquee-track--js {
    animation: none !important;
    -webkit-animation: none !important;
}
.fx-tick-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.15);
}
.accmaa-fx-bar:hover .fx-marquee-track { animation-play-state: paused; }
@keyframes fxScroll {
    0% { transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-33.333%, 0, 0); -webkit-transform: translate3d(-33.333%, 0, 0); }
}
.fx-flag { font-size: 1rem; }
.fx-tick-rate { color: var(--gold, #D4AF37); font-weight: 700; }
.fx-ch { font-size: 0.68rem; margin-right: 4px; }
.fx-ch.up { color: #4ade80; }
.fx-ch.down { color: #f87171; }
.fx-updated {
    flex-shrink: 0;
    font-size: 0.65rem;
    opacity: 0.7;
    white-space: nowrap;
}

body.premium-ui .topbar-premium { top: var(--utility-bar-h, 0px); }

/* ─── Tax institutions section ─── */
.tax-inst-section {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    scroll-margin-top: calc(var(--topbar-h, 76px) + 80px);
}
.tax-inst-section-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #fefce8 0%, #fff 40%, #f0f9ff 100%);
    z-index: 0;
}
.tax-inst-inner {
    position: relative;
    z-index: 1;
    padding: 48px 48px 52px;
    max-width: 1280px;
    margin: 0 auto;
}
.tax-inst-marquee-wrap {
    overflow: hidden;
    margin: 0 -8px;
    padding: 8px 0 16px;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.tax-inst-marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: taxInstScroll 55s linear infinite;
}
.tax-inst-marquee-wrap:hover .tax-inst-marquee-track { animation-play-state: paused; }
@keyframes taxInstScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-33.33%, 0, 0); }
}
.tax-inst-chip {
    flex: 0 0 min(320px, 88vw);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #e8eef4;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    box-shadow: 0 8px 24px rgba(10,54,105,0.06);
}
.tax-inst-chip:hover {
    transform: translateY(-4px);
    border-color: var(--inst-color, var(--gold));
    box-shadow: 0 16px 36px rgba(10,54,105,0.12);
}
.tax-inst-chip-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,54,105,0.05);
}
.tax-inst-logo { width: 100%; height: 100%; object-fit: cover; }
.tax-inst-icon-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--inst-color), color-mix(in srgb, var(--inst-color) 60%, #000));
    color: #fff;
    font-size: 1.2rem;
}
.tax-inst-chip-meta { flex: 1; min-width: 0; }
.tax-inst-chip-meta strong { display: block; color: var(--primary); font-size: 0.88rem; line-height: 1.35; }
.tax-inst-chip-meta small { color: var(--muted); font-size: 0.72rem; }
.tax-inst-chip-go { color: var(--gold); font-size: 1.1rem; flex-shrink: 0; }
.tax-inst-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    margin: 8px 0 0;
}
.tax-inst-note i { color: var(--gold); margin-left: 6px; }

/* Tax institution modal */
.tax-inst-modal-box { max-width: 620px; max-height: 90vh; overflow-y: auto; }
.tax-inst-modal-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color, #e8eef4);
}
.tax-inst-modal-head .tax-inst-chip-logo { width: 64px; height: 64px; }
.tax-inst-modal-head h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--primary); }
.tax-inst-website { font-size: 0.82rem; color: var(--primary); }
.tax-inst-visitor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(10,54,105,0.1), rgba(201,162,39,0.12));
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.tax-inst-visitor-badge i { color: var(--gold); }
.tax-inst-intro-box {
    background: linear-gradient(145deg, #f0f7ff 0%, #fff 100%);
    border: 1px solid rgba(10,54,105,0.12);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.tax-inst-how-box {
    background: #fafbfc;
    border-right: 4px solid var(--gold);
    border-radius: 0 12px 12px 0;
    padding: 14px 18px;
    margin-bottom: 14px;
}
.tax-inst-modal-body h4 { font-size: 0.92rem; color: var(--primary); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.tax-inst-intro-box p, .tax-inst-how-box p { margin: 0; line-height: 1.8; color: #333; font-size: 0.92rem; }
.tax-inst-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.tax-inst-fact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(10,54,105,0.05);
    padding: 10px 12px;
    border-radius: 10px;
}
.tax-inst-fact i { color: var(--gold); margin-top: 2px; }
.tax-inst-fact small { display: block; font-size: 0.68rem; color: var(--muted); margin-bottom: 2px; }
.tax-inst-fact strong { font-size: 0.82rem; color: var(--primary); }
.tax-inst-guidance-section { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border-color, #e8eef4); }
.tax-guidance-text { line-height: 1.75; color: #444; background: #f8fafc; padding: 14px; border-radius: 12px; border-right: 4px solid var(--gold); margin: 0; font-size: 0.88rem; }
.tax-svc-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tax-svc-pill {
    background: rgba(10,54,105,0.08);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.tax-docs-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.tax-doc-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 10px;
    background: #fef2f2; color: #b91c1c; font-size: 0.78rem; font-weight: 600;
    text-decoration: none; border: 1px solid #fecaca;
}
.tax-doc-link:hover { background: #fee2e2; }
.partner-logo { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.modal-close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    border: none;
    background: rgba(0,0,0,0.06);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .promo-bar-inner { flex-direction: column; text-align: center; }
    .accmaa-fx-bar {
        flex-wrap: nowrap;
        min-height: 28px;
        padding: 0 8px;
        overflow: hidden;
    }
    .accmaa-fx-bar .fx-marquee-track {
        animation: fxScroll 24s linear infinite !important;
    }
    .fx-updated { display: none; }
    .tax-inst-inner { padding: 32px 18px; }
    .tax-inst-chip { flex: 0 0 min(280px, 92vw); }
    .tax-inst-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .accmaa-promo-bar, .tax-inst-marquee-track { animation: none !important; }
    /* شريط العملات يبقى متحركاً — معلومات حية وليست زخرفة */
    .fx-marquee-track:not(.fx-marquee-track--js) {
        animation: fxScroll 35s linear infinite !important;
        -webkit-animation: fxScroll 35s linear infinite !important;
        animation-duration: 35s !important;
        animation-iteration-count: infinite !important;
    }
}
