/* Havoc Bazaar - Bootstrap Custom Overrides + Green Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

:root {
  /* Override Bootstrap primary with green theme */
  --bs-primary: #16a34a;
  --bs-primary-rgb: 22, 163, 74;
  --hb-green: #16a34a;
  --hb-green-dark: #15803d;
  --hb-green-light: #22c55e;
  --hb-green-50: #f0fdf4;
  --hb-green-100: #dcfce7;
  --hb-green-200: #bbf7d0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #1a1a1a;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

/* Override Bootstrap primary color */
.btn-primary {
  background-color: var(--hb-green);
  border-color: var(--hb-green);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--hb-green-dark) !important;
  border-color: var(--hb-green-dark) !important;
}
.btn-outline-primary {
  color: var(--hb-green);
  border-color: var(--hb-green);
}
.btn-outline-primary:hover,
.btn-outline-primary:active {
  background-color: var(--hb-green) !important;
  border-color: var(--hb-green) !important;
}
.text-primary { color: var(--hb-green) !important; }
.bg-primary { background-color: var(--hb-green) !important; }
.border-primary { border-color: var(--hb-green) !important; }

.form-control:focus,
.form-select:focus {
  border-color: var(--hb-green);
  box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.15);
}

a { color: var(--hb-green); }
a:hover { color: var(--hb-green-dark); }

/* Selection */
::selection { background: var(--hb-green); color: white; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--hb-green); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--hb-green-dark); }

/* Header */
.hb-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  z-index: 1030;
  height: 64px;
}

.hb-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--hb-green) 0%, var(--hb-green-dark) 100%);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.hb-logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a1a1a;
}

.hb-account-toggle {
  max-width: 220px;
  display: inline-flex;
  align-items: center;
}

.hb-account-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-account-menu {
  min-width: 220px;
}

/* Hero */
.hb-hero {
  background:
    linear-gradient(to bottom, rgba(17, 24, 39, 0.55), rgba(17, 24, 39, 0.34)),
    url('https://images.unsplash.com/photo-1505373877841-8d25f7d46678?w=1800') center/cover;
  color: white;
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(22, 163, 74, 0.18);
}

.hb-hero .container {
  position: relative;
  z-index: 2;
}

.hb-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  font-weight: 800;
}

.hb-hero p {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-bottom: 2rem;
  color: rgba(255,255,255,0.95);
}

.hb-btn-white {
  background: white;
  color: var(--hb-green);
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.hb-btn-white:hover {
  transform: scale(1.03);
  color: var(--hb-green-dark);
  background: var(--hb-green-50);
}

/* Stat icons */
.stat-icon-circle {
  width: 64px; height: 64px;
  background: var(--hb-green-100);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hb-green);
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: #1a1a1a;
}

/* Event cards */
.event-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  height: 100%;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.event-card-img {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.event-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.event-card:hover .event-card-img img {
  transform: scale(1.05);
}

.event-status-badge {
  position: absolute;
  top: 1rem; right: 1rem;
}

.event-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.event-meta i {
  color: var(--hb-green);
  flex-shrink: 0;
  margin-top: 3px;
}

.price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hb-green);
  font-family: 'Poppins', sans-serif;
}

/* Section */
section { padding: 5rem 0; }
.bg-section { background: #f9fafb; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-header h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.section-header p { font-size: 1.125rem; color: #6b7280; }

/* Status badges */
.badge-upcoming { background: var(--hb-green-100); color: var(--hb-green-dark); }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: var(--hb-green-100); color: var(--hb-green-dark); }
.badge-cancelled { background: #fee2e2; color: #dc2626; }

.whatsapp-floating-link {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1040;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.32);
  text-decoration: none;
}

.whatsapp-floating-link:hover,
.whatsapp-floating-link:focus {
  color: white;
  background: #1fb857;
  transform: translateY(-1px);
}

.whatsapp-floating-link i {
  font-size: 1.75rem;
}

/* Event hero */
.event-hero-section {
  background: linear-gradient(to bottom, var(--hb-green-50), white);
  padding: 6rem 0 3rem;
}

.event-hero-img {
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.event-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Booth cards */
.booth-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
}

.booth-card:hover {
  border-color: var(--hb-green);
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.booth-price-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--hb-green);
  font-family: 'Poppins', sans-serif;
}

.booth-availability {
  background: var(--hb-green-100);
  color: var(--hb-green-dark);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.booking-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1rem;
}

.booking-calendar-month {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

.booking-calendar-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.booking-calendar-weekdays,
.booking-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.booking-calendar-weekdays {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.booking-calendar-empty,
.booking-calendar-day {
  aspect-ratio: 1;
}

.booking-calendar-day {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #111827;
  font-weight: 600;
}

.booking-calendar-day:hover:not(:disabled) {
  border-color: var(--hb-green);
  color: var(--hb-green-dark);
}

.booking-calendar-day.is-selected {
  background: var(--hb-green);
  border-color: var(--hb-green);
  color: white;
}

.booking-calendar-day.is-disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.booking-calendar-day.is-booked {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.booth-features li {
  padding: 0.25rem 0;
  font-size: 0.875rem;
  color: #374151;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.booth-features li i {
  color: var(--hb-green);
  margin-top: 4px;
}

/* Accordion overrides */
.accordion-button:not(.collapsed) {
  background-color: var(--hb-green-50);
  color: var(--hb-green-dark);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.15);
  border-color: var(--hb-green);
}

.accordion-button i {
  color: var(--hb-green);
  margin-right: 0.75rem;
}

/* Booking progress */
.progress-steps {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #d1d5db;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.progress-step.active .step-number {
  background: var(--hb-green);
  color: white;
}

.progress-step.completed .step-number {
  background: var(--hb-green);
  color: white;
}

.step-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
  color: #1a1a1a;
}

.progress-line {
  flex: 1;
  height: 3px;
  background: #d1d5db;
  margin-top: -24px;
}

.progress-line.active {
  background: var(--hb-green);
}

/* Admin */
.admin-header {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-body {
  background: #f9fafb;
  min-height: calc(100vh - 64px);
  padding: 2rem 0;
}

.stat-card-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card-icon.green { background: var(--hb-green-100); color: var(--hb-green); }
.stat-card-icon.yellow { background: #fef3c7; color: #ca8a04; }
.stat-card-icon.purple { background: #ede9fe; color: #7c3aed; }

.stat-card-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: #1a1a1a;
  font-family: 'Poppins', sans-serif;
}

/* Footer */
.hb-footer {
  background: #111827;
  color: white;
  padding: 3rem 0 1.5rem;
}

.hb-footer h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.hb-footer p, .hb-footer a {
  color: #9ca3af;
  font-size: 0.875rem;
}

.hb-footer a {
  text-decoration: none;
}

.hb-footer a:hover {
  color: var(--hb-green);
}

.hb-footer ul {
  list-style: none;
  padding: 0;
}

.hb-footer ul li {
  margin-bottom: 0.625rem;
}

.hb-footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.hb-footer-contact i {
  color: var(--hb-green);
  margin-top: 4px;
}

.social-link {
  width: 36px;
  height: 36px;
  background: #1f2937;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.3s ease;
  margin-right: 0.5rem;
}

.social-link:hover {
  background: var(--hb-green);
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* ============== FLOOR PLAN EDITOR ============== */
.floorplan-editor-container {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.floorplan-canvas-wrapper {
  position: relative;
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floorplan-canvas-wrapper.has-image {
  border: 1px solid #e5e7eb;
  background: white;
}

.floorplan-image {
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.floorplan-canvas-wrapper.editing .floorplan-image {
  cursor: crosshair;
}

.floorplan-canvas-wrapper.preview .floorplan-image {
  cursor: default;
}

.floorplan-empty-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.floorplan-empty-state i {
  font-size: 3rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.hotspot {
  position: absolute;
  width: 36px;
  height: 36px;
  background: var(--hb-green);
  border: 3px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
  transition: all 0.2s ease;
  z-index: 2;
}

.hotspot:hover {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--hb-green-dark);
}

.hotspot.selected {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25), 0 4px 12px rgba(220, 38, 38, 0.4);
}

.hotspot-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hotspot:hover .hotspot-tooltip {
  opacity: 1;
}

.hotspot-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
}

.hotspot.preview-mode {
  cursor: pointer;
}

/* Hotspot list */
.hotspot-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.hotspot-list-item.active {
  background: var(--hb-green-50);
  border: 1px solid var(--hb-green);
}

.hotspot-marker-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--hb-green);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

.editor-toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
  section { padding: 3rem 0; }
  .hb-hero { padding: 6rem 0 4rem; }
  .event-hero-img { height: 280px; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}
