/* ============================================================
   WIKI — LIMITATIONS  (/wiki/limitations)
   ตารางข้อจำกัดการวาง โทนเดียวกับธีมเว็บ: ขาว + slate เข้ม + อำพัน
   ============================================================ */

/* ── Table ──────────────────────────────────────────────── */
.limitation-table {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  margin-bottom: 0;
}

.limitation-table thead th {
  background: #0f172a;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  padding: 12px 16px;
  border: none;
}

.limitation-table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-top: 1px solid #f1f3f5;
  border-bottom: none;
  background: #ffffff;
}

.limitation-table tbody tr:hover td {
  background: #fffbeb;
}

/* ── Type / Max badges ──────────────────────────────────── */
.limitation-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.30);
  color: #92400e;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.limitation-max {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  white-space: nowrap;
}

/* ── Item chips ─────────────────────────────────────────── */
.limitation-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.limitation-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 6px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}

.limitation-item:hover {
  background: #ffffff;
  border-color: rgba(245, 158, 11, 0.45);
}

.limitation-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
}

.limitation-item-noimg {
  width: 22px;
  text-align: center;
  font-size: 14px;
  color: #cbd5e1;
}

/* ── Empty state ────────────────────────────────────────── */
.limitation-empty {
  text-align: center;
  padding: 56px 20px;
  color: #9ca3af;
}

.limitation-empty i {
  font-size: 40px;
  margin-bottom: 14px;
  color: #cbd5e1;
}

.limitation-empty p {
  font-size: 15px;
  margin: 0;
}

/* ── Mobile: แถว → การ์ด (ไอเท็มตกลงมาด้านล่าง ไม่ต้องเลื่อนแนวนอน) ── */
@media (max-width: 575.98px) {
  /* ปิด scroll แนวนอนของ wrapper */
  .limitations-page .table-responsive {
    overflow-x: visible;
  }

  /* ซ่อนหัวตาราง แล้วเปลี่ยนตารางเป็นการ์ดเรียงลง */
  .limitation-table thead {
    display: none;
  }

  .limitation-table,
  .limitation-table tbody,
  .limitation-table tr,
  .limitation-table td {
    display: block;
    width: 100%;
  }

  .limitation-table {
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  /* แต่ละแถว = การ์ดเดี่ยว */
  .limitation-table tbody tr {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 14px;
  }

  .limitation-table tbody tr:hover td {
    background: #ffffff;
  }

  .limitation-table tbody td {
    border-top: none;
    padding: 10px 14px;
    text-align: left;
  }

  /* แถวบน: ประเภท + สูงสุด อยู่บรรทัดเดียวกัน */
  .limitation-table tbody td:first-child {
    padding-top: 14px;
  }

  /* ใส่ป้ายกำกับ "สูงสุด/ชังก์" แทนหัวตารางที่ถูกซ่อน */
  .limitation-table tbody td:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 0;
  }

  .limitation-table tbody td:nth-child(2)::before {
    content: "สูงสุด/ชังก์:";
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
  }

  /* ไอเท็มที่เกี่ยวข้อง: เต็มความกว้าง wrap หลายบรรทัด */
  .limitation-table tbody td:last-child {
    padding-top: 4px;
    padding-bottom: 14px;
    border-top: 1px solid #f1f3f5;
    margin-top: 6px;
  }
}
