/* ==========================================================================
   Site notices — متن‌های هشدار و راهنما
   Boxes rendered by farsisaz_notice_html(), the prerequisite chip on the
   product page, the terms-page rules list and the wallet top-up confirm.
   Tokens follow the theme: accent #E1FF00, borders #E4E4E4 / #3A3A3A,
   dark mode via html.dark.
   ========================================================================== */

.fs-note {
    --fsn-bg: #F5F5F5;
    --fsn-bd: #E4E4E4;
    --fsn-fg: #000;
    --fsn-ic: #000;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--fsn-bg);
    border: 1px solid var(--fsn-bd);
    color: var(--fsn-fg);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 24px;
    font-weight: 600;
    text-align: right;
    direction: rtl;
}
html.dark .fs-note {
    --fsn-bg: #191919;
    --fsn-bd: #3A3A3A;
    --fsn-fg: #fff;
    --fsn-ic: #E1FF00;
}

.fs-note--warn {
    --fsn-bg: #FFF8DB;
    --fsn-bd: #F1DE7A;
    --fsn-ic: #B7791F;
}
html.dark .fs-note--warn {
    --fsn-bg: #221D08;
    --fsn-bd: #4A3F12;
    --fsn-ic: #E1FF00;
}

.fs-note--danger {
    --fsn-bg: #FFF0F1;
    --fsn-bd: #F3C1C6;
    --fsn-ic: #D2323F;
}
html.dark .fs-note--danger {
    --fsn-bg: #2A1113;
    --fsn-bd: #5A262B;
    --fsn-ic: #FF6B76;
}

/* Inside the black prerequisite box */
.fs-note--dark,
html.dark .fs-note--dark {
    --fsn-bg: rgba(255, 255, 255, 0.06);
    --fsn-bd: rgba(255, 255, 255, 0.18);
    --fsn-fg: #fff;
    --fsn-ic: #E1FF00;
}

.fs-note--sm {
    font-size: 12px;
    line-height: 22px;
    padding: 10px 12px;
    border-radius: 12px;
    gap: 10px;
}

.fs-note__icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: var(--fsn-ic);
}
.fs-note__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}
.fs-note--sm .fs-note__icon,
.fs-note--sm .fs-note__icon svg {
    width: 20px;
    height: 20px;
}

.fs-note__body {
    flex: 1 1 auto;
    min-width: 0;
}
.fs-note__body b {
    display: block;
    font-weight: 800;
    margin-bottom: 2px;
}
.fs-note__body p {
    margin: 0;
}
.fs-note__more {
    display: inline-block;
    margin-top: 4px;
    font-weight: 800;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.fs-note__more:hover {
    opacity: 0.75;
}

.fs-note-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Placement tweaks */
.fs-prereq-notes {
    margin-top: 24px;
    padding-left: 24px;
}
.fs-thankyou-notes {
    margin-top: -20px; /* parent card uses gap-12 */
}
.fs-dl-notes {
    margin: 18px 0 4px;
}
.fs-wallet-note {
    margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Prerequisite chip (buy sidebar)
   -------------------------------------------------------------------------- */
.fs-prereq-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #E4E4E4;
    border-radius: 18px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    direction: rtl;
}
html.dark .fs-prereq-chip {
    background: transparent;
    border-color: #212121;
    color: #fff;
}
.fs-prereq-chip__cap {
    white-space: nowrap;
    opacity: 0.7;
}
.fs-prereq-chip b {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.fs-prereq-chip__go {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    font-weight: 700;
    background: #E1FF00;
    color: #000;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
}
.fs-prereq-chip__go svg {
    width: 14px;
    height: 14px;
}
.fs-prereq-chip:hover .fs-prereq-chip__go {
    filter: brightness(0.95);
}

/* Second line inside the "سازگار با کنسول" tile */
.fs-console-meta {
    font-size: 11px;
    line-height: 18px;
    font-weight: 600;
    text-align: center;
    color: #000;
    opacity: 0.7;
    margin-top: -12px;
}
html.dark .fs-console-meta {
    color: #fff;
}

/* --------------------------------------------------------------------------
   Terms-page list ([farsisaz_purchase_rules])
   -------------------------------------------------------------------------- */
.fs-rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    counter-reset: fsr;
    direction: rtl;
}
.fs-rules li {
    position: relative;
    padding-right: 42px;
    line-height: 28px;
    font-size: 14px;
}
.fs-rules li::before {
    counter-increment: fsr;
    content: counter(fsr, persian);
    position: absolute;
    right: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #000;
    color: #fff;
    text-align: center;
    line-height: 28px;
    font-weight: 800;
}
html.dark .fs-rules li::before {
    background: #E1FF00;
    color: #000;
}
.fs-rules b {
    font-weight: 800;
}

/* --------------------------------------------------------------------------
   Wallet top-up confirmation modal
   -------------------------------------------------------------------------- */
.fs-topup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    direction: rtl;
}
.fs-topup[hidden] {
    display: none !important;
}
.fs-topup__box {
    background: #fff;
    color: #000;
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    text-align: right;
    animation: fsTopupIn 0.18s ease-out;
}
html.dark .fs-topup__box {
    background: #191919;
    color: #fff;
}
@keyframes fsTopupIn {
    from { transform: translateY(12px); }
    to   { transform: none; }
}
.fs-topup__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.fs-topup__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}
.fs-topup__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #E1FF00;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
}
.fs-topup__amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 6px 0 2px;
}
.fs-topup__amount b {
    font-size: 36px;
    font-weight: 900;
    line-height: 1.2;
}
.fs-topup__amount span {
    font-size: 14px;
    font-weight: 700;
}
.fs-topup__words {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}
.fs-topup__rial {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.65;
    margin-top: 4px;
}
.fs-topup__text {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 24px;
    font-weight: 600;
    background: #FFF8DB;
    border: 1px solid #F1DE7A;
    border-radius: 14px;
    padding: 10px 12px;
}
html.dark .fs-topup__text {
    background: #221D08;
    border-color: #4A3F12;
}
.fs-topup__actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.fs-topup__btn {
    flex: 1 1 0;
    border: 1.5px solid #000;
    border-radius: 12px;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    background: #E1FF00;
    color: #000;
    box-shadow: 0 3px 0 0 #000;
    cursor: pointer;
}
.fs-topup__btn--ghost {
    background: #fff;
    box-shadow: none;
}
html.dark .fs-topup__btn {
    border-color: transparent;
    box-shadow: none;
}
html.dark .fs-topup__btn--ghost {
    background: #303030;
    color: #fff;
}
.fs-topup__btn:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}
html.dark .fs-topup__btn:focus-visible {
    outline-color: #E1FF00;
}
body.fs-topup-lock {
    overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
    .fs-topup__box {
        animation: none;
    }
}
