﻿/* ══════════════════════════════════════════════
   کیف پول اف‌کوییز — هماهنگ با style.css
   فونت: KalamehWebFaNum | رنگ: #671f66 / #ffde01
   ══════════════════════════════════════════════ */

.walletactivity {
    display: none;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    width: 100%;
    height: 85%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(transparent, black 0%, black 82%, transparent 102%);
    -webkit-mask-image: linear-gradient(transparent, black 0%, black 82%, transparent 102%);
}

.fwallet,
.fwallet * {
    box-sizing: border-box;
    font-family: KalamehWebFaNum, Arial, sans-serif;
}

.fwallet {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px 14px 72px;
    color: #fff;
}

.fwallet-title {
    margin-bottom: 14px !important;
    font-size: 105%;
}

/* ── کارت موجودی ── */
.fwallet-balance {
    position: relative;
    margin: 0 0 14px;
    padding: 18px 16px 16px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 100%);
    border: 2px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.15);
    text-align: center;
    overflow: hidden;
}

.fwallet-balance__glow {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 60px;
    background: radial-gradient(ellipse, rgba(255, 222, 1, 0.25), transparent 70%);
    pointer-events: none;
}

.fwallet-balance__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.fwallet-balance__label {
    font-size: 82%;
    opacity: 0.88;
}

.fwallet-balance__status {
    font-size: 75%;
    color: #ffb4b4;
}

.fwallet-balance__amount {
    font-size: 210%;
    font-weight: 900;
    line-height: 1.15;
    color: #ffde01;
    text-shadow: 0 2px 12px rgba(255, 222, 1, 0.35);
    min-height: 1.2em;
}

.fwallet-balance__unit {
    font-size: 80%;
    opacity: 0.75;
    margin-top: 2px;
}

/* ── هشدار ── */
.fwallet-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 222, 1, 0.35);
    font-size: 85%;
    color: #ffe08a;
}

.fwallet-alert__icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

/* ── تب‌ها ── */
.fwallet-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 12px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.fwallet-tab {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: KalamehWebFaNum, Arial, sans-serif;
    font-size: 88%;
    font-weight: bold;
    padding: 10px 4px;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    white-space: nowrap;
}

.fwallet-tab.is-active {
    background: linear-gradient(to bottom, #893a85, #671f66);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

/* ── پنل‌ها — ارتفاع ثابت برای جلوگیری از جابجایی عرض ── */
.fwallet-panels {
    position: relative;
    min-height: 340px;
}

.fwallet-panel {
    display: none;
    width: 100%;
}

.fwallet-panel.is-active {
    display: block;
    animation: fwalletIn 0.22s ease;
}

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

/* ── برگه محتوا (سفید مثل فروشگاه) ── */
.fwallet-sheet {
    width: 100%;
    padding: 14px 14px 16px;
    border-radius: 14px;
    background: #fff;
    color: #2d1030;
    border: 3px solid #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}

.fwallet-sheet--flush {
    padding: 10px 12px 14px;
}

.fwallet-sheet__hint {
    margin: 0 0 12px;
    font-size: 78%;
    color: #666;
    line-height: 1.65;
    text-align: justify;
}

.fwallet-label {
    display: block;
    margin: 0 0 6px;
    font-size: 82%;
    font-weight: bold;
    color: #444;
}

.fwallet-input {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 11px 12px;
    border: 2px solid #e8dff0;
    border-radius: 10px;
    background: #faf8fc;
    color: #2d1030;
    font-family: KalamehWebFaNum, Arial, sans-serif;
    font-size: 100%;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fwallet-input:focus {
    border-color: #893a85;
    box-shadow: 0 0 0 3px rgba(103, 31, 102, 0.12);
}

.fwallet-input--link {
    font-size: 72%;
    text-align: left;
    direction: ltr;
    word-break: break-all;
}

/* ── مبالغ پیشنهادی ── */
.fwallet-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}

.fwallet-preset,
.fquiz-wallet-preset {
    min-width: 0;
    padding: 10px 4px;
    border: 2px solid #e0d5e8;
    border-radius: 10px;
    background: #f7f2fa;
    color: #4a2b58;
    font-family: KalamehWebFaNum, Arial, sans-serif;
    font-size: 88%;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
}

.fwallet-preset.is-active,
.fquiz-wallet-preset.is-active {
    border-color: #671f66;
    background: linear-gradient(to bottom, #893a85, #671f66);
    color: #fff;
    box-shadow: 0 4px 12px rgba(103, 31, 102, 0.35);
}

/* ── پیش‌نمایش شارژ ── */
.fwallet-preview {
    position: relative;
    margin: 0 0 14px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #f0eaf5;
    border: 1px dashed #c9b8d4;
    font-size: 85%;
    min-height: 72px;
}
.fwallet-preview__loader {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: rgba(240, 234, 245, 0.88);
    border-radius: 10px;
    z-index: 1;
}
.fwallet-preview.is-loading .fwallet-preview__loader { display: flex; }
.fwallet-preview.is-loading .fwallet-preview__content { opacity: 0.28; }
.fquiz-sheet-spinner--sm { width: 22px; height: 22px; border-width: 2px; }

.fwallet-preview__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    gap: 8px;
}

.fwallet-preview__row--total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #d5c8de;
    font-weight: bold;
    font-size: 92%;
}

.fwallet-preview__row .is-plus {
    color: #0e8e3f;
}

/* ── دکمه اصلی — همان btngreennew اپ ── */
.fwallet-cta {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 4px 0 0 !important;
    box-sizing: border-box !important;
}

.fwallet-cta--sm {
    font-size: 95% !important;
    padding: 9px 12px !important;
}

/* ── آمار دعوت ── */
.fwallet-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.fwallet-stat {
    min-width: 0;
    padding: 10px 4px;
    border-radius: 10px;
    background: #f7f2fa;
    border: 1px solid #ebe3f0;
    text-align: center;
}

.fwallet-stat__val {
    display: block;
    font-size: 105%;
    font-weight: 900;
    color: #671f66;
    line-height: 1.2;
}

.fwallet-stat__lbl {
    display: block;
    margin-top: 3px;
    font-size: 68%;
    color: #888;
    line-height: 1.3;
}

.fwallet-rules {
    margin: 0 0 12px;
    padding: 10px 11px;
    border-radius: 10px;
    background: #faf7fc;
    border-right: 3px solid #ffde01;
    font-size: 78%;
    color: #555;
    line-height: 1.75;
}

/* ── تاریخچه ── */
.fwallet-ledger__item,
.fquiz-wallet-ledger__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 2px;
    border-bottom: 1px solid #eee;
}

.fwallet-ledger__item:last-child,
.fquiz-wallet-ledger__item:last-child {
    border-bottom: none;
}

.fwallet-ledger__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.fwallet-ledger__item.is-in .fwallet-ledger__icon,
.fquiz-wallet-ledger__item.is-in .fwallet-ledger__icon {
    background: #e6f7ec;
    color: #0e8e3f;
}

.fwallet-ledger__item.is-out .fwallet-ledger__icon,
.fquiz-wallet-ledger__item.is-out .fwallet-ledger__icon {
    background: #fdecea;
    color: #c0392b;
}

.fwallet-ledger__main,
.fquiz-wallet-ledger__main {
    flex: 1;
    min-width: 0;
}

.fwallet-ledger__title,
.fquiz-wallet-ledger__title {
    font-size: 88%;
    font-weight: bold;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fwallet-ledger__date,
.fquiz-wallet-ledger__date {
    margin-top: 2px;
    font-size: 72%;
    color: #999;
}

.fwallet-ledger__amount,
.fquiz-wallet-ledger__amount {
    flex-shrink: 0;
    font-size: 90%;
    font-weight: 900;
    white-space: nowrap;
}

.fwallet-ledger__item.is-in .fwallet-ledger__amount,
.fquiz-wallet-ledger__item.is-in .fquiz-wallet-ledger__amount { color: #0e8e3f; }
.fwallet-ledger__item.is-out .fwallet-ledger__amount,
.fquiz-wallet-ledger__item.is-out .fquiz-wallet-ledger__amount { color: #c0392b; }

.fwallet-ledger__empty,
.fwallet-empty {
    padding: 28px 12px;
    text-align: center;
    font-size: 85%;
    color: #888;
}

.fwallet-empty__title {
    font-weight: bold;
    color: #555;
    margin-bottom: 4px;
}

.fwallet-empty__sub {
    font-size: 78%;
    color: #999;
}

.fwallet-more {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: 2px solid #e0d5e8;
    border-radius: 10px;
    background: #faf8fc;
    color: #671f66;
    font-family: KalamehWebFaNum, Arial, sans-serif;
    font-size: 85%;
    font-weight: bold;
    cursor: pointer;
}

/* ── skeleton ── */
.fwallet-skeleton {
    display: inline-block;
    width: 72px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.12) 25%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0.12) 75%);
    background-size: 200% 100%;
    animation: fwalletShimmer 1.2s infinite;
}

.fwallet-skeleton--lg {
    width: 100px;
    height: 28px;
}

@keyframes fwalletShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── بنر / باکس کیف (صفحه اصلی و فروشگاه) ── */
.fquiz-wallet-promo-slot { margin: 0 0 10px; padding: 0 2px; width: 100%; box-sizing: border-box; }
.homepage_boxes .fquiz-wallet-promo-slot { width: 95%; margin: 2% 2.5%; }
.shopactivity .fquiz-wallet-promo-slot { margin: 0 5% 20px; padding: 0 2px; width: 90%; box-sizing: border-box; }

.fquiz-wallet-promo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #7a3a8f 0%, #4a1f66 55%, #391139 100%);
    border: 2px solid rgba(255,255,255,0.18);
    box-shadow: 0 6px 18px rgba(44,27,95,0.35);
    color: #fff;
    font-family: KalamehWebFaNum, Arial, sans-serif;
    box-sizing: border-box;
}

.fquiz-wallet-promo--home { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.fquiz-wallet-promo--home:active { transform: scale(0.985); box-shadow: 0 3px 10px rgba(44,27,95,0.3); }

.fquiz-wallet-promo__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
    pointer-events: none;
}

.fquiz-wallet-promo__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    font-size: 22px;
    line-height: 1;
}

.fquiz-wallet-promo__content { flex: 1; min-width: 0; position: relative; z-index: 1; }

.fquiz-wallet-promo__title {
    font-size: 92%;
    font-weight: bold;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
}

.fquiz-wallet-promo__balance {
    font-size: 110%;
    font-weight: bold;
    line-height: 1.2;
    direction: ltr;
    text-align: right;
}

.fquiz-wallet-promo__balance span {
    font-size: 72%;
    font-weight: normal;
    opacity: 0.85;
    margin-right: 3px;
}

.fquiz-wallet-promo__hint {
    margin-top: 3px;
    font-size: 72%;
    opacity: 0.82;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fquiz-wallet-promo__arrow {
    flex-shrink: 0;
    font-size: 28px;
    line-height: 1;
    opacity: 0.55;
    transform: rotate(180deg);
    position: relative;
    z-index: 1;
}

.fquiz-wallet-promo__btn {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    border: none;
    border-radius: 50px;
    padding: 8px 14px;
    background: linear-gradient(to bottom, #77ffab, #57d686);
    color: #000 !important;
    font-family: KalamehWebFaNum, Arial, sans-serif;
    font-size: 78%;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 0 #0e8e3f;
}

/* سازگاری بنر قدیمی فروشگاه */
.fquiz-wallet-shop-banner { margin: 0 0 12px; padding: 0 2px; }
.fquiz-wallet-shop-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 12px;
    background: linear-gradient(to bottom, #893a85, #671f66);
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 85%;
    color: #fff;
    font-family: KalamehWebFaNum, Arial, sans-serif;
}
.fquiz-wallet-shop-banner__btn {
    flex-shrink: 0;
    border: none;
    border-radius: 50px;
    padding: 7px 14px;
    background: linear-gradient(to bottom, #77ffab, #57d686);
    color: #000 !important;
    font-family: KalamehWebFaNum, Arial, sans-serif;
    font-size: 78%;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 0 #0e8e3f;
}

/* ── سازگاری کلاس‌های قدیمی ── */
.fquiz-wallet-btn {
    font-family: KalamehWebFaNum, Arial, sans-serif;
    box-sizing: border-box;
    max-width: 100%;
}
.fquiz-wallet-btn--primary { background: linear-gradient(to bottom, #77ffab, #57d686); color: #000 !important; border-radius: 50px; border: none; font-weight: bold; }
.fquiz-wallet-btn--ghost { background: #faf8fc; border: 2px solid #e0d5e8; color: #671f66; border-radius: 10px; font-weight: bold; }

/* ── صفحه callback شارژ ── */
.fquiz-wallet-charge-page {
    min-height: 100vh;
    padding: 24px 16px;
    font-family: KalamehWebFaNum, Arial, sans-serif;
}
.fquiz-wallet-charge-card {
    max-width: 400px;
    margin: 40px auto;
    padding: 22px 16px;
    border-radius: 14px;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
    text-align: center;
    color: #333;
}
.fquiz-wallet-charge-success { color: #0e8e3f; font-size: 105%; font-weight: bold; display: block; margin-bottom: 8px; }
.fquiz-wallet-charge-error { color: #c0392b; font-size: 100%; font-weight: bold; display: block; margin-bottom: 8px; }
.fquiz-wallet-charge-sub { display: block; font-size: 85%; line-height: 1.7; color: #666; margin-bottom: 14px; }
.fquiz-wallet-charge-home { display: inline-block; margin-top: 6px; }

/* ── محتوای شیت خرید (اسکلت همان bottombox صندوق سکه) ── */
.fquiz-shop-sheet-body { width: 100%; }
.fquiz-shop-sheet-reward { margin: 0 0 8px; font-size: 80%; color: #671f66; }
.fquiz-shop-sheet-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid #e4e4e4; font-size: 85%; font-weight: normal; }
.fquiz-shop-sheet-row strong { font-weight: bold; }
#fquizShopModalWalletWrap { color: #0e8e3f; }
.fquiz-shop-sheet-balance { margin: 10px 0 6px; font-size: 80%; font-weight: normal; color: #555; }
.fquiz-shop-sheet-hint { margin: 0 0 8px; font-size: 75%; font-weight: normal; color: #666; line-height: 1.5; }
#fquizShopSheet .btngreennew,
#fquizShopSheet .btnwhitenew { width: 88%; min-width: 0; margin: 8px auto; }
#fquizShopBtnWallet.is-disabled { opacity: 0.45; pointer-events: none; }
.fquiz-shop-sheet-charge { margin: 4px 0 2px; font-size: 80%; color: #671f66; cursor: pointer; text-decoration: underline; }
#fquizShopSheetLoader { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.fquiz-sheet-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e4d5ec;
    border-top-color: #671f66;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.fquiz-sheet-spinner-label { font-size: 75%; font-weight: normal; color: #888; }

.fquiz-wallet-promo--skeleton {
    min-height: 66px;
    pointer-events: none;
}
.fquiz-wallet-promo__skel {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.12) 25%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0.12) 75%);
    background-size: 200% 100%;
    animation: fwalletShimmer 1.15s infinite;
}
.fquiz-wallet-promo__skel--lg { width: 42%; height: 16px; margin: 4px 0 8px; }
.fquiz-wallet-promo__skel--sm { width: 70%; height: 8px; }
.fquiz-wallet-promo__skel-btn {
    flex-shrink: 0;
    width: 64px;
    height: 28px;
    border-radius: 50px;
    background: linear-gradient(90deg, rgba(255,255,255,0.14) 25%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.14) 75%);
    background-size: 200% 100%;
    animation: fwalletShimmer 1.15s infinite;
}
.fquiz-wallet-promo__skel-arrow {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.14) 25%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.14) 75%);
    background-size: 200% 100%;
    animation: fwalletShimmer 1.15s infinite;
}

.fwallet-ref-loader {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tipsdesc--list {
    width: 86%;
    max-width: 340px;
    margin: 10px auto 6px;
    text-align: right;
}
.tips-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tips-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px 11px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.07) 100%);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 88%;
    font-weight: normal;
    line-height: 1.45;
    letter-spacing: -0.01em;
    text-align: right;
}
.tips-bullets li::before {
    content: "";
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background-color: #f0c020;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232c1b5f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2l3 3.1 6-6.4'/%3E%3C/svg%3E"),
        linear-gradient(145deg, #fff6c8 0%, #f0c020 100%);
    background-repeat: no-repeat;
    background-position: center, center;
    background-size: 13px 13px, 100% 100%;
    box-shadow: 0 3px 8px rgba(240, 192, 32, 0.35), inset 0 1px 0 rgba(255,255,255,0.7);
}
