:root {
  --gold: #D4AF37;
  --beige: #F5F0EB;
  --white: #FFFFFF;
  --dark: #3C3C3C;
  --muted: #8A8A8A;
}

html { scroll-behavior: smooth; }

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #D4AF37;
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.nav-link:hover::after {
  transform: scaleX(1);
}

.step-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  background: #F5F0EB; color: #8A8A8A;
  border: 2px solid #E5D9D0;
  transition: all 0.3s;
}
.step-dot.active { background: #D4AF37; color: #FFFFFF; border-color: #D4AF37; }
.step-dot.completed { background: #D4AF37; color: #FFFFFF; border-color: #D4AF37; }
.step-line { transition: all 0.3s; }
.step-line.completed { background: #D4AF37; }

.service-card { cursor: pointer; transition: all 0.2s; }
.service-card:hover { border-color: #D4AF37; transform: translateY(-2px); }
.service-card.selected { border-color: #D4AF37; background: rgba(212, 175, 55, 0.08); }

.time-slot {
  padding: 10px; text-align: center; border-radius: 8px;
  border: 1px solid #E5D9D0;
  cursor: pointer; transition: all 0.2s; font-size: 14px; color: #3C3C3C;
}
.time-slot:hover { border-color: #D4AF37; background: rgba(212, 175, 55, 0.08); }
.time-slot.selected { border-color: #D4AF37; background: rgba(212, 175, 55, 0.12); color: #D4AF37; font-weight: 600; }
.time-slot.taken { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; }

.calendar-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer; font-size: 14px;
  transition: all 0.2s; color: #3C3C3C;
}
.calendar-day:hover { background: rgba(212, 175, 55, 0.08); }
.calendar-day.selected { background: #D4AF37; color: #FFFFFF; font-weight: 600; }
.calendar-day.disabled { opacity: 0.2; cursor: not-allowed; }
.calendar-day.disabled:hover { background: transparent; }
.calendar-day.today { border: 1px solid #D4AF37; }

/* Calendar day status variants */
.calendar-day.status-available {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
}
.calendar-day.status-available:hover {
  background: rgba(34, 197, 94, 0.2);
}
.calendar-day.status-unavailable {
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
  cursor: not-allowed;
  opacity: 0.6;
}
.calendar-day.status-full {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  cursor: not-allowed;
  opacity: 0.6;
}
.calendar-day.status-closed,
.calendar-day.status-past {
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.5;
}
.calendar-day.today {
  border: 2px solid #D4AF37;
  font-weight: 700;
}
.calendar-day.selected {
  background: #D4AF37 !important;
  color: white !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

/* Legend items */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
  color: #8A8A8A;
}
.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.calendar-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

#lightbox { display: none; }
#lightbox.show { display: flex; }

.gallery-item { aspect-ratio: 1; overflow: hidden; border-radius: 12px; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.05); }

.line-clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

@media (max-width: 640px) {
  .step-dot { width: 32px; height: 32px; font-size: 12px; }
}

/* Admin CMS Styles */
.bg-brown { background-color: #3B2F1A; }
.text-brown { color: #3B2F1A; }

.status-published { background: #dcfce7; color: #166534; }
.status-draft { background: #fef3c7; color: #92400e; }

#preview-modal {
  display: none;
}
#preview-modal:not(.hidden) {
  display: flex;
}

#toast {
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

#flash-message {
  animation: fadeOut 0.3s ease 3s forwards;
}

/* Admin table hover */
#bookings-table-body tr:hover {
  background: rgba(212, 175, 55, 0.05);
}

/* Sidebar scroll */
nav.w-64 {
  overflow-y: auto;
}

/* Gallery admin hover overlays */
.group:hover .group-hover\\:scale-105 {
  transform: scale(1.05);
}

/* Line clamp for admin cards */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Focus rings */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #D4AF37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Preview modal close on backdrop click */
#preview-modal {
  cursor: pointer;
}
#preview-modal > div {
  cursor: default;
}

.time-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}
.time-block.booked {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.time-block.unavailable {
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  color: #78716c;
}
.time-block .block-time {
  font-weight: 500;
}
.time-block .block-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Toast Notification System ===== */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  min-width: 300px;
  max-width: 420px;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  animation: toastSlideIn 0.3s ease-out;
  pointer-events: auto;
  font-size: 0.875rem;
  line-height: 1.4;
}

.toast-success {
  background: #16A34A;
  color: white;
}

.toast-error {
  background: #DC2626;
  color: white;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.7;
  flex-shrink: 0;
  padding: 0;
  color: inherit;
}
.toast-close:hover {
  opacity: 1;
}

.toast-dismiss {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ===== Confirmation Dialog ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.confirm-dialog {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: scaleIn 0.2s ease-out;
}

.confirm-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #3C3C3C;
  margin-bottom: 0.75rem;
}

.confirm-body {
  color: #8A8A8A;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-cancel {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: #F5F0EB;
  color: #3C3C3C;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}
.btn-cancel:hover {
  background: #E8E0D8;
}

.btn-danger {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background: #DC2626;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}
.btn-danger:hover {
  background: #B91C1C;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
