/* Booking Chatbot Styles */
.chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Segoe UI', 'Arial', sans-serif;
}

/* Toggle Button - Hidden by default since we use main button */
.chatbot-toggle {
  display: none !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(183, 28, 28, 0.5);
  }
  100% {
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
  }
}

.chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(183, 28, 28, 0.4);
}

.chatbot-toggle i {
  font-size: 20px;
}

/* Chatbot Container */
.chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 380px;
  height: 600px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chatbot-container.active {
  display: flex;
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Chatbot Header */
.chatbot-header {
  background: linear-gradient(135deg, #b71c1c 0%, #8b0000 100%);
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 15px 15px 0 0;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 18px;
  color: #d4c04a;
}

.chatbot-close {
  background: none;
  border: none;
  color: #d4c04a;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Chatbot Subheader */
.chatbot-subheader {
  background: #fff;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  line-height: 1.4;
  color: #666;
}

/* Messages Area */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #b71c1c;
  border-radius: 3px;
}

/* Messages */
.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 35px;
  height: 35px;
  background: #b71c1c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4c04a;
  font-size: 16px;
  flex-shrink: 0;
}

.message-content {
  background: #fff;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 70%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  line-height: 1.4;
  font-size: 14px;
}

.user-message .message-content {
  background: #b71c1c;
  color: #fff;
}

/* User's preferred times list styling in user bubble */
.user-message .message-content ul.user-preferred-times {
  margin: 6px 0 0 18px;
  padding: 0;
  list-style: disc;
}
.user-message .message-content ul.user-preferred-times li {
  margin: 3px 0;
}
.user-message .message-content strong {
  display: inline-block;
  margin-bottom: 4px;
}

/* Input Area */
.chatbot-input-area {
  padding: 15px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  max-height: 250px;
  overflow-y: auto;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.options-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.option-button {
  background: #fff;
  border: 2px solid #b71c1c;
  color: #b71c1c;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: center;
}

.option-button:hover {
  background: #b71c1c;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(183, 28, 28, 0.2);
}

.duration-button {
  min-width: 80px;
}

/* Time Selection */
.time-selection {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.date-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-selector label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.date-selector select {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}

.time-slots {
  max-height: 120px;
  overflow-y: auto;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.time-slot {
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
  padding: 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  text-align: center;
}

.time-slot:hover {
  border-color: #b71c1c;
  background: #fff5f5;
}

.time-slot.selected {
  background: #b71c1c;
  color: #fff;
  border-color: #b71c1c;
}

.selected-times {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
}

.selected-times h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #333;
}

.selected-times ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #666;
}

.selected-times .no-times {
  margin: 0;
  color: #999;
  font-style: italic;
  font-size: 13px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.form-group input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #b71c1c;
}

/* Submit Button */
.submit-button {
  background: #b71c1c;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.submit-button:hover:not(:disabled) {
  background: #8b0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(183, 28, 28, 0.3);
}

.submit-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Send Options */
.send-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.send-button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  color: #fff;
}

.send-button i {
  font-size: 20px;
}

.send-button.whatsapp {
  background: #25D366;
}

.send-button.whatsapp:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

.send-button.sms {
  background: #007AFF;
}

.send-button.sms:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

.send-button.email {
  background: #EA4335;
}

.send-button.email:hover {
  background: #c23321;
  transform: translateY(-2px);
}

/* Restart Button */
.restart-button {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #ddd;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
  margin: 0 auto;
}

.restart-button:hover {
  background: #e9ecef;
  border-color: #b71c1c;
  color: #b71c1c;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chatbot-container {
    width: calc(100vw - 20px);
    height: calc(100vh - 100px);
    right: 10px;
    bottom: 10px;
  }
  
  .chatbot-toggle {
    bottom: 10px;
    right: 10px;
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .send-options {
    flex-direction: column;
  }
  
  .send-button {
    flex-direction: row;
    justify-content: center;
  }
}

/* Admin Functionality Styles */
.admin-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #d4c04a;
  cursor: pointer;
  user-select: none;
}

.admin-switch input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #d4c04a;
  cursor: pointer;
}

.admin-slider {
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.admin-switch:hover .admin-slider {
  opacity: 0.8;
}

/* Admin Time Slots */
.admin-time-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  transition: all 0.2s ease;
}

.admin-time-slot.blocked {
  background: #ffebee;
  border-color: #f44336;
  box-shadow: 0 1px 3px rgba(244, 67, 54, 0.1);
}

.admin-time-slot.available {
  background: #e8f5e8;
  border-color: #4caf50;
  box-shadow: 0 1px 3px rgba(76, 175, 80, 0.1);
}

.time-label {
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.admin-time-slot.blocked .time-label {
  color: #d32f2f;
}

.admin-time-slot.available .time-label {
  color: #2e7d32;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

.toggle-btn:active {
  transform: scale(0.95);
}

/* Admin Debug Info */
.admin-debug {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px;
  font-family: 'Courier New', monospace;
  color: #666;
}

/* Notification Styles (inline in JS but also defined here for consistency) */
.booking-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  color: white;
  z-index: 10000;
  font-size: 14px;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  transition: all 0.3s ease;
  transform: translateX(0);
  opacity: 1;
}

.booking-notification.success {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.booking-notification.error {
  background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
}

.booking-notification.info {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

/* Admin mode adjustments for mobile */
@media (max-width: 480px) {
  .admin-toggle {
    gap: 5px;
  }
  
  .admin-switch {
    font-size: 11px;
    gap: 3px;
  }
  
  .admin-switch input[type="checkbox"] {
    width: 12px;
    height: 12px;
  }
  
  .admin-time-slot {
    padding: 6px 10px;
  }
  
  .time-label {
    font-size: 13px;
  }
  
  .toggle-btn {
    font-size: 16px;
    min-width: 28px;
    height: 28px;
  }
  
  .booking-notification {
    right: 10px;
    left: 10px;
    max-width: none;
    font-size: 13px;
  }
}

/* Tablet Responsive */
@media (max-width: 768px) and (min-width: 481px) {
  .chatbot-container {
    width: 350px;
    height: 550px;
  }
}
