/* استایل کلی دکمه‌ها */
.dm-waitlist-btn-class, .dm-wishlist-btn-class {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: var(--dm-btn-bg, #fff);
    color: var(--dm-btn-text, #333);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 0 4px;
}

.dm-waitlist-btn:hover, .dm-wishlist-btn:hover {
    /*filter: brightness(0.95);*/
    /*border-color: #bbb;*/
    color: #ff6600;
}

.dm-waitlist-btn.active, .dm-wishlist-btn.active {
    background: #ffffff00;
    border-color: transparent;
    border: none;
    color: #ff6600;
    width: 100%;
    height: 100%;
    padding-top: 7px;
}
.dm-wishlist-btn {
    background: #ffffff00;
    border-color: transparent;
    border: none;
    width: 100%;
    height: 100%;
    padding-top: 7px;
}

/* آیکون SVG */
.dm-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    transition: fill 0.3s ease;
}

.dm-waitlist-btn.active .dm-icon svg,
.dm-wishlist-btn.active .dm-icon svg {
    fill: currentColor;
}
.dm-waitlist-btn{
    width: 100%;
    height: 100%;
    text-align: center;
    padding-top: 20px;
}

/* --- استایل مودال (جدید) --- */
.dm-modal {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6); /* پس‌زمینه تاریک‌تر */
    backdrop-filter: blur(2px); /* افکت بلور پشت */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* کلاس کمکی برای نمایش با انیمیشن */
.dm-modal.show {
    opacity: 1;
    visibility: visible;
}

.dm-modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.dm-modal.show .dm-modal-content {
    transform: translateY(0);
}

.dm-modal-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dm-modal-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.dm-close {
    color: #999;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.dm-close:hover {
    color: #333;
}

.dm-modal-body {
    padding: 20px;
    text-align: center;
}

.dm-modal-body p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.dm-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    direction: ltr;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box; /* جلوگیری از بیرون زدگی */
}

.dm-input:focus {
    border-color: #007cba;
}

.dm-submit-btn {
    width: 100%;
    padding: 12px !important;
    font-size: 15px !important;
    margin-top: 15px;
    background-color: #007cba !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background 0.3s;
}

.dm-submit-btn:hover {
    background-color: #006ba1 !important;
}

/* باکس پیام */
.dm-msg-box {
    margin-top: 15px;
    font-size: 13px;
    min-height: 20px;
    display: none; /* پیش‌فرض مخفی */
}

.dm-msg-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    display: block;
}

.dm-msg-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    display: block;
}

/* --- استایل جداول پنل کاربری --- */
.dm-panel-wrapper {
    margin-bottom: 30px;
    overflow-x: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.dm-custom-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    margin: 0;
}

.dm-custom-table th, .dm-custom-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
}

.dm-custom-table thead th {
    background-color: #f8f9fa;
    color: #444;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #eee;
}

.dm-product-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: #333;
}

.dm-product-link:hover {
    color: #007cba;
}

.dm-product-link img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    display: block;
}

.dm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.dm-badge-success {
    background-color: #e6fffa;
    color: #047481;
}

.dm-badge-danger {
    background-color: #fff5f5;
    color: #c53030;
}

@media screen and (max-width: 768px) {
    .dm-custom-table thead {
        display: none;
    }

    .dm-custom-table tbody, .dm-custom-table tr, .dm-custom-table td {
        display: block;
        width: 100%;
    }

    .dm-custom-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
    }

    .dm-custom-table td {
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px dashed #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dm-custom-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #777;
        font-size: 12px;
        margin-left: 10px;
    }

    .dm-td-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dm-td-product::before {
        display: none;
    }

    .dm-custom-table .dm-waitlist-btn, .dm-custom-table .dm-wishlist-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- استایل جدول پنل کاربری --- */
.dm-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.dm-dashboard-table th {
    /* استفاده از رنگ پس‌زمینه انتخابی کاربر برای هدر جدول */
    background: var(--dm-btn-bg, #f4f4f4);

    /* استفاده از رنگ متن انتخابی کاربر */
    color: var(--dm-btn-text, #333);

    padding: 15px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.dm-dashboard-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

/* --- استایل دکمه حذف در جدول --- */
.dm-btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #dc3545; /* رنگ قرمز برای حذف به صورت پیش‌فرض */
    transition: all 0.2s;
    cursor: pointer;
}

.dm-btn-remove:hover {
    /* در حالت هاور، از رنگ تنظیم شده (مثلا رنگ اصلی سایت) استفاده شود */
    background: var(--dm-btn-bg, #dc3545);
    color: var(--dm-btn-text, #fff);
    border-color: var(--dm-btn-bg, #dc3545);
}

/* --- استایل بج‌های وضعیت (Badges) --- */
.dm-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* حالت‌های خاص بج */
.dm-status-badge.in-stock {
    /* استفاده از رنگ اکتیو (معمولا سبز) برای موجود */
    background-color: var(--dm-btn-active, #28a745);
    color: #fff;
}

.dm-status-badge.out-of-stock {
    /* برای ناموجود بهتر است قرمز بماند یا از رنگ متن استفاده شود */
    background-color: #dc3545;
    color: #fff;
}

/* اگر دکمه‌های دیگری در پنل هستند */
.dm-dashboard-actions a.button {
    background: var(--dm-btn-bg, #eee);
    color: var(--dm-btn-text, #333);
    border: 1px solid #ddd;
}