/* D:\anjirweb.ir\public\css\premium.css */

/* --- صفحه خرید: بدون اسکرول عمودی در دسکتاپ --- */
body.premium-fit {
    height: 100vh;
    overflow: hidden;
}

.premium-main {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 22px 20px;
}

.premium-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.premium-header h1 {
    font-size: clamp(1.2rem, 2vw + 0.6rem, 1.55rem);
    color: var(--primary);
    font-variation-settings: var(--fw-black);
}

.premium-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 3px;
    max-width: 680px;
    line-height: 1.8;
}

.premium-header .back-link { flex-shrink: 0; }

.premium-alert {
    padding: 14px 20px;
    color: var(--warning);
    text-align: center;
    border-color: rgba(255, 184, 77, 0.35);
    background: rgba(255, 184, 77, 0.06);
    flex-shrink: 0;
}

/* --- کارت اصلی سه‌ستونه (جمع‌وجور) --- */
.premium-card {
    flex: 0 0 auto;
    max-width: 1150px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 0.9fr;
    gap: clamp(20px, 2.6vw, 34px);
    padding: clamp(20px, 2.6vw, 30px);
}

.step-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.step-title {
    color: var(--primary);
    font-size: 0.98rem;
    font-variation-settings: var(--fw-bold);
    margin: 0 0 var(--card-gap) 0;
    flex-shrink: 0;
}

/* --- کارت‌های پلن --- */
.plans-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.plan-card input { position: absolute; opacity: 0; pointer-events: none; }

.plan-card:hover { border-color: rgba(104, 81, 241, 0.55); }

.plan-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.25s ease;
}

.plan-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.plan-name {
    flex: 1;
    font-variation-settings: var(--fw-bold);
    font-size: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-variation-settings: var(--fw-black);
    font-size: 1.02rem;
}

.plan-price small {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    font-variation-settings: var(--fw-normal);
}

.plan-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(104, 81, 241, 0.18) 0%, rgba(104, 81, 241, 0.05) 100%);
    box-shadow: 0 8px 24px rgba(104, 81, 241, 0.22);
    transform: translateY(-2px);
}

.plan-card.selected .plan-radio { border-color: var(--primary); }

.plan-card.selected .plan-radio::after { transform: translate(-50%, -50%) scale(1); }

/* --- فیلد آی‌دی تلگرام --- */
.username-group {
    display: flex;
    direction: ltr;
    align-items: stretch;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.username-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(104, 81, 241, 0.12);
}

.username-icon {
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(104, 81, 241, 0.14);
    border-right: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.username-icon img { width: 21px; height: 21px; }

.username-input {
    flex: 1;
    min-width: 0;
    direction: ltr;
    text-align: left;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 13px 14px;
    font-family: var(--font-base);
    font-size: 1rem;
}

.username-input::placeholder { color: rgba(255, 255, 255, 0.3); }

#checkUserBtn {
    border: none;
    background: var(--primary);
    color: #fff;
    min-height: var(--btn-height-sm);
    padding: 0 var(--btn-pad-x);
    cursor: pointer;
    font-family: var(--font-base);
    font-variation-settings: var(--fw-bold);
    font-size: var(--btn-font);
    white-space: nowrap;
    transition: background 0.25s ease, opacity 0.25s ease;
}

#checkUserBtn:hover:not(:disabled) { background: var(--primary-hover); }

#checkUserBtn:disabled {
    background: rgba(255, 255, 255, 0.07);
    color: #8a8a94;
    cursor: not-allowed;
}

#checkUserBtn.loading { opacity: 0.65; pointer-events: none; }

/* --- تأیید دستی گیرنده --- */
.recipient-confirm {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-top: var(--space-3);
    font-size: var(--fs-small);
    line-height: 1.8;
    color: var(--warning);
    cursor: pointer;
    user-select: none;
}

.recipient-confirm input {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--warning);
    cursor: pointer;
}

.recipient-confirm.auto-gift {
    color: var(--text-main);
    margin-bottom: var(--space-3);
}

.recipient-confirm.auto-gift input {
    accent-color: var(--primary);
}

/* --- کارت پروفایل گیرنده (چپ‌چین) --- */
.recipient-card {
    display: flex;
    direction: ltr;
    align-items: center;
    gap: 13px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(104, 81, 241, 0.3);
    border-radius: 10px;
    background: rgba(104, 81, 241, 0.05);
    text-align: left;
}

.recipient-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.person-icon {
    width: 44px;
    height: 44px;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 50%;
    background: rgba(104, 81, 241, 0.15);
}

.recipient-photo {
    position: absolute;
    inset: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(104, 81, 241, 0.4);
}

.recipient-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#recipientName {
    color: var(--text-main);
    font-size: 0.95rem;
    font-variation-settings: var(--fw-bold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#recipientHandle {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.note-label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.note-input {
    width: 100%;
    resize: none;
    overflow-y: hidden;
    min-height: 76px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-base);
    font-size: 0.88rem;
    line-height: 1.8;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.note-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(104, 81, 241, 0.14);
}

.note-input::placeholder { color: rgba(255, 255, 255, 0.3); }

/* --- خلاصه سفارش و پرداخت --- */
.order-summary {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
}

.sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.93rem;
    color: rgba(255, 255, 255, 0.85);
}

.sum-row + .sum-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }

.sum-row.total {
    background: rgba(104, 81, 241, 0.12);
    font-variation-settings: var(--fw-black);
    color: var(--text-main);
    font-size: 1.05rem;
}

.step-col-pay .glass-btn { margin-top: 18px; }

.glass-btn.loading,
.glass-btn.loading:disabled {
    background: linear-gradient(135deg, #7c66ff 0%, var(--primary) 60%, var(--primary-hover) 100%) !important;
    color: #fff;
    opacity: 0.9;
    cursor: wait;
    box-shadow: var(--glow-primary);
    transform: none;
}

.verified-lottie {
    width: 36px;
    height: 36px;
    margin-left: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

#orderError { margin: 12px 0 0 0; }

.gateway-note {
    margin-top: 14px;
    font-size: 0.78rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.hidden { display: none !important; }

/* ============================================================
   صفحه نتیجه سفارش
   ============================================================ */
.result-card {
    max-width: 560px;
    margin: 30px auto;
    padding: clamp(28px, 4vw, 44px);
    text-align: center;
}

.result-card h1 { font-size: 1.35rem; margin: 18px 0 10px 0; }

.result-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 2;
    font-size: 0.98rem;
}

.result-details {
    margin-top: 24px;
    text-align: right;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.tx-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.tx-link:hover { text-decoration: underline; }

.result-actions {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.result-actions .telegram-btn {
    width: 100%;
    max-width: 320px;
    text-decoration: none;
    background: linear-gradient(135deg, #7c66ff 0%, var(--primary) 60%, var(--primary-hover) 100%);
    box-shadow: var(--glow-primary);
}

.sim-note {
    margin-top: 14px;
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--warning);
    background: rgba(255, 184, 77, 0.08);
    border: 1px dashed rgba(255, 184, 77, 0.35);
    border-radius: 8px;
    padding: 8px 14px;
}

.status-lottie {
    width: 96px;
    height: 96px;
    margin: 0 auto;
    display: block;
}

.loading-lottie {
    filter: brightness(0) saturate(100%) invert(35%) sepia(50%) saturate(6144%) hue-rotate(243deg) brightness(98%) contrast(93%);
}

.success-lottie {
    filter: brightness(0) saturate(100%) invert(58%) sepia(51%) saturate(3733%) hue-rotate(97deg) brightness(97%) contrast(83%);
}

.status-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto;
    border-radius: 50%;
    position: relative;
}

.status-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
}

.status-icon.giftFailed { color: #ffb84d; }

.status-icon.payFailed,
.status-icon.pendingPayment,
.status-icon.notfound { color: var(--error-color); }

.premium-back {
    text-align: center;
    margin-top: 34px;
}

.back-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.3s ease;
}

.back-link:hover { color: var(--primary); }

/* ============================================================
   موبایل و صفحات کوتاه: تک‌ستونه با اسکرول طبیعی
   ============================================================ */
@media (max-width: 980px), (max-height: 700px) {
    body.premium-fit {
        height: auto;
        overflow: auto;
    }

    .premium-main {
        height: auto;
        gap: 16px;
    }

    .premium-card {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .plan-card { min-height: 0; }

    .step-col-pay .glass-btn { margin-top: 18px; }
}

@media (max-width: 480px) {
    .premium-main { padding: 18px 14px; }
    .premium-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}
