/* مپ‌آرت — استایل صفحه‌ی ساخت و صف ادمین */

.ma-card {
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 178, 172, .2);
  border-radius: 18px;
  padding: 20px;
}

.ma-title {
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ma-title i { color: #38bdf8; font-size: 14px; }

.ma-hint { color: #94a3b8; font-size: 12.5px; line-height: 1.9; }

/* ── انتخاب فایل ── */
.ma-drop {
  border: 2px dashed rgba(56, 189, 248, .35);
  border-radius: 14px;
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: rgba(56, 189, 248, .04);
}
.ma-drop:hover, .ma-drop.over { border-color: #38bdf8; background: rgba(56, 189, 248, .12); }
.ma-drop i { font-size: 30px; color: #38bdf8; margin-bottom: 10px; display: block; }
.ma-drop b { color: #e2e8f0; font-size: 14px; display: block; margin-bottom: 4px; }

/* ── شبکه‌ی انتخاب اندازه ──
   عمداً LTR: خانه‌ی [1,1] باید بالا-چپ باشد، همان‌طور که روی دیوار
   نصب می‌شود. راست‌چینی سایت نباید ستون‌ها را برعکس نشان دهد. */
.ma-size-grid {
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  max-width: 230px;
}
.ma-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: rgba(15, 23, 42, .7);
  cursor: pointer;
  transition: all .12s;
  padding: 0;
}
.ma-cell:hover { border-color: rgba(56, 189, 248, .6); }
.ma-cell.on { background: linear-gradient(135deg, #0284c7, #0369a1); border-color: #38bdf8; }
.ma-cell.hot { background: rgba(56, 189, 248, .35); border-color: #7dd3fc; }

.ma-size-label {
  direction: ltr;
  font-size: 22px;
  font-weight: 800;
  color: #7dd3fc;
  font-family: monospace;
  letter-spacing: 1px;
}

/* ── دکمه‌های حالت ── */
.ma-seg { display: flex; gap: 6px; background: rgba(2, 6, 23, .5); padding: 4px; border-radius: 11px; }
.ma-seg button {
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
}
.ma-seg button:hover:not(:disabled) { color: #e2e8f0; }
.ma-seg button.on { background: rgba(56, 189, 248, .18); color: #7dd3fc; box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .4); }
.ma-seg button:disabled { opacity: .4; cursor: not-allowed; }

/* ── بوم پیش‌نمایش ──
   LTR به همان دلیل شبکه‌ی اندازه. pixelated تا خانه‌های ۱۲۸ پیکسلی
   محو نشوند و کاربر واقعاً ببیند دیترینگ چه کرده. */
.ma-stage { direction: ltr; }
.ma-canvas-wrap {
  background:
    linear-gradient(45deg, #0f172a 25%, transparent 25%),
    linear-gradient(-45deg, #0f172a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #0f172a 75%),
    linear-gradient(-45deg, transparent 75%, #0f172a 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(56, 178, 172, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
/* بوم با عرض ظرف بزرگ می‌شود و pixelated می‌ماند تا کاربر واقعاً ببیند
   دیترینگ چه کرده — نمایش در اندازه‌ی واقعی (۱۲۸px برای ۱×۱) خیلی ریز بود. */
#ma-canvas { display: block; width: 100%; max-width: 640px; height: auto; image-rendering: pixelated; }
#ma-crop { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .18); }

/* ── نوار وضعیت ── */
.ma-status {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 9px 13px;
  border-radius: 10px;
  line-height: 1.8;
}
.ma-status-busy { background: rgba(56, 189, 248, .1); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, .25); }
.ma-status-bad { background: rgba(239, 68, 68, .1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .3); }
.ma-status-ok { background: rgba(34, 197, 94, .1); color: #86efac; border: 1px solid rgba(34, 197, 94, .3); }

.ma-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.9;
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .25);
  color: #fcd34d;
}
.ma-note.info { background: rgba(59, 130, 246, .07); border-color: rgba(59, 130, 246, .2); color: #93c5fd; }

/* ── قیمت ── */
.ma-price-box {
  background: linear-gradient(135deg, rgba(2, 132, 199, .18), rgba(15, 23, 42, .4));
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.ma-price-box .p { font-size: 24px; font-weight: 800; color: #7dd3fc; }
.ma-price-box .c { font-size: 12.5px; color: #94a3b8; margin-top: 4px; }

.ma-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(2, 6, 23, .6);
  border: 1px solid rgba(148, 163, 184, .25);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 14px;
}
.ma-input:focus { outline: none; border-color: #38bdf8; }
.ma-input[dir="ltr"] { direction: ltr; text-align: left; }

.ma-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.ma-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 26px -6px rgba(2, 132, 199, .65); }
.ma-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── جدول صف ادمین ── */
.ma-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ma-table th, .ma-table td { padding: 10px 8px; border-bottom: 1px solid rgba(148, 163, 184, .12); text-align: right; }
.ma-table th { color: #94a3b8; font-weight: 700; white-space: nowrap; }
.ma-table td { color: #cbd5e1; }
.ma-table tr:hover td { background: rgba(56, 189, 248, .04); }
.ma-thumb { width: 74px; height: 74px; object-fit: contain; border-radius: 8px; background: #0f172a; border: 1px solid rgba(148, 163, 184, .2); image-rendering: pixelated; cursor: zoom-in; }

.ma-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st-pending_payment { background: rgba(148, 163, 184, .18); color: #cbd5e1; }
.st-paid { background: rgba(245, 158, 11, .18); color: #fcd34d; }
.st-approved { background: rgba(59, 130, 246, .18); color: #93c5fd; }
.st-sending { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
.st-sent { background: rgba(34, 197, 94, .18); color: #86efac; }
.st-failed { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.st-rejected { background: rgba(239, 68, 68, .12); color: #f87171; }

.ma-mini {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
}
.ma-mini.ok { background: #16a34a; }
.ma-mini.no { background: #dc2626; }
.ma-mini.re { background: #0284c7; }
.ma-mini:disabled { opacity: .45; cursor: not-allowed; }

.ma-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ma-tabs a {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(15, 23, 42, .6);
  border: 1px solid rgba(148, 163, 184, .18);
  text-decoration: none;
}
.ma-tabs a.on { color: #7dd3fc; border-color: rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .12); }

@media (max-width: 640px) {
  .ma-card { padding: 15px; }
  .ma-size-grid { max-width: 100%; }
  .ma-price-box .p { font-size: 20px; }
}
