

/* Container styling */
.table-container {
  overflow-x: auto;
  background: var(--card-bg, #fff);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 1rem;
  margin: 1rem 0;
}

/* Table basics */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text-color, #333);
}

.table thead {
  background-color: var(--header-bg, #f4f6f8);
  text-align: left;
}

.table thead th {
  padding: 12px;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
  text-align: center;
}

.table tbody td {
  padding: 12px;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}

/* Product image */
.table img {
  border-radius: 6px;
  max-width: 60px;
  max-height: 60px;
  object-fit: cover;
}

/* Buttons */
.btn {
  padding: 6px 10px;
  margin-right: 4px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-view {
  background-color: #1976d2;
  color: white;
}

.btn-manage {
  background-color: #388e3c;
  color: white;
}

.btn-delete {
  background-color: #d32f2f;
  color: white;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-pagination {
  background-color: #1976d2;
  color: #257e05;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}






.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 0;
  width: 90%;
  /* height: 90vh; */
  height: auto;
  position: relative;
}
.modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 22px;
  cursor: pointer;
}









/* Responsive tweaks */
@media screen and (max-width: 768px) {
  .table thead {
    display: none;
  }

  .table, .table tbody, .table tr, .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    margin-bottom: 1rem;
    background-color: var(--card-bg, #fff);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0.5rem;
  }

  .table td {
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: bold;
    flex-basis: 40%;
    color: #555;
  }
}




.btn-toggle {
  background-color: #ffc107;
  color: #000;
  border: none;
  padding: 6px 10px;
  margin-top: 5px;
  border-radius: 4px;
}

.btn-toggle:hover {
  background-color: #e0a800;
}


.btn-sm.btn-toggle {
  margin-top: 6px;
  border-radius: 4px;
  border: none;
  padding: 6px 10px;
}


  .modal6 {
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .modal-content6 {
    background-color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }






/* Product Preview Modal */
.preview-modal{
  position: fixed; inset: 0;
  display: none;
  z-index: 10000;
}
.preview-modal.is-open{ display: block; }

.preview-modal__backdrop{
  position: absolute; inset: 0;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(2px);
}

.preview-modal__dialog{
  position: relative;
  width: min(1200px, 96vw);
  height: min(860px, 92vh);
  margin: 24px auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 100px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-modal__header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}
.preview-modal__title{
  margin: 0; font-size: 16px; font-weight: 700; color: #0f172a;
}
.preview-modal__close{
  border: 1px solid #e5e7eb; background: #fff; color: #111827;
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
}
.preview-modal__close:hover{ background:#f9fafb; }

.preview-modal__body{
  position: relative; flex: 1;
  background: #0b1220; /* nice contrast while iframe loads */
}

.preview-modal__loader{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #e2e8f0; font-weight: 600; letter-spacing:.2px;
}

.preview-modal__iframe{
  width: 100%; height: 100%;
  border: 0; background: #fff;
  transition: opacity .2s ease;
}

/* Small screens */
@media (max-width: 640px){
  .preview-modal__dialog{ height: 92vh; width: 96vw; margin: 12px auto; }
  .preview-modal__title{ font-size: 15px; }
}
