.table-grid-container {
  background: #eeeeee;
  padding: 40px;
  border-radius: 20px;
  margin: 0;
  margin: 0 auto;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  max-width: none;
  margin: 0;
  height: 100%;
}

.table-card {
  border: 1px solid #fafafa;
  background: #fafafa;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  gap: 14px;
  position: relative;
}

.table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.table-card.selected {
  border-radius: 20px;
  border: 1px solid #7A7A7A;
  background: #FAFAFA;
  box-shadow: 2px 2px 20px 0 rgba(0, 0, 0, 0.08);
}

.table-card.idle {
  opacity: 0.6;
}

.table-card.bar-selectable {
  background: #f8f9fa;
}

.table-card.bar-selected {
  border: 1px solid #4CAF50;
  background: #e8f5e9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.table-card.bar-selected .table-status-btn {
  background: #4CAF50;
  color: white;
  border: none;
}

.table-header h3 {
  margin: 0;
  color: #333333;
  font-size: 30px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  line-height: 21px;
}

.table-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333333;
  font-family: 'Poppins', sans-serif;
  line-height: 11px;
}

.table-info-number {
  font-size: 16px;
  font-weight: 400;
}

.table-info-label {
  font-size: 14px;
  font-weight: 300;
}

.table-history-btn {
  background: none;
  border: none;
  color: #333333;
  font-size: 16px;
  font-weight: 300;
  font-family: 'Poppins', sans-serif;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.3s ease;
  line-height: 11px;
}

.table-history-btn:hover {
  color: #666;
}

.table-status-btn {
  border: none;
  color: white;
  padding: 12px 40px;
  border-radius: 8px;
  font-weight: 400;
  cursor: pointer;
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  text-transform: none;
  line-height: 14px;
  width: 100%;
}

.table-status-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.table-status-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.table-status-btn.available {
  background: #57ff62;
  color: #000000;
}

.table-status-btn.picked {
  background: #e0e0e0;
  color: #888888;
}

.table-status-btn.unbooked {
  background: #e0e0e0;
  color: #888888;
  cursor: not-allowed;
}

.table-status-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 1400px) {
  .table-grid-container {
    margin: 0 40px 40px 40px;
  }
}

@media (max-width: 1200px) {
  .table-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .table-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .table-grid {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 15px;
  }
  
  .guest-info-section,
  .guest-info-main{
      flex-direction: column;
  }
  
  .table-grid-container {
    padding: 20px;
    margin: 0 20px 20px 20px;
  }
  
  .guest-info-main.notes {
      max-width: 100% !important;
      width: 100% !important;
  }
  
  .guest-info-main{
      padding: 20px !important;
  }
  
    .divider {
        display: none;
    }
}

/* Lock Functionality Styles */
.table-card.locked {
  background: #ffe6e6;
  border-color: #ffcccc;
}

.table-card.locked:hover {
  background: #ffd9d9;
}

.table-card.reserved {
  opacity: 0.7;
}

.table-card.pending-payment {
  background: #fff3cd;
  border-color: #ffeaa7;
  opacity: 0.9;
}

.table-card.pending-payment:hover {
  background: #fff2b3;
}

.table-card.unbooked {
  opacity: 0.5;
}

.table-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-lock-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hide lock button by default for available tables */
.table-lock-btn.hover-only {
  opacity: 0;
  visibility: hidden;
}

/* Show lock button on table hover for available tables */
.table-card:hover .table-lock-btn.hover-only {
  opacity: 1;
  visibility: visible;
}

/* Always show unlock button for locked tables */
.table-lock-btn.visible {
  opacity: 1;
  visibility: visible;
}

/* Lock button styling */
.table-lock-btn.lock {
  background: #6c757d;
  color: white;
}

.table-lock-btn.lock:hover {
  background: #5a6268;
  transform: scale(1.1);
}

/* Unlock button styling */
.table-lock-btn.unlock {
  background: #28a745;
  color: white;
}

.table-lock-btn.unlock:hover {
  background: #218838;
  transform: scale(1.1);
}

.table-lock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Check-in button styling */
.table-checkin-btn {
  position: absolute;
  top: 8px;
  right: 48px; /* Position to the left of the lock button */
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background: #28a745;
  color: white;
  opacity: 1;
  visibility: visible;
}

.table-checkin-btn:hover {
  background: #218838;
  transform: scale(1.1);
}

.table-checkin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.table-status-btn.locked {
  background: #dc3545;
  border-color: #dc3545;
  cursor: not-allowed;
}

.table-status-btn.locked:hover {
  background: #dc3545;
  border-color: #dc3545;
  transform: none;
}
