@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  overflow: hidden;
  background: black;
}

.container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.left-side {
  width: 45%;
  min-width: 45%;
  height: 100vh;
  background-image: url('./public/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.left-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.40),
      rgba(0, 0, 0, 0.40));
  pointer-events: none;
  z-index: 1;
}

.text-content {
  position: absolute;
  bottom: 48px;
  left: 48px;
  color: white;
  z-index: 2;
}

.text-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.text-content p {
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.65;
}

.right-side {
  flex: 1;
  background: #F7F5F3;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.view-menu-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #333;
}

.view-menu-btn:hover {
  background: #f9f9f9;
}

.view-menu-btn span {
  font-size: 1.2rem;
  line-height: 1;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 90px 48px 24px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  max-width: 100%;
}


.bot-message {
  background: #F2F0ED;
  padding: 12px 18px;
  border-radius: 18px;
  max-width: 520px;
}

.user-message {
  background: rgb(217, 132, 59);
  color: white;
  padding: 12px 18px;
  border-radius: 18px;
  margin-left: auto;
}

/* Hide avatar for consecutive messages of the same type */
.message.bot+.message.bot .avatar,
.message.user+.message.user .avatar {
  visibility: hidden;
}

.chat-input-container {
  display: flex;
  gap: 12px;
  padding: 20px 40px 30px;
  background: #F7F5F3;
}

#chatInput {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 0.95rem;
  outline: none;
}

#chatInput:focus {
  border-color: #e8a55c;
}

#sendBtn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgb(217, 132, 59);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sendBtn:hover {
  background: #d9954d;
}

.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(70, 100, 150, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.menu-overlay.active {
  display: block;
}

.menu-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 500px;
  height: 100%;
  background: white;
  z-index: 11;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.menu-panel.active {
  right: 0;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px;
  border-bottom: 1px solid #eee;
}

.menu-header h2 {
  font-size: 2rem;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #000;
}

.menu-content {
  padding: 30px;
}

.menu-section {
  margin-bottom: 40px;
}

.menu-section h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  border-bottom: 2px solid #e8a55c;
  padding-bottom: 8px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
  border-bottom: none;
}

.item-info {
  flex: 1;
}

.item-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.item-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.tag.veg {
  background: #4caf50;
  color: white;
}

.tag.vegan {
  background: #2e7d32;
  color: white;
}

.tag.non-veg {
  background: #d32f2f;
  color: white;
}

.tag.spicy {
  background: #ff5722;
  color: white;
}

.tag.gluten-free {
  background: #ff9800;
  color: white;
}

.item-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin-left: 20px;
}

.quick-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0px 0 12px 38px;
}

.quick-option {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #e8a55c;
  font-size: 0.8rem;
  cursor: pointer;
  color: #e8a55c;
  background: transparent;
}

.quick-option:hover {
  background: #e8a55c;
  color: white;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #EAE6E2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar.bot {
  background: #EAE6E2;
}

.avatar.user {
  background: #F5E7DE;
}

.avatar img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.admin-btn {
  position: absolute;
  top: 85px;
  right: 30px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #333;
  z-index: 5;
}

.admin-btn:hover {
  background: #f9f9f9;
}

.admin-btn span {
  font-size: 1.2rem;
  line-height: 1;
}

.admin-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20;
}

.admin-overlay.active {
  display: block;
}

.admin-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 800px;
  background: white;
  border-radius: 10px;
  padding: 0;
  z-index: 21;
  display: none;
  overflow: hidden;
}

.admin-panel.active {
  display: block;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}

.admin-date-input {
  font-size: 1rem;
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-right: 10px;
  margin-left: 20px;
}

.admin-date-actions {
  display: flex;
  gap: 5px;
  margin-right: auto;
}

.date-btn {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 15px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
}

.date-btn:hover {
  background-color: #e0e0e0;
  border-color: #ccc;
  color: #333;
}

.admin-content {
  padding: 30px;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.table-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: white;
  transition: transform 0.2s;
}

.table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table-card.free {
  border-top: 4px solid #4caf50;
}

.table-card.occupied {
  border-top: 4px solid #f44336;
  background: #fff5f5;
}

.table-number {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.table-seats {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.table-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.status-free {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-occupied {
  background: #ffebee;
  color: #c62828;
}

/* --- Table Details Modal --- */
.details-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 30;
}

.details-overlay.active {
  display: block;
}

.details-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 12px;
  z-index: 31;
  display: none;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.details-panel.active {
  display: block;
}

.details-header {
  padding: 20px 25px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
}

.details-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
}

.details-content {
  padding: 25px;
  max-height: 60vh;
  overflow-y: auto;
}

.booking-item {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.booking-time {
  font-weight: 700;
  color: #e8a55c;
  font-size: 1.1rem;
}

.booking-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  font-weight: 600;
}

.btn-delete {
  background: #ffebee;
  color: #c62828;
}

.btn-delete:hover {
  background: #ffcdd2;
}

.btn-edit {
  background: #e3f2fd;
  color: #1565c0;
}

.btn-edit:hover {
  background: #bbdefb;
}

.booking-detail-row {
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: #555;
}

.booking-detail-row strong {
  color: #333;
  width: 70px;
  display: inline-block;
  font-weight: 600;
}

/* --- Waitlist Styles --- */
.waitlist-btn {
  font-size: 0.9rem;
  padding: 8px 16px;
  background: #333;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 10px;
}

.waitlist-btn:hover {
  background: #000;
}

.waitlist-item {
  border-left: 4px solid #ff9800;
  padding: 15px;
  background: #fff;
  border: 1px solid #eee;
  margin-bottom: 10px;
  border-radius: 4px;
}

.waitlist-header {
  font-weight: bold;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}