.contents-style {
  width: 76%;
  float: left;
  padding: 1px 2px;
  margin-top: 30px;
}

.lbxw-layer{
  position:fixed;top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:9999;
}
.lbxw-modal{
  background:#fff;border-radius:8px;padding:24px;width:320px;text-align:center;box-shadow:0 10px 25px rgba(0,0,0,.25);
}
.lbxw-modal input{
  width:100%;padding:8px;margin:12px 0;border:1px solid #d1d5db;border-radius:6px;text-align:center;direction:ltr;
}
.lbxw-modal button{
  background:#0073aa;border:none;color:#fff;padding:8px 18px;border-radius:6px;cursor:pointer;
}
.lbxw-modal button:hover{background:#005a87}

/* --- حالت لودینگ دکمه‌های افزونه --- */
.lbxw-btn-loading{
  position: relative;
  pointer-events: none;
  opacity: .7;
}

.lbxw-btn-loading::after{
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: #fff;         /* رنگ چرخنده */
  border-radius: 50%;
  animation: lbxw-spin .6s linear infinite;
}

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

/* ــ لودینگ فول‑پیج هنگام درخواست Ajax ــ */
.lbxw-loading{
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.lbxw-loading::after{
  content: "";
  width: 48px; height: 48px;
  border: 5px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: lbxw-spin .8s linear infinite;
}

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


/* ───────────── 1. جدول لایسنس ───────────── */
.lbxw-table{
    width:100%;                   /* پهنای کامل ستون محتوا */
    box-sizing:border-box;        /* مرز و پَدینگ داخل ۱۰۰٪ حساب شود → Drop نمی‌کند */
    border-collapse:collapse;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:8px;
    overflow:hidden;
    font-size:14px;
    color:#374151;
    direction:rtl;
    box-shadow:0 2px 6px rgba(0,0,0,.04);
}

.lbxw-table thead th{
    background:#1b795a;
    color:#111827;
    font-weight:600;
    padding:13px 10px;
    text-align:center;
    border-bottom:1px solid #e5e7eb;
    position:sticky;top:0;z-index:2;
}

.lbxw-table tbody td{
    padding:12px 8px;
    text-align:center;
    border-bottom:1px solid #f3f4f6;
}
.lbxw-table tbody tr:nth-child(even){background:#fafafa}
.lbxw-table tbody tr:last-child td{border-bottom:none;}
.lbxw-table tbody tr:hover{background:#eef6ff}

/* ستون کلید */
.lbxw-table code{
    font-family:monospace;
    direction:ltr;
    font-size:13px;
    user-select:all;
    word-break:break-all;
}

/* دکمه تغییر دامنه */
.lbxw-change{
    display:inline-flex;align-items:center;gap:6px;
    background:linear-gradient(135deg,#16a34a 0%,#1bc85d 100%);
    color:#fff;border:none;
    padding:7px 14px;
    border-radius:5px;
    font-size:13px;font-weight:600;
    cursor:pointer;
    transition:.18s;
}
.lbxw-change:hover{transform:translateY(-2px);background:#129041}

/* ───────────── 2. Wrapper کتابخانه simple‑datatables ───────────── */
.dataTable-wrapper{
    clear:none !important;     /* لغو قانون ووکامرس */
    float:none !important;
    width:100%!important;
    margin:12px 0 30px;
    box-sizing:border-box;
}

.dataTable-top,
.dataTable-bottom{
    display:flex;flex-wrap:wrap;
    align-items:center;justify-content:space-between;
    gap:8px;
    padding:6px 0 12px;
}
.dataTable-input{
    flex:1 0 220px;
    max-width:300px;
    padding:7px 10px;
    border:1px solid #d1d5db;
    border-radius:6px;
    font-size:14px;
}
.dataTable-pagination a{padding:5px 11px;border-radius:4px}
.dataTable-pagination a.current{background:#0073aa;color:#fff}

/* ───────────── 3. واکنش‌گرایی زیر 768px ───────────── */
@media (max-width:768px){
    .lbxw-table thead{display:none}
    .lbxw-table, .lbxw-table tbody, .lbxw-table tr, .lbxw-table td{
        display:block;width:100%;
    }
    .lbxw-table tr{
        background:#f9fafb;
        border-radius:8px;
        margin-bottom:14px;
        box-shadow:0 1px 3px rgba(0,0,0,.05);
    }
    .lbxw-table td{
        text-align:right;
        padding:8px 50% 8px 12px;
        position:relative;border:none;
    }
    .lbxw-table td::before{
        content:attr(data-label);
        position:absolute;
        right:12px;
        top:50%;transform:translateY(-50%);
        font-weight:600;
        color:#6b7280;
        font-size:12px;
    }
}

/* ───────────── 4. عنوان تب حساب کاربری ───────────── */
.woocommerce-MyAccount-title{
    font-size:22px;font-weight:700;
    margin:0 0 18px;padding-bottom:8px;
    border-bottom:2px solid #e5e7eb;
}

/* ───────────── 5. خنثی‌سازی قوانین پیش‌فرض Woo ───────────── */
/*   (جلوگیری از افتادن جدول زیر منو) */
.woocommerce-MyAccount-content table.lbxw-table{
    clear:none !important;
    float:none !important;
}
.woocommerce-MyAccount-content .dataTable-container table{
    clear:none !important;
    float:none !important;
}

/* ───────────── 6. دکمه‌های افزونه (Activate, …) همان قبلی ───────────── */
.lbxw-activate,
.lbxw-btn,
.lbxw-copy{
    background:linear-gradient(135deg,#0073aa 0%,#0096d0 100%);
    border:none;
    color:#fff;
    padding:8px 16px;
    border-radius:6px;
    cursor:pointer;
    font-size:14px;
    box-shadow:0 3px 6px rgba(0,0,0,.15);
    transition:.18s;
}
.lbxw-activate:hover,
.lbxw-btn:hover,
.lbxw-copy:hover{transform:translateY(-2px)}

/*                   */
#lbxwTable {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
#lbxwTable th, #lbxwTable td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}
#lbxwTable th {
  background: #1b795a;
  font-weight: bold;
}
.button {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}
.lbxw-edit { background: #f59e0b; color: white; }
.lbxw-delete { background: #ef4444; color: white; }
.lbxw-toggle { background: #3b82f6; color: white; }


/* ---------- تیتر جدول لایسنس (روشن و قابل‌کلیک) ---------- */
.lbxw-table thead th{
    background:#1b795a;      /* آبی تیره – تغییر بده اگر رنگ دیگری می‌خواهی */
    color:#fff !important;
}
.lbxw-table thead th .datatable-sorter{
    background:transparent;
    border:0;
    color:inherit;
    font-family:inherit;
    font-size:inherit;
    font-weight:600;
    cursor:pointer;
}
.lbxw-table thead th .datatable-sorter::after{
    content:"⬍";
    display:inline-block;
    margin-right:4px;
    font-size:11px;
    opacity:.7;
}

/* عرض ثابت ستون‌ها در دسکتاپ (کلید طولانی را نشکند) */
@media (min-width:992px){
  .lbxw-table thead th:nth-child(1),
  .lbxw-table tbody td:nth-child(1){
      direction:ltr;
      width:240px;
      word-break:break-all;
  }
}

/* رنگ ردیف هاى هاور بهتر */
.lbxw-table tbody tr:hover{
    background:#e0ecff;
}

/* دکمه “تغییر دامنه” هماهنگ با رنگ جدید */
.lbxw-change{
    background:linear-gradient(135deg,#059669 0%,#10b981 100%);
}
.lbxw-change:hover{
    background:#047857;
}


.lbxw-disabled{
    background:#f35151 !important;   /* خاکستری */
    cursor:not-allowed!important;
    box-shadow:none!important;
    opacity:.85;
}
.lbxw-disabled .dashicons{color:#fff}
