/* MirroVate Calendar - Public booking styles v14
   Premium dark theme with glassmorphism over Ferrofluid background */

:root {
  --mc-bg: #03010A;
  --mc-surface: rgba(255, 255, 255, 0.035);
  --mc-surface-raised: rgba(255, 255, 255, 0.06);
  --mc-surface-hover: rgba(255, 255, 255, 0.1);
  --mc-border: rgba(255, 255, 255, 0.08);
  --mc-border-strong: rgba(255, 255, 255, 0.14);
  --mc-text: #f8fafc;
  --mc-text-secondary: rgba(255, 255, 255, 0.72);
  --mc-text-muted: rgba(255, 255, 255, 0.5);
  --mc-cyan: #06b6d4;
  --mc-cyan-glow: rgba(6, 182, 212, 0.35);
  --mc-purple: #8b5cf6;
  --mc-purple-glow: rgba(139, 92, 246, 0.35);
  --mc-gradient: linear-gradient(135deg, var(--mc-cyan) 0%, var(--mc-purple) 100%);
  --mc-gradient-subtle: linear-gradient(135deg, rgba(6,182,212,0.12) 0%, rgba(139,92,246,0.12) 100%);
  --mc-success: #34d399;
  --mc-danger: #f87171;
  --mc-radius-xl: 34px;
  --mc-radius-lg: 26px;
  --mc-radius-md: 18px;
  --mc-radius-sm: 14px;
  --mc-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  --mc-shadow-glow: 0 0 80px rgba(6, 182, 212, 0.1);
  --mc-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--mc-bg);
  color: var(--mc-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ferrofluid-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--mc-bg);
}

/* Main layout */
.main-container {
  flex: 1;
  padding: 36px 24px 80px;
  padding-top: calc(var(--nav-height, 88px) + 36px);
}

@media (max-width: 768px) {
  .main-container {
    padding: 22px 16px 56px;
    padding-top: calc(var(--nav-height, 70px) + 22px);
  }
}

/* Page header */
.page-header {
  max-width: 860px;
  margin: 0 auto 48px;
  text-align: center;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--mc-gradient);
  border-radius: 999px;
  margin-bottom: 24px;
  box-shadow: 0 8px 28px rgba(6, 182, 212, 0.28);
}

.page-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px #fff;
}

.page-header h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6.5vw, 66px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.02;
  background: linear-gradient(180deg, #ffffff 0%, #c4f0f8 60%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  margin: 0 auto;
  font-size: 18px;
  color: var(--mc-text-secondary);
  max-width: 580px;
  line-height: 1.7;
}

.page-notice {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 640px;
  margin: 24px auto 0;
  padding: 14px 18px;
  font-size: 14px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--mc-radius-sm);
  text-align: left;
  line-height: 1.5;
}

.page-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Card */
.booking-card {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--mc-radius-xl);
  background: rgba(12, 12, 22, 0.58);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--mc-border);
  box-shadow: var(--mc-shadow), var(--mc-shadow-glow);
  overflow: hidden;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.booking-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 780px;
}

/* Calendar section */
.calendar-section {
  padding: 48px;
  border-right: 1px solid var(--mc-border);
}

.calendar-header {
  margin-bottom: 34px;
}

.calendar-header h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--mc-text);
}

.calendar-header p {
  margin: 0;
  color: var(--mc-text-muted);
  font-size: 15px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  padding: 6px 8px;
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: 999px;
}

.calendar-toolbar h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--mc-text);
  text-transform: capitalize;
  letter-spacing: -0.2px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: var(--mc-text-secondary);
  cursor: pointer;
  transition: var(--mc-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--mc-surface-hover);
  color: var(--mc-text);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.18);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-weekdays div {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--mc-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-md);
  background: var(--mc-surface);
  cursor: pointer;
  transition: var(--mc-transition);
  position: relative;
}

.calendar-day::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.calendar-day:hover:not(:disabled)::before {
  opacity: 1;
}

.calendar-day:hover:not(:disabled) {
  border-color: var(--mc-cyan);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4), 0 0 28px rgba(6, 182, 212, 0.18);
}

.calendar-day.selected {
  background: var(--mc-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 38px rgba(6, 182, 212, 0.35), 0 0 0 1px rgba(255,255,255,0.12) inset;
}

.calendar-day.selected .day-number { color: #fff; }
.calendar-day.selected .day-availability { color: rgba(255,255,255,0.9); }

.calendar-day:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: rgba(255,255,255,0.02);
}

.calendar-day.other-month {
  color: var(--mc-text-muted);
  background: rgba(255,255,255,0.02);
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
  box-shadow: none;
}

.day-number {
  font-size: 16px;
  font-weight: 800;
  color: var(--mc-text);
}

.day-availability {
  font-size: 10px;
  color: var(--mc-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.day-availability.has-slots {
  color: var(--mc-success);
}

.calendar-day.selected .day-availability.has-slots {
  color: rgba(255,255,255,0.95);
}

/* Slots panel */
.slots-panel {
  margin-top: 38px;
  padding-top: 38px;
  border-top: 1px solid var(--mc-border);
}

.slots-panel h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--mc-text);
  font-weight: 800;
}

.slots-date {
  margin: 0 0 20px;
  color: var(--mc-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.slots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.slot-chip {
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 800;
  color: var(--mc-text);
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--mc-transition);
}

.slot-chip:hover {
  border-color: var(--mc-cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.15);
  transform: translateY(-2px);
}

.slot-chip.selected {
  background: var(--mc-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 26px rgba(6, 182, 212, 0.32);
}

.slots-empty {
  color: var(--mc-text-muted);
  font-size: 14px;
}

/* Form section */
.form-section {
  background:
    linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%),
    rgba(0, 0, 0, 0.22);
  padding: 48px;
}

.form-sticky {
  position: sticky;
  top: calc(var(--nav-height, 88px) + 28px);
}

.form-empty {
  text-align: center;
  padding: 56px 24px;
}

.empty-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  background: var(--mc-gradient-subtle);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 14px 38px rgba(0,0,0,0.28), 0 0 28px rgba(6, 182, 212, 0.12);
}

.form-empty h3 {
  margin: 0 0 10px;
  color: var(--mc-text);
  font-size: 20px;
  font-weight: 800;
}

.form-empty p {
  margin: 0;
  color: var(--mc-text-muted);
  font-size: 14px;
  line-height: 1.7;
}

#booking-form h3 {
  margin: 0 0 24px;
  font-size: 22px;
  color: var(--mc-text);
  font-weight: 800;
  letter-spacing: -0.4px;
}

.summary-box {
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-md);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--mc-border);
  font-size: 14px;
}

.summary-row:last-child { border-bottom: none; }

.summary-row span { color: var(--mc-text-muted); font-weight: 600; }
.summary-row strong { color: var(--mc-text); font-weight: 800; }

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--mc-text);
  letter-spacing: 0.2px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 15px 17px;
  font-size: 15px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-sm);
  outline: none;
  transition: var(--mc-transition);
  background: rgba(255, 255, 255, 0.04);
  font-family: inherit;
  color: var(--mc-text);
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 46px;
  cursor: pointer;
}

.form-group select option {
  background: #0c0c16;
  color: var(--mc-text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--mc-cyan);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12), 0 0 28px rgba(6, 182, 212, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 104px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 30px;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: var(--mc-radius-sm);
  cursor: pointer;
  transition: var(--mc-transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--mc-gradient);
  color: #fff;
  box-shadow: 0 12px 36px rgba(6, 182, 212, 0.32);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  animation: btnShine 4s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.42);
}

.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.35);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary:disabled::before {
  display: none;
}

.btn-block { width: 100%; }

.error-message {
  padding: 14px 17px;
  background: rgba(248, 113, 113, 0.1);
  color: var(--mc-danger);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--mc-radius-sm);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Login section */
.login-layout {
  max-width: 460px;
  margin: 0 auto;
  padding: 56px 40px;
  text-align: center;
}

.login-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  background: var(--mc-gradient-subtle);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 14px 38px rgba(0,0,0,0.28), 0 0 28px rgba(6, 182, 212, 0.12);
}

.login-layout h2 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 800;
  color: var(--mc-text);
}

.login-layout > p {
  margin: 0 0 32px;
  color: var(--mc-text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.login-form {
  text-align: left;
}

.login-links {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-links a {
  color: var(--mc-cyan);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

/* User bar */
.user-bar {
  max-width: 1200px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 14px 22px;
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-md);
  backdrop-filter: blur(14px);
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.user-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--mc-text);
}

.user-email {
  font-size: 12px;
  color: var(--mc-text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--mc-text-secondary);
  border: 1px solid var(--mc-border);
  padding: 10px 18px;
  font-size: 13px;
}

.btn-ghost:hover {
  border-color: var(--mc-cyan);
  color: var(--mc-text);
  background: rgba(6, 182, 212, 0.08);
}

.form-group input[readonly] {
  opacity: 0.7;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.03);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 1, 10, 0.7);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  background: rgba(15, 15, 26, 0.88);
  backdrop-filter: blur(28px);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-xl);
  box-shadow: var(--mc-shadow), var(--mc-shadow-glow);
  padding: 48px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  z-index: 1;
  animation: modalIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: var(--mc-gradient-subtle);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  box-shadow: 0 14px 38px rgba(0,0,0,0.28), 0 0 28px rgba(6, 182, 212, 0.12);
}

.modal-card h2 {
  margin: 0 0 14px;
  color: var(--mc-text);
  font-size: 26px;
  font-weight: 800;
}

.modal-card p {
  margin: 0 0 8px;
  color: var(--mc-text-secondary);
}

.modal-staff {
  color: var(--mc-text-muted);
  font-size: 14px;
}

.modal-note {
  color: var(--mc-text-muted);
  font-size: 13px;
  margin: 20px 0 30px !important;
}

.hidden { display: none !important; }

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

@keyframes btnShine {
  0% { left: -100%; }
  20% { left: 100%; }
  100% { left: 100%; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(24px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive */
@media (max-width: 980px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .calendar-section {
    border-right: none;
    border-bottom: 1px solid var(--mc-border);
    padding: 30px;
  }

  .form-section {
    padding: 30px;
  }

  .form-sticky {
    position: static;
  }

  .page-header h1 {
    font-size: clamp(34px, 9vw, 50px);
  }
}

@media (max-width: 480px) {
  .main-container { padding: 18px 12px 48px; padding-top: calc(var(--nav-height, 70px) + 18px); }
  .calendar-section, .form-section { padding: 22px; }
  .calendar-grid { gap: 7px; }
  .calendar-weekdays { gap: 7px; }
  .calendar-day { border-radius: 14px; }
  .day-number { font-size: 14px; }
  .day-availability { display: none; }
  .modal-card { padding: 32px; }
  .page-header { margin-bottom: 30px; }
  .page-header p { font-size: 16px; }
}
