:root {
  --mocan-primary: #43630c;
  --mocan-primary-dark: #354f0a;
  --mocan-accent: #683522;
  --mocan-gold: #C5A880;
  --mocan-bg: rgba(255,255,255,0.95);
  --mocan-bg-glass: rgba(255,255,255,0.85);
  --mocan-radius: 16px;
  --mocan-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Floating Button */
.floating-booking-btn {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--mocan-primary), var(--mocan-primary-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(67,99,12,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: mocanPulse 2s infinite;
}
.floating-booking-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 30px rgba(67,99,12,0.5);
}
.floating-booking-btn svg { flex-shrink: 0; }

@keyframes mocanPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(67,99,12,0.4); }
  50% { box-shadow: 0 4px 30px rgba(67,99,12,0.7); }
}

/* Overlay */
#mocan-booking-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#mocan-booking-overlay.open {
  opacity: 1;
  visibility: visible;
}
body.modal-open { overflow: hidden; }

/* Popup */
#mocan-booking-popup {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: var(--mocan-bg);
  border-radius: var(--mocan-radius);
  box-shadow: var(--mocan-shadow);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(15px);
  transition: transform 0.35s ease;
  overflow: hidden;
}
.open #mocan-booking-popup {
  transform: scale(1) translateY(0);
}

/* Header */
.booking-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.btn-header-nav {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #666;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
  line-height: 0;
}
.btn-header-nav:hover { background: rgba(0,0,0,0.06); }
#popup-progress-container {
  flex: 1;
  height: 6px;
  background: #e8e8e8;
  border-radius: 3px;
  overflow: hidden;
}
#popup-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mocan-primary), #6a9c1a);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Body */
.booking-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.step-panels-wrapper {
  position: relative;
  min-height: 320px;
}
.step-panel {
  display: none;
  animation: mocanSlideIn 0.35s ease;
}
.step-panel.active { display: block; }
.step-panel.slide-out-right { animation: mocanSlideOutRight 0.35s ease forwards; }
.step-panel.slide-out-left { animation: mocanSlideOutLeft 0.35s ease forwards; }

@keyframes mocanSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes mocanSlideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(30px); }
}
@keyframes mocanSlideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-30px); }
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin: 0 0 20px;
}

/* Form Elements */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
#time-slots-group { display: none; }

.form-select, .form-input {
  width: 100%;
  padding: 4px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
}
.form-select:focus, .form-input:focus {
  border-color: var(--mocan-primary);
  box-shadow: 0 0 0 3px rgba(67,99,12,0.1);
}
.form-textarea { resize: vertical; min-height: 70px; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--mocan-primary);
  border-color: var(--mocan-primary);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Date Slider */
.date-slider-wrapper { position: relative; }
.date-slider {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.date-slider::-webkit-scrollbar { display: none; }
.date-slide {
  flex-shrink: 0;
  width: 68px;
  padding: 10px 4px;
  text-align: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.date-slide:hover { border-color: var(--mocan-primary); }
.date-slide.selected {
  background: var(--mocan-primary);
  border-color: var(--mocan-primary);
  color: #fff;
}
.date-slide .day-name { font-size: 11px; opacity: 0.7; }
.date-slide .day-num { font-size: 16px; font-weight: 700; margin: 2px 0; }
.date-slide.selected .day-name,
.date-slide.selected .day-num { color: #fff; }

.btn-datepicker-custom {
  margin-top: 8px;
  padding: 8px 14px;
  border: 1.5px dashed #bbb;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-datepicker-custom:hover {
  border-color: var(--mocan-primary);
  color: var(--mocan-primary);
}

/* Time Slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.time-slot {
  padding: 10px 6px;
  text-align: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  transition: all 0.2s;
  background: #fafafa;
}
.time-slot:hover:not(.disabled) { border-color: var(--mocan-primary); }
.time-slot.selected {
  background: var(--mocan-primary);
  border-color: var(--mocan-primary);
  color: #fff;
}
.time-slot.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f0f0f0;
}

.step-hint {
  font-size: 13px;
  color: #999;
  text-align: center;
  margin: 12px 0 0;
  font-style: italic;
}
.step-hint.error { color: #d32f2f; }

/* Recap Box */
.booking-recap {
  background: #f5f7f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.recap-row { display: flex; justify-content: space-between; padding: 4px 0; }
.recap-label { color: #888; }
.recap-value { font-weight: 600; color: #333; text-align: right; }

/* Footer */
.booking-popup-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.booking-popup-footer .btn-primary,
.booking-popup-footer .btn-secondary {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--mocan-primary), var(--mocan-primary-dark));
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(67,99,12,0.3);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: #f0f0f0;
  color: #555;
}
.btn-secondary:hover { background: #e5e5e5; }

/* Success Panel */
.success-panel {
  text-align: center;
  padding: 20px 0;
}
.success-icon { margin-bottom: 16px; }
.success-circle {
  stroke-dasharray: 189;
  stroke-dashoffset: 189;
  animation: mocanCircleAnim 0.6s ease forwards 0.2s;
}
.success-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: mocanCheckAnim 0.4s ease forwards 0.7s;
}
@keyframes mocanCircleAnim {
  to { stroke-dashoffset: 0; }
}
@keyframes mocanCheckAnim {
  to { stroke-dashoffset: 0; }
}
.success-title {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 0 0 8px;
}
.success-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 16px;
}
.success-ticket {
  background: #f5f7f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
}
.success-ticket .ticket-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.success-ticket .ticket-label { color: #888; }
.success-ticket .ticket-value { font-weight: 600; color: #333; }
.success-note {
  font-size: 12px;
  color: var(--mocan-primary);
  margin: 0 0 16px;
}

/* Mobile */
@media (max-width: 767px) {
  .floating-booking-btn {
    bottom: 80px;
    right: 12px;
    padding: 12px 18px;
    font-size: 13px;
  }
  .floating-booking-btn span { display: none; }
  .floating-booking-btn {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  #mocan-booking-overlay {
    align-items: flex-end;
  }
  #mocan-booking-popup {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--mocan-radius) var(--mocan-radius) 0 0;
    transform: translateY(100%);
    transition: transform 0.35s ease;
  }
  .open #mocan-booking-popup {
    transform: translateY(0);
  }
  .time-slots { grid-template-columns: repeat(3, 1fr); }
  .date-slide { width: 58px; padding: 8px 4px; }
  .booking-popup-body { padding: 16px; }
}

@media (min-width: 768px) {
  .floating-booking-btn { white-space: nowrap; }
}
