/**
 * استایل‌های عمومی افزونه Haghani Plus (بخش کاربری)
 */

/* --- نمودار طلا --- */
.haghani-plus-gold-chart {
    margin-bottom: 10px;
    border-radius: 15px;
    border: 1px solid #eee;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    background: #fff;
}

.haghani-chart-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid #f1c40f;
    display: inline-block;
    padding-bottom: 8px;
}

/* --- داشبورد اشتراک ویژه --- */
.haghani-vip-dashboard {
    font-family: inherit;
}

/* کارت وضعیت فعلی */
.haghani-status-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    border: 1px solid #f0f0f0;
}

.haghani-status-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.haghani-status-text {
    flex: 1;
    min-width: 200px;
}

.haghani-section-title {
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.haghani-active-plan {
    margin: 5px 0;
    font-size: 16px;
    color: #555;
}

.haghani-active-plan strong {
    color: #27ae60;
    font-size: 18px;
}

.haghani-expiry-date {
    margin: 5px 0;
    color: #777;
    font-size: 14px;
}

.haghani-no-plan {
    color: #c0392b;
    font-weight: bold;
    margin: 5px 0;
    font-size: 16px;
}

.haghani-plan-desc {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

/* --- تایمر شمارش معکوس --- */
.haghani-timer-box {
    background: #2c3e50;
    padding: 15px 25px;
    border-radius: 12px;
    color: #fff;
    text-align: center;
    min-width: 260px;
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.3);
}

.haghani-timer-label {
    font-size: 12px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.haghani-countdown {
    display: flex;
    gap: 8px;
    justify-content: center;
    direction: ltr; /* اعداد انگلیسی */
    align-items: center;
}

.haghani-countdown .time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.haghani-countdown .time-box span:first-child {
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}

.haghani-countdown .time-box span:last-child {
    font-size: 10px;
    text-transform: uppercase;
    margin-top: 3px;
    opacity: 0.8;
}

.haghani-seconds {
    color: #f1c40f;
}

.time-sep {
    font-size: 20px;
    line-height: 1;
    margin-top: -15px; /* تنظیم تراز دو نقطه */
    font-weight: bold;
}

.haghani-expired-msg {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
}

/* --- گرید پکیج‌های اشتراک --- */
.haghani-section-title-sub {
    margin-bottom: 25px;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.haghani-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* کارت پکیج */
.haghani-plan-card {
    background: #fff;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.haghani-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* هدر کارت‌ها (رنگ‌بندی) */
.haghani-plan-header {
    padding: 25px;
    text-align: center;
    color: #fff;
}

.plan-silver .haghani-plan-header { background: #95a5a6; }
.plan-gold .haghani-plan-header { background: #f1c40f; }
.plan-platinum .haghani-plan-header { background: #2c3e50; }

.haghani-plan-icon {
    font-size: 45px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.haghani-plan-title {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

/* بدنه کارت */
.haghani-plan-body {
    padding: 25px;
    flex-grow: 1;
}

.haghani-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    color: #555;
    line-height: 2.2;
    font-size: 14px;
}

.haghani-plan-features li {
    border-bottom: 1px dashed #eee;
}

.haghani-plan-features li:last-child {
    border-bottom: none;
}

/* باکس انتخاب قیمت */
.haghani-price-selector-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
}

.haghani-price-display {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.haghani-price-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.haghani-price-option del {
    color: #999;
    font-size: 14px;
    margin-bottom: 2px;
}

.haghani-price-option span {
    color: #d63031;
    font-size: 22px;
    font-weight: bold;
}

.haghani-price-regular {
    color: #333;
    font-size: 22px;
    font-weight: bold;
}

.haghani-label-duration {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #777;
    text-align: right;
}

.haghani-plan-select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

/* فوتر کارت */
.haghani-plan-footer {
    padding: 0 25px 25px 25px;
}

.haghani-btn-buy {
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.plan-silver .haghani-btn-buy { background-color: #95a5a6; }
.plan-gold .haghani-btn-buy { background-color: #f1c40f; }
.plan-platinum .haghani-btn-buy { background-color: #2c3e50; }

.haghani-btn-buy:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* --- بخش آدرس‌ها (ادغام شده) --- */
.haghani-address-section {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.haghani-address-title {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
    display: inline-block;
    padding-bottom: 5px;
}

/* --- شورت‌کد وضعیت --- */
.vip-status-shortcode {
    display: inline-block;
    padding: 5px 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
    font-size: 12px;
    color: #555;
}
/* --- استایل بج‌های اشتراک ویژه (VIP Badges) --- */

/* استایل پایه بج ویژه */
.vip-badge-label {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    margin-right: 5px; /* فاصله از بج درصد */
    /*box-shadow: 0 2px 5px rgba(0,0,0,0.15);*/
    vertical-align: middle;
}

/* رنگ‌بندی اختصاصی */
.vip-badge-label.silver {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
}

.vip-badge-label.gold {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.vip-badge-label.platinum {
    background: linear-gradient(135deg, #34495e 0%, #000000 100%);
    border: 1px solid #555;
}

/* پوزیشن بج روی کارت محصول (absolute) */
.card .vip-badge-label {
    position: absolute;
    top: 45px; /* پایین‌تر از بج درصد */
    right: auto; /* یا left بسته به جهت سایت */
    left:10px;
    z-index: 10;
}

/* =========================================
   استایل‌های مودال پلاس (تک محصول)
   ========================================= */

.haghani-plus-modal-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.haghani-plus-modal-wrapper .haghani-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgb(255 255 255 / 60%);
    backdrop-filter: blur(4px);
}

.haghani-plus-modal-wrapper .haghani-modal-content {
    position: relative;
    /*background: #fff;*/
    background:#fcf4e9;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    z-index: 10;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.haghani-plus-modal-wrapper .haghani-modal-close {
    position: absolute;
    top: 15px; left: 15px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    z-index: 11;
}

.haghani-plus-modal-wrapper .haghani-modal-header {
    text-align: center;
    padding: 25px 20px 15px;
}

.haghani-plus-modal-wrapper .haghani-modal-header h2 {
    margin: 0 0 5px;
    color: #a42898; /* رنگ بنفش پلاس */
    font-size: 26px;
    font-weight: 900;
}

.haghani-plus-modal-wrapper .haghani-modal-header p {
    margin: 0;
    color: #555;
    font-size: 14px;
}

.haghani-plus-modal-wrapper .haghani-modal-body {
    padding: 0 20px 20px;
    overflow-y: auto;
}
@media screen and (max-width: 900px) {
    .haghani-plus-modal-wrapper .haghani-modal-body {
    padding: 0 10px 10px;
}
}

/* آکاردئون پلن‌ها */
.haghani-plus-modal-wrapper .haghani-plan-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.haghani-plus-modal-wrapper .haghani-plan-item.active {
    border-color: #a42898;
    box-shadow: 0 2px 10px rgba(164, 40, 152, 0.1);
}

.haghani-plus-modal-wrapper .haghani-plan-item-header {
    padding: 15px;
    background: #fdfdfd;
    cursor: pointer;
}

.haghani-plus-modal-wrapper .haghani-plan-item.active .haghani-plan-item-header {
    background: #faf2f9;
    border-radius:12px 12px 0 0;
}

.haghani-plus-modal-wrapper .haghani-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}

.haghani-plus-modal-wrapper .haghani-radio-label input[type="radio"] {
    accent-color: #a42898;
    width: 18px; height: 18px;
}

.haghani-plus-modal-wrapper .haghani-plan-item-body {
    padding: 0 10px 10px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    border-radius:0 0 12px 12px;
}

/* بازه‌های زمانی */
.haghani-plus-modal-wrapper .haghani-modal-durations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.haghani-plus-modal-wrapper .haghani-duration-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.haghani-plus-modal-wrapper .haghani-duration-option:hover {
    border-color: #ccc;
}

.haghani-plus-modal-wrapper .haghani-duration-option input[type="radio"] {
    accent-color: #a42898;
}

.haghani-plus-modal-wrapper .duration-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.haghani-plus-modal-wrapper .d-title {
    font-size: 13px;
    color: #444;
}

.haghani-plus-modal-wrapper .d-prices {
    display: flex;
    align-items: center;
    gap: 8px;
}

.haghani-plus-modal-wrapper .d-prices del {
    color: #aaa;
    font-size: 12px;
}

.haghani-plus-modal-wrapper .d-prices .badge {
    background: #d63031;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.haghani-plus-modal-wrapper .d-prices strong {
    font-size: 14px;
    color: #333;
}

/* فیچرها */
.haghani-plus-modal-wrapper .haghani-modal-plan-features {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed #eee;
}

.haghani-plus-modal-wrapper .features-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.haghani-plus-modal-wrapper .features-tags span {
    background: #f6ebf5;
    /*color: #a42898;*/
    color:#111;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* فوتر و دکمه خرید */
.haghani-plus-modal-wrapper .haghani-modal-footer {
    background: #f9f9f9;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.haghani-plus-modal-wrapper .haghani-price-total {
    display: flex;
    flex-direction: column;
}

.haghani-plus-modal-wrapper .haghani-price-total span {
    font-size: 12px;
    color: #777;
}

.haghani-plus-modal-wrapper .haghani-price-total strong {
    font-size: 18px;
    color: #333;
}

.haghani-plus-modal-wrapper #haghani-modal-submit-btn {
    background: #a42898;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.haghani-plus-modal-wrapper #haghani-modal-submit-btn:hover {
    background: #8b1d7f;
}
/* استایل مربوط به دراپ‌داون در مودال */
.haghani-plus-modal-wrapper .haghani-modal-durations-select-wrapper {
    margin-top: 15px;
}

.haghani-plus-modal-wrapper .haghani-modal-duration-select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fcfcfc;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.haghani-plus-modal-wrapper .haghani-modal-duration-select:focus {
    border-color: #a42898;
}

/* =========================================
   استایل‌های لیست کشویی اختصاصی (Custom Select)
   ========================================= */

.haghani-plus-modal-wrapper .haghani-custom-select {
    position: relative;
    margin-top: 15px;
    user-select: none;
}

.haghani-plus-modal-wrapper .haghani-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.haghani-plus-modal-wrapper .haghani-select-trigger:hover {
    border-color: #a42898;
}

.haghani-plus-modal-wrapper .haghani-select-trigger-content {
    flex: 1;
}

.haghani-plus-modal-wrapper .haghani-select-arrow {
    margin-right: 15px;
    font-size: 10px;
    color: #888;
    transition: transform 0.3s;
}

.haghani-plus-modal-wrapper .haghani-custom-select.open .haghani-select-arrow {
    transform: rotate(180deg);
}

.haghani-plus-modal-wrapper .haghani-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    margin-top: -2px; /* برای اینکه مرز بالا و پایین تمیز در بیاد */
    border-radius: 12px;
}

.haghani-plus-modal-wrapper .haghani-custom-select.open .haghani-select-options {
    display: block;
}

.haghani-plus-modal-wrapper .haghani-select-option {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.haghani-plus-modal-wrapper .haghani-select-option:last-child {
    border-bottom: none;
}

.haghani-plus-modal-wrapper .haghani-select-option:hover,
.haghani-plus-modal-wrapper .haghani-select-option.selected {
    background: #fdf6fb;
}

/* رفع مشکل چپ‌چین شدن قیمت‌ها تو زبان فارسی */
.haghani-plus-modal-wrapper .d-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr; /* مهم: برای اینکه بج قرمز بیاد سمت چپ مبلغ خط‌خورده */
}

.haghani-plus-modal-wrapper .d-prices strong {
    font-size: 14px;
    color: #333;
    direction: rtl; /* بازگشت جهت مبلغ به راست‌چین */
}

/* رفع مشکل قیچی شدن لیست کشویی در آکاردئون‌ها */
.haghani-plus-modal-wrapper .haghani-plan-item {
    position: relative;
    z-index: 1;
}

.haghani-plus-modal-wrapper .haghani-plan-item.active {
    overflow: visible !important;
    z-index: 10;
}

/* =========================================
   بخش مزایای کلی مودال (Global Features)
   ========================================= */

.haghani-plus-modal-wrapper .haghani-modal-global-features {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e5e5e5;
}

.haghani-plus-modal-wrapper .global-features-title {
    text-align: center;
    color: #a42898;
    font-size: 15px;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.haghani-plus-modal-wrapper .global-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.haghani-plus-modal-wrapper .global-features-list li {
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.haghani-plus-modal-wrapper .global-features-list li svg {
    flex-shrink: 0;
}

/* VIP Profile Avatar Badge with Shine Effect */
.dm-sidebar-header .dm-user-avatar,
#navigation .haghani-avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dm-sidebar-header .dm-user-avatar .haghani-vip-badge-wrap,
#navigation .haghani-avatar-wrapper .haghani-vip-badge-wrap {
    position: absolute;
    bottom: 0;
    right: -4px;
    cursor: help;
    z-index: 10;
}

.dm-sidebar-header .dm-user-avatar .haghani-vip-avatar-badge,
#navigation .haghani-avatar-wrapper .haghani-vip-avatar-badge {
    width: 28px;
    height: 28px;
    background: var(--vip-color, #f1c40f);
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
}

.dm-sidebar-header .dm-user-avatar .haghani-vip-avatar-badge svg,
#navigation .haghani-avatar-wrapper .haghani-vip-avatar-badge svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    z-index: 2;
}

.dm-sidebar-header .dm-user-avatar .haghani-vip-avatar-badge::before,
#navigation .haghani-avatar-wrapper .haghani-vip-avatar-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    transform: skewX(-25deg);
    animation: haghani-shine-anim 3s infinite;
    z-index: 1;
}

@keyframes haghani-shine-anim {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.dm-sidebar-header .dm-user-avatar .haghani-vip-badge-wrap::after,
#navigation .haghani-avatar-wrapper .haghani-vip-badge-wrap::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #2c3e50;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-weight: normal;
}

.dm-sidebar-header .dm-user-avatar .haghani-vip-badge-wrap:hover::after,
#navigation .haghani-avatar-wrapper .haghani-vip-badge-wrap:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}