/* Break out of Elementor container */
#ggr-container {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
  padding: 0 20px; /* optional horizontal padding */
  margin-top: 30px;
  margin-bottom: 30px;
  font-family: "Inter", Arial, sans-serif;
  color: #333;
}
.ggr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ggr-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
}

.ggr-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.ggr-btn:hover {
  background: #1d4ed8;
}

.ggr-btn.ggr-danger {
  background: #dc2626;
}

.ggr-btn.ggr-danger:hover {
  background: #b91c1c;
}
/* Table */
.ggr-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  border-spacing: 0;
  border-radius: 8px;
  table-layout: fixed;   /* force column sizing */
  word-wrap: break-word; /* wrap long text */
  white-space: normal;   /* allow multi-line */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* Narrow utility columns */
.ggr-table th:nth-child(3), /* Lot# */
.ggr-table td:nth-child(3) {
  width: 70px;
}

.ggr-table th:nth-child(4), /* Temperature */
.ggr-table td:nth-child(4) {
  width: 100px;
  text-align: right;
}

.ggr-table th:nth-child(5), /* Quantity */
.ggr-table td:nth-child(5) {
  width: 90px;
  text-align: right;
}

.ggr-table th:nth-child(6), /* Pkg Type */
.ggr-table td:nth-child(6) {
  width: 100px;
  text-align: center;
}

.ggr-table th:nth-child(7), /* To Order */
.ggr-table td:nth-child(7) {
  width: 120px;
  text-align: right;
}

.ggr-table th,
.ggr-table td {
  padding: 12px 14px;
  text-align: left;
}
.ggr-table th {
  background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}
.ggr-table tr:nth-child(even) {
  background: #fdfdfd;
}

.ggr-table tr:hover {
  background: #f3f4f6;
}

/* Modal */
.ggr-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
}

.ggr-modal-content {
  background: #fff;
  padding: 20px 24px;
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  position: relative;
  animation: fadeInUp 0.3s ease;
}

.ggr-modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

#ggr-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #374151;
}

#ggr-form input,
#ggr-form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 4px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#ggr-form input:focus,
#ggr-form select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
  outline: none;
}

.ggr-form-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Animations */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* Search bar */
.ggr-search-wrap {
  margin-bottom: 12px;
}

#ggr-search {
  width: 250px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}
.ggr-table tbody tr {
  transition: background 0.2s, transform 0.1s;
}

.ggr-table tbody tr:hover {
  background: #eef2ff;
  transform: scale(1.01);
}
.ggr-btn {
  border-radius: 9999px;
  font-weight: 500;
  padding: 6px 14px;
}
.ggr-table td:nth-child(6), /* Pkg Type */
.ggr-table td:nth-child(7)  /* To Order */ {
  font-weight: 500;
  text-align: center;
}

.ggr-table td:nth-child(6) {
  color: #2563eb;
}

.ggr-table td:nth-child(7) {
  color: #dc2626;
}
/* Wrap for table */
#ggr-table-wrap {
  width: 100%;
  overflow-x: hidden; /* block horizontal scroll */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
/* Reduce padding on smaller devices */
@media (max-width: 1024px) {
  .ggr-table th, .ggr-table td {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}
@media (max-width: 768px) {
  .ggr-table th, .ggr-table td {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
  .ggr-header h2 {
    font-size: 1.3rem;
  }
  .ggr-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}
/* Keep Vendor and Item columns flexible and readable */
.ggr-table th:nth-child(1), /* Vendor */
.ggr-table td:nth-child(1),
.ggr-table th:nth-child(2), /* Item */
.ggr-table td:nth-child(2) {
  min-width: 200px;   /* don’t shrink below this */
  width: auto;        /* flex: take remaining space */
  white-space: normal;
  word-wrap: break-word;
}
/* Tablet portrait view optimization */
@media (max-width: 820px) {
  /* Extra-compact utility columns */
  .ggr-table th:nth-child(3), /* Lot # */
  .ggr-table td:nth-child(3) {
    width: 50px;
  }

  .ggr-table th:nth-child(4), /* Temp */
  .ggr-table td:nth-child(4) {
    width: 65px;
  }

  .ggr-table th:nth-child(5), /* Qty */
  .ggr-table td:nth-child(5) {
    width: 50px;
    text-align: right;
  }

  .ggr-table th:nth-child(6), /* Pkg Type */
  .ggr-table td:nth-child(6) {
    width: 70px;
    text-align: center;
  }

  .ggr-table th:nth-child(7), /* To Order */
  .ggr-table td:nth-child(7) {
    width: 70px;
    text-align: right;
  }

  .ggr-table th:nth-child(8), /* Date */
  .ggr-table td:nth-child(8) {
    width: 100px;
  }

  .ggr-table th:nth-child(9), /* Actions */
  .ggr-table td:nth-child(9) {
    width: 100px;
    text-align: center;
  }

  /* Vendor & Item stay readable */
  .ggr-table th:nth-child(1),
  .ggr-table td:nth-child(1),
  .ggr-table th:nth-child(2),
  .ggr-table td:nth-child(2) {
    min-width: 240px; /* guarantee readability */
    width: auto;      /* flex-grow */
  }
}

