﻿/*  #region Subscription Box */

.subscription-box {
    background: #fff;
    border-radius: 18px;
    padding: 15px 28px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    font-family: inherit;
}


.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.subscription-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

    .status-badge i {
        font-size: 14px;
    }

    .status-badge.active {
        background: #ecfdf5;
        color: #16a34a;
    }

    .status-badge.warning {
        background: #fffbeb;
        color: #d97706;
    }

    .status-badge.expired {
        background: #fef2f2;
        color: #dc2626;
    }

.days-remaining {
    background: linear-gradient(135deg,#6366f1,#8b5cf6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

    .days-remaining.active {
        background: #ecfdf5;
        color: #16a34a;
    }

    .days-remaining.warning {
        background: #fffbeb;
        color: #d97706;
    }

    .days-remaining.expired {
        background: #fef2f2;
        color: #dc2626;
    }

.subscription-info {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 30px;
}

/* تاریخ‌ها باید بقیه فضا را بگیرند */
.date-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* شیک، باعث جلوگیری از شکست‌های عجیب می‌شود */
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    align-items: center;
}

    .date-item label {
        color: #6b7280;
        font-size: 13px;
    }

/* progress نباید کوچک شود و باید هر مقدار فضا نیاز دارد بگیرد */
.progress-circle {
    flex-shrink: 0;
}


.progress-circle {
    flex-shrink: 0;
}

.progress-circle {
    width: 95px;
    height: 95px;
    position: relative;
}

    .progress-circle svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }

    .progress-circle circle {
        fill: none;
        stroke-width: 8;
        stroke-linecap: round;
    }

    .progress-circle .bg {
        stroke: #e5e7eb;
    }

    .progress-circle .bar {
        stroke-dasharray: 264; /* محیط دایره */
        stroke-dashoffset: 264;
        transition: stroke-dashoffset 1.5s ease-out;
    }

    /* متن داخل دایره */
    .progress-circle .percent {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 17px;
        font-weight: 700;
    }


    .progress-circle.active .bar {
        stroke: #16a34a;
    }

    .progress-circle.active .percent {
        color: #16a34a;
    }

    .progress-circle.warning .bar {
        stroke: #d97706;
    }

    .progress-circle.warning .percent {
        color: #d97706;
    }

    .progress-circle.expired .bar {
        stroke: #dc2626;
    }

    .progress-circle.expired .percent {
        color: #dc2626;
    }




@media (max-width:500px) {

    .subscription-info {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .date-item {
        width: 100%;
    }

    .progress-circle {
        align-self: center; /* وسط چین شود */
        margin-top: 10px;
    }
}


/*   #endregion Subscription Box */


/*    #region Plan */

.pricing-wrapper {
    margin-bottom: 28px;
}


/*  کانتینر پلن‌ها – ریسپانسیو و وسط‌چین  */
.pricing-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
}

/*  کارت پلن – ارتفاع یکسان و مدرن  */
.plan-card {
    background: #ffffff;
    width: 280px; /* 👈 عرض ثابت */
    min-width: 240px; /* 👈 مهم‌ترین قسمت */
    padding: 24px 20px 20px;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 360px; /* یکسان‌سازی ارتفاع */
}

    /* hover خاص + glow */
    .plan-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
        border-color: #6366f1;
    }

    /* پلن پیشنهادی (کمی برجسته‌تر) */
    .plan-card.recommended {
        border-width: 2px;
        border-color: #f97316;
        box-shadow: 0 18px 50px rgba(249, 115, 22, 0.25);
    }

/* آیکن بالای هر کارت */
.plan-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #4f46e5;
    font-size: 26px;
}

    /* می‌تونی بعداً با فونت آیکن جایگزین کنی */
    .plan-icon i {
        font-style: normal;
    }

/* ریبون تخفیف / نوع پلن گوشه کارت */
.plan-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #6366f1;
    color: #fff;
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 20px;
    line-height: 1.6;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    direction: rtl;
}

/* رنگ‌ها */
.plan-ribbon--best {
    background: linear-gradient(135deg,#ff7a18,#ff3d77);
}

.plan-ribbon--monthly {
    background: #0ea5e9;
}

.plan-ribbon--semiannual {
    background: #22c55e;
}

.plan-ribbon--yearly {
    background: #0f766e;
}


/* عنوان پلن */
.title {
    font-size: 20px;
    margin-bottom: 12px;
    text-align: center;
    color: #0f172a;
}

.plan-card .badge {
    position: absolute;
    top: -12px;
    right: 15px;
    background: linear-gradient(135deg, #f97316, #fb7185);
    color: #fff;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 25px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35);
    direction: rtl;
    z-index: 10;
}



/* باکس قیمت – وسط‌چین و با ارتفاع ثابت */
.price-box {
    text-align: center;
    margin-bottom: 16px;
    min-height: 70px; /* برای یکسان ماندن ارتفاع */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* قیمت اصلی */
.original-price {
    text-decoration: line-through;
    font-size: 13px;
    color: #9ca3af;
    display: block;
}

/* قیمت نهایی */
.final-price {
    display: block;
    font-size: 24px;
    font-weight: 800;
    margin-top: 4px;
    color: #111827;
}

.highlight {
    background: linear-gradient(135deg, #f97316, #ec4899);
    -webkit-background-clip: text;
    color: transparent;
}

/* متن تخفیف زیر قیمت */
.discount {
    font-size: 12px;
    color: #f97316;
    margin-top: 4px;
    display: block;
}

/* لیست ویژگی‌ها – ارتفاع نسبی ثابت برای یکسان شدن کارت‌ها */
.features {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    flex-grow: 1; /* پر کردن فضای وسط کارت */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

    .features li {
        padding: 5px 0;
        font-size: 14px;
        color: #4b5563;
        position: relative;
        padding-right: 18px;
    }

/* بولت آیکنی برای هر ویژگی */
/*.features li::before {
            content: "•";
            position: absolute;
            right: 0;
            top: 0;
            color: #6366f1;
            font-size: 18px;
            line-height: 1.2;
        }*/

/* دکمه خرید – همیشه در پایین کارت */
.buy-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    padding: 11px 0;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    margin-top: auto;
    text-align:center;
}

    .buy-btn:hover {
        background: linear-gradient(135deg, #4f46e5, #4338ca);
        box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
        transform: translateY(-1px);
    }

/* دکمه پلن پیشنهادی کمی پررنگ‌تر */
.plan-card.recommended .buy-btn {
    background: linear-gradient(135deg, #f97316, #fb7185);
}

    .plan-card.recommended .buy-btn:hover {
        background: linear-gradient(135deg, #ea580c, #ec4899);
    }

/* ریسپانسیو – تبلت */
@media (max-width: 992px) {
    .pricing-container {
        max-width: 700px;
        gap: 18px;
    }
}

/* ریسپانسیو – موبایل */
@media (max-width: 640px) {



    .plan-ribbon {
        right: 12px;
        transform: rotate(0deg);
        top: 10px;
    }

    .plan-card {
        width: 240px;
    }
}

.discount {
    font-size: 13px;
    color: #ff3d77;
    margin-top: 4px;
    display: block;
    direction: rtl;
    font-weight: 500;
}


.pricing-wrapper {
    width: 100%;
}

.pricing-box {
    width: 100%;
    border-radius: 24px;
    padding: 10px 10px;
    /* 🎨 گرادینت خیلی لوکس و مدرن */
    background: linear-gradient( 135deg, #f8fafc 0%, #eef2ff 40%, #f1f5f9 100% );
    /* 👇 افکت عمق حرفه‌ای */
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

    .pricing-box::before {
        content: "";
        position: absolute;
        top: -100px;
        left: -100px;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
        pointer-events: none;
    }

.plan-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    transition: all 0.3s ease;
}

    .plan-card:hover {
        transform: translateY(-6px) scale(1.03);
        box-shadow: 0 20px 45px rgba(99, 102, 241, 0.15);
    }





.pricing-container::-webkit-scrollbar {
    height: 8px;
}

.pricing-container::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 10px;
}

.pricing-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 10px;
}

.plan-card {
    /* ... بقیه استایل‌های فعلی‌ات ... */
    scroll-snap-align: start; /* 👈 کارت‌ها روی اسکرول قفل شن */
}


.pricing-container {
    padding: 20px 20px; /* padding افقی کمتر شود */
}


.plan-card {
    position: relative;
    width: 280px;
    min-width: 240px;
    min-height: 360px;
    padding: 24px 20px 20px;
    border-radius: 22px;
    /* ✅ گرادینت خیلی نرم و مدرن */
    background: linear-gradient( 145deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.95) 60%, rgba(241,245,249,1) 100% );
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 8px 25px rgba(15,23,42,0.05), inset 0 1px 0 rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(.4,.2,.2,1);
    z-index: 1;
}

    .plan-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: radial-gradient( circle at top right, rgba(99,102,241,0.12), transparent 60% );
        opacity: 0;
        transition: opacity .4s ease;
        pointer-events: none;
    }


    .plan-card:hover {
        transform: translateY(-10px) scale(1.035);
        box-shadow: 0 25px 40px rgba(99,102,241,0.18), 0 10px 25px rgba(15,23,42,0.12);
        border-color: rgba(99,102,241,0.4);
        z-index: 10;
    }

        .plan-card:hover::before {
            opacity: 1;
        }


    .plan-card.recommended {
        background: linear-gradient( 145deg, #ffffff, #fff7ed );
        border: 2px solid rgba(249,115,22,0.6);
        box-shadow: 0 15px 40px rgba(249,115,22,0.18);
    }

        .plan-card.recommended:hover {
            box-shadow: 0 25px 40px rgba(249,115,22,0.35);
        }



.plan-card {
    opacity: 0;
    transform: translateY(40px) scale(.96);
    animation: cardReveal .7s cubic-bezier(.22,.61,.36,1) forwards;
}

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.plan-card:nth-child(1) {
    animation-delay: .2s;
}

.plan-card:nth-child(2) {
    animation-delay: .45s;
}

.plan-card:nth-child(3) {
    animation-delay: .6s;
}

.plan-card:nth-child(4) {
    animation-delay: .75s;
}


.pricing-container.dragging {
    cursor: grabbing;
    user-select: none;
}

.pricing-container {
    cursor: grab;
}



/* حالت پیشفرض: اسکرول مخفی */
.pricing-container {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

/*     Chrome / Edge / Safari 
    .pricing-container::-webkit-scrollbar {
        height: 0px;
    }

     وقتی موس روی کانتینر میره 
    .pricing-container:hover {
        scrollbar-width: thin;  Firefox 
        scrollbar-color: #6366f1 #e5e7eb;  thumb / track 
    }

         ظاهر اسکرول در Webkit 
        .pricing-container:hover::-webkit-scrollbar {
            height: 8px;
        }

        .pricing-container:hover::-webkit-scrollbar-track {
            background: #e5e7eb;
            border-radius: 10px;
        }

        .pricing-container:hover::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #6366f1, #818cf8);
            border-radius: 10px;
        }

            .pricing-container:hover::-webkit-scrollbar-thumb:hover {
                background: linear-gradient(135deg, #4f46e5, #6366f1);
            }

*/

/* #endregion*/


/* #region Historyb*/


/* History box */
.history-box {
    margin-top: 30px;
    margin-bottom:30px;
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    width:100%;
}

/* Header */
.history-header {
    margin-bottom: 16px;
}

    .history-header h4 {
        font-size: 16px;
        font-weight: 600;
        color: #111827;
    }

/* Table wrapper */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    /* Head */
    .history-table thead {
        background: #f8fafc;
    }

    .history-table th {
        padding: 12px;
        font-weight: 600;
        color: #4b5563;
        text-align: center;
    }

    /* Body */
    .history-table td {
        padding: 12px;
        text-align: center;
        color: #374151;
    }

    /* Row border */
    .history-table tbody tr {
        border-bottom: 1px solid #f1f5f9;
    }

        /* Hover effect */
        .history-table tbody tr:hover {
            background: #f9fafb;
        }

/* Highlight current subscription */
.current-row {
    background: #f5f7ff;
}



/* Responsive */
@media (max-width:768px) {

    .history-table {
        font-size: 13px;
    }

        .history-table th,
        .history-table td {
            padding: 10px 8px;
        }
}



.subscription-box,
.history-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 28px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}

/* #endregion*/


.table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
}