/**
 * TSC Service Checkout — Subscription Card (GPT/Gemini style)
 */

/* ══ إخفاء عناصر WooCommerce الافتراضية للمنتجات الخدمية ══ */
.tsc-hidden-cart-form {
    display: none !important;
    height: 0;
    overflow: hidden;
}

/* ══ كارت الاشتراك الرئيسي ══ */
.tsc-plan-card {
    position: relative;
    max-width: 420px;
    margin: 24px 0;
    border-radius: 20px;
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.tsc-plan-glow {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa, #6366f1);
    background-size: 300% 300%;
    animation: tsc-glow-shift 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

@keyframes tsc-glow-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tsc-plan-inner {
    position: relative;
    background: #0f0f23;
    border-radius: 20px;
    padding: 32px 28px;
    z-index: 2;
}

/* ══ البادج ══ */
.tsc-plan-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* ══ اسم الخطة ══ */
.tsc-plan-name {
    color: #f8fafc;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.4;
}

/* ══ التسعير ══ */
.tsc-plan-pricing {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
    direction: ltr;
    justify-content: flex-end;
}

.tsc-plan-amount {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -1px;
}

.tsc-plan-currency {
    font-size: 18px;
    font-weight: 600;
    color: #94a3b8;
}

/* ══ الوصف ══ */
.tsc-plan-desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* ══ رصيد المستخدم ══ */
.tsc-plan-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 20px;
    color: #c4b5fd;
    font-size: 13px;
}

.tsc-plan-balance-icon {
    font-size: 20px;
}

.tsc-plan-balance strong {
    color: #a78bfa;
    font-size: 16px;
}

/* ══ الزر الرئيسي ══ */
.tsc-plan-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.tsc-plan-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.tsc-plan-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    filter: brightness(1.08);
}

.tsc-plan-btn-primary:active {
    transform: translateY(0);
}

.tsc-plan-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.tsc-plan-btn-login {
    background: transparent;
    border: 2px solid rgba(99, 102, 241, 0.5);
    color: #a78bfa;
}

.tsc-plan-btn-login:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #c4b5fd;
}

/* ══ ملاحظة الأمان ══ */
.tsc-plan-secure {
    text-align: center;
    color: #64748b;
    font-size: 12px;
    margin: 14px 0 0;
}

/* ══ المميزات ══ */
.tsc-plan-features {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 20px;
}

.tsc-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
    padding: 8px 0;
    line-height: 1.5;
}

.tsc-plan-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: #a78bfa;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    margin-top: 1px;
}

/* ══ حالة التحميل ══ */
.tsc-svc-loading {
    text-align: center;
    padding: 20px 0 0;
}

.tsc-svc-loading p {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 12px;
}

.tsc-svc-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: tsc-spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes tsc-spin {
    to { transform: rotate(360deg); }
}

/* ══ رسالة الخطأ ══ */
.tsc-svc-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 14px;
}

.tsc-svc-error p {
    color: #fca5a5;
    font-size: 13px;
    margin: 0;
}

/* ══ زر الأرشيف / الشوب ══ */
.tsc-svc-loop-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-align: center;
    padding: 10px 20px !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
}

.tsc-svc-loop-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* ══ Responsive ══ */
@media (max-width: 480px) {
    .tsc-plan-inner {
        padding: 24px 20px;
    }
    .tsc-plan-amount {
        font-size: 40px;
    }
    .tsc-plan-name {
        font-size: 18px;
    }
    .tsc-plan-btn {
        font-size: 15px;
        padding: 14px 20px;
    }
}
