/* =========================
   Header and Rules
========================= */

:root{
  --ink-900:#1a2238;  /* Reservation */
  --ink-300:#c9ced6;  /* Our */
  --ink-700:#394150;
  --line:#e6e8eb;
  --panel:#f6f7f9;
  --page-gutter: 24px;
}

.reservation-container{ max-width:1400px; margin:0 auto; padding:24px 0 64px;
  font-family:'Roboto','Source Han Sans',sans-serif; color:var(--ink-900); }

/* Responsive container padding */
@media (max-width: 768px) {
  .reservation-container {
    padding: 20px 0 48px;
  }
}

@media (max-width: 576px) {
  .reservation-container {
    padding: 16px 0 40px;
  }
}

@media (max-width: 480px) {
  .reservation-container {
    padding: 12px 0 32px;
  }
}

.reservation-hero{ padding:56px 0 18px; }
.reservation-title{ margin:0 0 18px 0; line-height:0.7;letter-spacing:-.5px; display:block !important; }
.title-our{ 
  display:block; 
  font-family: 'Roboto', 'Source Han Sans', sans-serif;
  font-size:66px; 
  font-weight:600; 
  color:#9ca3af; /* Same as other ghost titles */
}
.title-reservation{ 
  display:block; 
  font-family: 'Roboto', 'Source Han Sans', sans-serif;
  font-size:66px; 
  font-weight:800; 
  color:#1a2238; /* Dark color for main title */
}

/* Responsive title sizing */
@media (max-width: 1200px) {
  .title-our,
  .title-reservation {
    font-size: 56px;
  }
}

@media (max-width: 992px) {
  .title-our,
  .title-reservation {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .title-our,
  .title-reservation {
    font-size: 36px;
  }
  
  .reservation-hero {
    padding: 40px 0 16px;
  }
}

@media (max-width: 576px) {
  .title-our,
  .title-reservation {
    font-size: 28px;
  }
  
  .reservation-hero {
    padding: 32px 0 14px;
  }
}

@media (max-width: 480px) {
  .title-our,
  .title-reservation {
    font-size: 24px;
  }
  
  .reservation-hero {
    padding: 24px 0 12px;
  }
}
.reservation-rule{ border:0; border-top:1px solid var(--line); }

/* Rules card + CN/ENG groups with gap */
.rules-card{ margin-top:18px; background:var(--panel); border:1px solid var(--line);
  border-radius:12px; padding:22px 24px; }

/* Responsive rules card padding */
@media (max-width: 768px) {
  .rules-card {
    padding: 18px 20px;
    margin-top: 16px;
  }
}

@media (max-width: 576px) {
  .rules-card {
    padding: 16px 18px;
    margin-top: 14px;
  }
}

@media (max-width: 480px) {
  .rules-card {
    padding: 14px 16px;
    margin-top: 12px;
  }
}
.rules-heading{ 
  font-family: 'Roboto', 'Source Han Sans', sans-serif;
  font-size:42px; 
  font-weight:600; 
  color:#9ca3af; /* Same as other ghost titles */
  margin:0 0 10px; 
}

/* Responsive rules heading sizing */
@media (max-width: 1200px) {
  .rules-heading {
    font-size: 36px;
  }
}

@media (max-width: 992px) {
  .rules-heading {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .rules-heading {
    font-size: 28px;
  }
}

@media (max-width: 576px) {
  .rules-heading {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .rules-heading {
    font-size: 20px;
  }
}

.rules-md{ display:flex; flex-direction:column; gap:16px; }
.rules-group{ position:relative; padding-top:6px; }
.rules-group ul{ margin:0; padding-left:22px; }
.rules-group li{ font-size:16px; color:var(--ink-700); line-height:1.9; }

.rules-label{
  position:absolute; top:-10px; left:6px;
  display:inline-block; padding:2px 8px; border-radius:999px;
}


/* =========================
   User Instructions Banner
========================= */

.user-instructions {
  margin: 20px var(--page-gutter) 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* =========================
   Equipment Selection Highlighting
========================= */

.equipment-row.selected-equipment {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.equipment-row.selected-equipment .equip-col {
  background: rgba(59, 130, 246, 0.05);
}

.equipment-row.selected-equipment .equip-name {
  color: #1d4ed8;
  font-weight: 700;
}

/* =========================
   Selection Counter
========================= */

.selection-counter {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  margin: 0 20px 16px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.selection-counter:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =========================
   Success/Error Messages
========================= */

.success-message,
.error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  animation: slideInRight 0.3s ease-out;
}

.success-message .message-content {
  background: #10b981;
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.error-message .message-content {
  background: #ef4444;
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.message-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.message-close-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.message-close-btn:hover {
  opacity: 1;
}

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

/* Responsive design for messages and selection counter */
@media (max-width: 768px) {
  .success-message,
  .error-message {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .selection-counter {
    margin: 0 10px 12px 10px;
    padding: 6px 12px;
    font-size: 13px;
  }
}

.instruction-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #0369a1;
}

.instruction-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.instruction-text {
  line-height: 1.4;
}

.instruction-text strong {
  color: #0c4a6e;
}

/* Responsive design for instruction banner */
@media (max-width: 768px) {
  .user-instructions {
    margin: 16px 16px 12px;
    padding: 10px 12px;
  }
  
  .instruction-content {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .instruction-text {
    font-size: 13px;
  }
}

/* =========================
   Booking Table
========================= */

/* ==== SCHEDULE (scoped) ==== */
:root{
  --rsv-slot-w: 80px;      /* width per 30-min cell (bigger than reference) */
  --rsv-slot-h: 120px;       /* cell height */
  --rsv-row-gap: 0px;       /* no gap between equipment rows */
  --rsv-equip-w: 120px;
  --rsv-equip-h: 120px;     /* fixed left column width */
  --rsv-bar-h: 40px;        /* time header height */
  --rsv-now: #e60072;       /* pink now line */
  --rsv-line: #e8edf3;
  --rsv-panel: #f9fafb;
  --rsv-slot-bg: #fafbfc;
  --rsv-slot-bd: #e6ebf1;
  --rsv-booked: #e8f1ff;
  --rsv-booked-bd: #cfe0ff;
  --rsv-leftpad: 10px;  /* Match the timebar padding-left for perfect alignment */
  --rsv-gap: 10px;  
}

*{ box-sizing: border-box; }

.reservation-schedule{
  margin: 18px 0 60px;
}

.schedule-header {
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
  gap: 12px; /* ← ADD this to create space between date/arrows/timeline */
}

/* Adjust left arrow positioning to align better with time header */
.schedule-header .nav-arrow:first-of-type {
  margin-top: 2px; /* Fine-tune vertical alignment with time header */
  margin-left: 0px; /* Align left arrow with the start of time labels */
}


.reservation-schedule { position: relative; overflow: hidden; } /* clip the global line */

.equip-col{ width:var(--rsv-equip-w); flex:0 0 var(--rsv-equip-w); padding-left: 0 !important;
  padding-right: 0 !important;}
.equip-col--header{ display:flex; align-items:center; gap:10px; padding-left: 0 !important;}


.nav-arrow{
  width: 24px; 
  height: 24px; 
  border-radius: 50%;
  border: 1px solid #e5e7eb; 
  background: #f1f3f5; 
  cursor: pointer;
  font-size: 14px; 
  line-height: 22px; 
  text-align: center;
  color: #6b7280;
  transition: all 0.2s ease;
}
.nav-arrow:hover{ 
  background: #e9ecef; 
  border-color: #d1d5db;
  transform: scale(1.05);
}

.slots-viewport{
  position:relative; overflow-x:auto; overflow-y:hidden; flex:1;
  height:var(--rsv-bar-h); border-radius:12px; background:#f8f9fa;
  border:3px solid #6c757d;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* Hide horizontal scrollbars but keep programmatic scrolling */
.slots-viewport, #rsv-rows .row-viewport { scrollbar-width: none; }
.slots-viewport::-webkit-scrollbar, #rsv-rows .row-viewport::-webkit-scrollbar { display: none; }

/* Make the pink line clearly visible above everything */
.now-line {
  z-index: 3;
  pointer-events: none;
}

.timebar{
	position:absolute;
	inset:0;
	display:flex; 
	align-items:center; 
	padding-left: 10px; /* Move time header text further left */
	gap: var(--rsv-gap); 
}
.timebar .time-label {
  min-width: var(--rsv-slot-w);
  text-align: center;
  font-size: 16px;
  color: #333;
  font-weight: 700;
  white-space: nowrap;
  /* Center the time label over its corresponding slot */
  position: relative;
  transform: none;
  /* Force remove all borders and styling */
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  line-height: 1.2; /* Better vertical centering */
}

/* Maximum specificity override for time labels */
body .reservation-container .timebar .time-label,
body .reservation-container .slots-viewport .timebar .time-label {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Nuclear option - override absolutely everything */
.timebar .time-label,
.timebar .time-label *,
.timebar .time-label::before,
.timebar .time-label::after {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  outline: none !important;
  background-color: transparent !important;
  border-color: transparent !important;
  
}

/* Target the specific visual appearance from the image */
.timebar .time-label {
  /* Force remove the white box appearance */
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  
  /* Additional properties to ensure no styling */
  margin: 0 !important;
  display: inline !important;
  line-height: 1 !important;
  text-decoration: none !important;
  list-style: none !important;
}

/* Override any possible inherited styles */
.timebar .time-label,
.slots-viewport .timebar .time-label,
.reservation-schedule .timebar .time-label {
  all: unset !important;
  display: inline-block !important;
  min-width: var(--rsv-slot-w) !important;
  text-align: center !important;
  font-size: 16px !important; /* Increased from 14px for better visibility */
  color: #333 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  position: relative !important;
  transform: none !important;
  line-height: 1.2 !important; /* Better vertical centering */
}


.date-dropdown{ position:relative; }
.date-button {
  background: #0b0b0b;
  color: #fff;
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  padding: 8px 28px;
  cursor: pointer;
  text-align: center; 
  transition: opacity 0.2s ease;
}
/* Scrollable date menu */
.date-menu{
  position:absolute; left:0; top:calc(100% + 8px);
  background:#fff; border-radius:14px; box-shadow:0 10px 30px rgba(0,0,0,.12);
  padding:8px; min-width:140px;
  max-height: 280px;           /* <= shows scrollbar when list is longer */
  overflow-y: auto;            /* <-- important */
  overscroll-behavior: contain;
  display:none; z-index:10;
}
.date-dropdown.open .date-menu{ display:block; }

.date-item{
  display:block; width:100%; text-align:left; background:transparent; border:0;
  padding:10px 14px; border-radius:10px; cursor:pointer; font-weight:600;
}

/* Date item with day name layout */
.date-item .date-main {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.date-item .date-status {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-item:hover{ 
  background:#f3f4f6; 
  color:#111827; 
  transition: all 0.2s ease;
}

.date-item.is-selected{ 
  background:#0b0b0b; 
  color:#fff; 
  border: none;
}  /* selected date */
.date-item.is-today{ 
  outline:none; 
}            /* today hint (optional) */

/* =========================
   Weekend and Holiday Dates - Unified Styling
   ========================= */

/* All weekend and holiday dates - consistent base styling */
.date-item.date-item-restricted {
  color: #111827 !important; /* Black text */
  background: #fef2f2 !important; /* Light pink background */
  border: 1px solid #fecaca !important; /* Light red border */
  opacity: 1 !important; /* Full opacity */
}

.date-item.date-item-restricted .date-status {
  color: #dc2626 !important; /* Red day label (SAT, SUN) */
  font-weight: 600 !important;
}

/* All weekend and holiday dates - hover state */
.date-item.date-item-restricted:hover {
  background: #dc2626 !important; /* Red background on hover */
  color: #fff !important; /* White text on hover */
  border-color: #dc2626 !important; /* Red border on hover */
}

.date-item.date-item-restricted:hover .date-status {
  color: #fff !important; /* White day label on hover */
}

/* Override any other states to maintain consistency */
.date-item.is-today.date-item-restricted,
.date-item.is-selected.date-item-restricted {
  color: #111827 !important; /* Always black text in normal state */
  background: #fef2f2 !important; /* Always light pink background */
  border: 1px solid #fecaca !important; /* Always light red border */
}

.date-item.is-today.date-item-restricted .date-status,
.date-item.is-selected.date-item-restricted .date-status {
  color: #dc2626 !important; /* Always red day label */
}

/* Hover state for all weekend dates (including today and selected) */
.date-item.is-today.date-item-restricted:hover,
.date-item.is-selected.date-item-restricted:hover {
  background: #dc2626 !important; /* Red background on hover */
  color: #fff !important; /* White text on hover */
  border-color: #dc2626 !important; /* Red border on hover */
}

.date-item.is-today.date-item-restricted:hover .date-status,
.date-item.is-selected.date-item-restricted:hover .date-status {
  color: #fff !important; /* White day label on hover */
}

/* Optional: nicer scrollbar */
.date-menu::-webkit-scrollbar{ width:8px; }
.date-menu::-webkit-scrollbar-thumb{ background:#e5e7eb; border-radius:999px; }




/* Rows - Override main CSS with maximum specificity */
#rsv-rows .equip-row{ 
  display: flex !important; 
  align-items: stretch !important; 
  margin-top: 0 !important; 
  padding-left: var(--page-gutter) !important;
  padding-right: var(--page-gutter) !important;
  gap: 0 !important;
  position: static !important;
  grid-template-columns: none !important;
  grid-auto-rows: auto !important;
  /* Override all grid properties */
  grid: none !important;
  grid-area: unset !important;
  grid-column: unset !important;
  grid-row: unset !important;
  /* Override any flexbox gaps */
  column-gap: 0 !important;
  row-gap: 0 !important;
}

/* Maximum specificity override for reservation equipment rows */
body .reservation-container #rsv-rows .equip-row {
  gap: 0 !important;
  margin: 20px 0 !important;
  padding: 0 !important;
  display: flex !important;
  grid: none !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  grid-auto-columns: auto !important;
  grid-auto-rows: auto !important;
  grid-template-areas: none !important;
  grid-area: unset !important;
  grid-column: unset !important;
  grid-row: unset !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
}
/* left column wrapper stays the same width */
#rsv-rows .equip-left{
  width: var(--rsv-equip-w);
  flex: 0 0 var(--rsv-equip-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 0;
  padding-left: 0;
  margin-right: 24px; /* Add gap between equipment and slots */
}

/* remove inner padding so the image can use the full box area */
#rsv-rows .equip-card{
  width: 100%;
  padding: 0;                 /* ← was 16px */
  background: transparent;    /* we'll make the image box the visual card */
  border-radius: 0;
  box-shadow: none;
}

/* image box = the card */
:root{
  --rsv-equip-h: 120px;       /* raise to make the image taller (160–200 works great) */
}
#rsv-rows .equip-thumb{
  width: 100%;
  height: var(--rsv-equip-h);
  border: 1px solid #e6ebf1;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  position: relative; /* Added for status badge positioning */
}
#rsv-rows .equip-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;          /* fills the box; use `contain` if you prefer no crop */
}

/* name & model sit outside the card, tighter spacing */
#rsv-rows .equip-meta-below{ text-align:center; margin-top: 6px; }
#rsv-rows .equip-name{ font-weight: 600; font-size: 14px; line-height: 1.1; }
#rsv-rows .equip-model{ font-weight: 600; font-size: 14px; }

/* Equipment status badges - now as overlays on the image */
.equip-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  min-width: 120px;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }
}

.equip-status--broken {
  background: rgba(239, 68, 68, 0.95);
  color: white;
  border: 2px solid #dc2626;
}

.equip-status--maintenance {
  background: rgba(245, 158, 11, 0.95);
  color: white;
  border: 2px solid #d97706;
}

.equip-status--out-of-service {
  background: rgba(127, 29, 29, 0.95);
  color: white;
  border: 2px solid #7f1d1d;
}

/* Broken equipment row styling */
.equip-row--broken .equip-thumb {
  opacity: 0.7;
  filter: grayscale(100%);
}

.equip-row--broken .equip-thumb img {
  filter: grayscale(100%);
}

/* Add a dark overlay for broken equipment */
.equip-row--broken .equip-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  z-index: 5;
}

/* Broken slot styling */
.slot.broken {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  cursor: not-allowed;
  position: relative;
}

.slot.broken::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(220, 38, 38, 0.1) 2px,
    rgba(220, 38, 38, 0.1) 4px
  );
  pointer-events: none;
}


/* ===== Remove the big border/background panel behind slots ===== */
#rsv-rows .row-viewport{
  flex: 1;
  overflow: hidden;
  position: relative;
  border: 0;                 /* ← no border */
  background: transparent;   /* ← no background panel */
  border-radius: 0;          /* ← no rounded container */
  box-shadow: none;
}
#rsv-rows .row-slots{
  display: flex;
  width: max-content;
  background: transparent;   /* ← transparent row strip */
  padding-left: 30px;        /* Move slots further right for optimal alignment with time labels */
  gap: var(--rsv-gap);
}

/* Slot boxes keep their white tile appearance */
#rsv-rows .slot{
  width: var(--rsv-slot-w);
  height: var(--rsv-slot-h);
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.04);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  cursor: pointer; /* Make it clear slots are clickable */
  position: relative;
}

/* Add visual hint for interaction - only on hover and only on available slots */
#rsv-rows .slot.available::after {
  content: "Click to select • Drag for multiple";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #6c757d;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#rsv-rows .slot.available:hover::after {
  opacity: 1;
  background: rgba(255, 255, 255, 1);
}

/* Additional improvements for booking display */

/* Enhanced booking slot appearance */
/* Additional improvements for booking display */

/* Enhanced booking slot appearance */
#rsv-rows .slot.booked {
  background: #e8f4fd;
  border: none;
  color: #111827;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}



/* Remove pattern overlay for clean look */

/* Past slots styling */
#rsv-rows .slot.past {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border: 1px solid #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
  position: relative;
}

#rsv-rows .slot.past::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(156, 163, 175, 0.2) 3px,
    rgba(156, 163, 175, 0.2) 6px
  );
  pointer-events: none;
}

/* Weekend/Holiday disabled slots */
#rsv-rows .slot.weekend-holiday {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  color: #dc2626;
  cursor: not-allowed;
  opacity: 0.8;
  position: relative;
}

#rsv-rows .slot.weekend-holiday::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(239, 68, 68, 0.1) 3px,
    rgba(239, 68, 68, 0.1) 6px
  );
  pointer-events: none;
}

/* Weekend warning modal */
.weekend-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Date restricted message */
.date-restricted-message {
  grid-column: 1 / -1;
  margin: 20px;
}

/* Email field with datalist styling */
input[name="email"] {
  position: relative;
}

input[name="email"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Style the datalist dropdown */
datalist {
  display: none;
}

/* Custom dropdown for email domains */
.email-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.email-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}

.email-suggestion:hover {
  background: #f3f4f6;
}

.email-suggestion:last-child {
  border-bottom: none;
}

/* Improve booking info layout */
.booking-info {
  position: relative;
  z-index: 1;
  background: #e8f4fd;
  border-radius: 12px;
  padding: 8px;
  margin: 2px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Better visual hierarchy for booking information */
.booking-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.user-avatar {
  width: 24px;
  height: 24px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.time-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: -2px;
}

.booking-time {
  font-size: 10px;
  color: #6b7280;
  font-weight: 600;
  line-height: 1;
}

.user-name {
  font-size: 10px;
  color: #6b7280;
  font-weight: 600;
  line-height: 1;
  text-align: left;
}

.user-name-container {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 4px;
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}



.project-name {
  font-size: 11px;
  color: #111827;
  font-weight: 900;
  line-height: 1;
  word-break: break-word;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin-top: auto;
  margin-bottom: auto;
}

/* Loading state for slots */
.slot.loading {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error state for failed booking loads */
.slot.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.slot.error::after {
  content: "⚠️ Error loading";
  font-size: 10px;
}

/* Enhanced selected slot animation */
#rsv-rows .slot.selected {
  background: linear-gradient(135deg, #e8f1ff 0%, #dbeafe 100%);
  border: 3px solid #3b82f6;
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.25),
    0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px) scale(1.02);
  position: relative;
  z-index: 2;
}

/* Add selection order numbers */
#rsv-rows .slot.selected::before {
  content: attr(data-selection-order);
  position: absolute;
  top: 2px;
  right: 2px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  z-index: 3;
}

/* Hover effects for available slots */
#rsv-rows .slot.available:hover {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  cursor: pointer;
}

/* Disabled state for unavailable slots */
#rsv-rows .slot.disabled {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Better responsiveness for booking information */
@media (max-width: 768px) {
  .booking-info {
    padding: 6px;
    margin: 1px;
    justify-content: flex-start;
  }
  
  .booking-header {
    gap: 6px;
    margin-bottom: 6px;
    margin-left: -2px;
  }
  
  .user-avatar {
    width: 20px;
    height: 20px;
  }
  
  .user-avatar-initial {
    font-size: 8px;
  }
  
  .booking-time,
  .user-name {
    font-size: 9px;
    text-align: left;
  }
  
  .user-name-container {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 4px;
  }
  
  .project-name {
    font-size: 10px;
    text-align: center;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-top: auto;
    margin-bottom: auto;
  }

  .weekend-warning > div {
    width: 95% !important;
    padding: 20px !important;
  }
  
  /* Responsive status badges */
  .equip-status {
    font-size: 10px;
    padding: 6px 8px;
    min-width: 100px;
  }
}

/* Enhanced error messaging */
.booking-error {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  color: #dc2626;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

.booking-success {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  color: #166534;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

/* Tooltip for booked slots */
#rsv-rows .slot.booked {
  position: relative;
}

#rsv-rows .slot.booked:hover::after {
  content: "Slot is already booked";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 4px;
  pointer-events: none;
}

/* Tooltip for past slots */
#rsv-rows .slot.past:hover::after {
  content: "Past time slot";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #6b7280;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 4px;
  pointer-events: none;
}

/* Tooltip for weekend/holiday slots */
#rsv-rows .slot.weekend-holiday:hover::after {
  content: "Booking not available";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #dc2626;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 4px;
  pointer-events: none;
}

/* Add arrow to tooltips */
#rsv-rows .slot.booked:hover::before,
#rsv-rows .slot.past:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
  z-index: 1000;
  pointer-events: none;
}

#rsv-rows .slot.past:hover::before {
  border-top-color: #6b7280;
}

#rsv-rows .slot.weekend-holiday:hover::before {
  border-top-color: #dc2626;
}

/* Slot time alignment improvements */
#rsv-rows .row-slots {
  gap: var(--rsv-gap);
}

/* Ensure time labels align perfectly with slots */
.timebar {
  /* padding-left is set in the main .timebar rule above */
}

.timebar .time-label {
  /* Ensure each time label covers exactly one slot width */
  width: var(--rsv-slot-w);
  min-width: var(--rsv-slot-w);
  max-width: var(--rsv-slot-w);
  flex-shrink: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading overlay for entire system */
.system-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  backdrop-filter: blur(2px);
}

.system-loading-content {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.system-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================
   Smart Loading States
========================= */

/* Enhanced system loading with transitions */
.system-loading {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.system-loading.show {
  opacity: 1;
  visibility: visible;
}

.system-loading-content {
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.system-loading.show .system-loading-content {
  transform: scale(1);
}

/* Skeleton loading for slots - better than spinner */
.slot.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border: 1px solid #e5e7eb;
  cursor: default;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Subtle loading indicator for date changes */
.date-loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.date-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Inline loading for form submission */
.form-loading {
  position: relative;
  pointer-events: none;
}

.form-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 16px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border: 2px solid transparent;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Quick loading for slot updates */
.slot-updating {
  position: relative;
  overflow: hidden;
}

.slot-updating::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  animation: slot-update-sweep 0.6s ease-out;
}

@keyframes slot-update-sweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

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

/* Enhanced selected slot animation */
#rsv-rows .slot.selected {
  background: linear-gradient(135deg, #e8f1ff 0%, #dbeafe 100%);
  border: 3px solid #3b82f6;
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.25),
    0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px) scale(1.02);
  position: relative;
  z-index: 2;
}

/* Add selection order numbers */
#rsv-rows .slot.selected::before {
  content: attr(data-selection-order);
  position: absolute;
  top: 2px;
  right: 2px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  z-index: 3;
}

/* Hover effects for available slots */
#rsv-rows .slot.available:hover {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  cursor: pointer;
}

/* Disabled state for unavailable slots */
#rsv-rows .slot.disabled {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Better responsiveness for booking information */
@media (max-width: 768px) {
  .booking-info {
    padding: 6px;
    margin: 1px;
    justify-content: flex-start;
  }
  
  .booking-header {
    gap: 6px;
    margin-bottom: 6px;
    margin-left: -2px;
  }
  
  .user-avatar {
    width: 20px;
    height: 20px;
  }
  
  .user-avatar-initial {
    font-size: 8px;
  }
  
  .booking-time,
  .user-name {
    font-size: 9px;
    text-align: left;
  }
  
  .user-name-container {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 4px;
  }
  
  .project-name {
    font-size: 10px;
    text-align: center;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-top: auto;
    margin-bottom: auto;
  }
}

/* Responsive styles for smaller screens */
@media (max-width: 576px) {
  .equip-status {
    font-size: 9px;
    padding: 4px 6px;
    min-width: 80px;
  }
  
  .equip-row--broken .equip-thumb {
    height: 80px;
  }
}

/* Enhanced error messaging */
.booking-error {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  color: #dc2626;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

.booking-success {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  color: #166534;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

/* Tooltip for booked slots */
#rsv-rows .slot.booked {
  position: relative;
}

#rsv-rows .slot.booked:hover::after {
  content: "Slot is already booked";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 4px;
  pointer-events: none;
}

/* Add arrow to tooltip */
#rsv-rows .slot.booked:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
  z-index: 1000;
  pointer-events: none;
}

/* Selected slots styling - light blue like booked slots */
#rsv-rows .slot.selected{
  background: #e8f1ff;
  border-color: #3b82f6;
  border-width: 2px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
  position: relative;
  animation: slotSelected 0.2s ease-out;
}

@keyframes slotSelected {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-view { text-align:center; padding:18px 8px 8px; }


/* Equipment images */
#rsv-rows .equip-thumb { display:flex; align-items:center; justify-content:center; overflow:hidden; }
#rsv-rows .equip-thumb img { width:100%; height:100%; object-fit: contain; }

/* Global pink line spanning header + all rows */
.now-line-global { 
  position:absolute; 
  top: 0; /* Will be positioned dynamically by JavaScript */
  bottom:0; 
  width:3px; /* Slightly thicker for better visibility */
  background:var(--rsv-now); 
  z-index:10; /* Higher z-index to ensure visibility */
  pointer-events:none; 
  border-radius: 0;
  box-shadow: 0 0 4px rgba(230, 0, 114, 0.3); /* Add subtle glow effect */
}
.now-line-global::before { 
  content:""; 
  position:absolute; 
  top:0; 
  left:-1.5px; /* Adjust for the new line width */
  width:8px; /* Slightly larger dot */
  height:8px; /* Slightly larger dot */
  border-radius:50%; 
  background:var(--rsv-now); 
  box-shadow: 0 0 6px rgba(230, 0, 114, 0.4); /* Add glow to dot */
}

/* ===== Beautiful Modal Design ===== */
.modal{ 
  position: fixed; 
  inset: 0; 
  display: none; 
  z-index: 1000; 
  font-family: 'Roboto', 'Source Han Sans', sans-serif;
}

.modal[aria-hidden="false"]{ 
  display: grid; 
  place-items: center; 
}

.modal__backdrop{ 
  position: absolute; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.6); 
  z-index: 0; 
  backdrop-filter: blur(4px);
}

.modal__dialog{
  position: relative; 
  z-index: 1;
  width: min(600px, 95vw); 
  max-height: 90vh;
  margin: 0; 
  padding: 0;
  background: #ffffff; 
  border-radius: 20px; 
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e5e7eb;
}

/* Simple Header */
.modal-header {
  background: #ffffff;
  padding: 32px 32px 0px 32px;
  text-align: center;
  border-bottom: none;
}

.modal__title{ 
  color: #374151; 
  text-align: center; 
  margin: 0 0 8px 0; 
  font-size: 28px; 
  font-weight: 700; 
  letter-spacing: -0.5px;
  line-height: 1;
}

.modal__subtitle{ 
  font-size: 28px; 
  font-weight: 600; 
  color: #374151;
  display: block;
  margin-top: 4px;
}

.modal__close{ 
  position: absolute; 
  right: 20px; 
  top: 30px; 
  font-size: 60px; 
  border: 0; 
  background: transparent;
  cursor: pointer; 
  color: #9ca3af;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal__close:hover{ 
  background: #f3f4f6;
  color: #6b7280;
}

/* Beautiful Form */
.form{ 
  display: flex; 
  flex-direction: column; 
  gap: 24px;
  padding: 32px;
}

.form__row{ 
  display: flex; 
  flex-direction: row; 
  align-items: flex-start;
  gap: 14px;
}

.form__label{ 
  font-weight: 600; 
  color: #374151; 
  font-size: 18px;
  min-width: 80px;
  flex-shrink: 0;
}

.required{ 
  color: #dc2626; 
  font-weight: 700;
  margin-left: 2px;
}

.form__input{ 
  width: 100%; 
  background: #f8fafc; 
  border: 2px solid #e2e8f0; 
  border-radius: 12px; 
  padding: 16px 20px; 
  font-size: 16px;
  transition: all 0.2s ease;
  color: #1e293b;
  font-family: inherit;
}

.form__input:focus{ 
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form__input:invalid{ 
  border-color: #dc2626; 
  background: #fef2f2; 
}

.form__textarea{ 
  height: 120px; 
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Email Split Container */
.email-split-container {
  display: flex;
  gap: 0;
  width: 100%;
  position: relative;
}

.email-username {
  flex: 1;
  border-radius: 12px 0 0 12px;
  border-right: none;
}

.email-domain {
  flex: 0 0 200px;
  border-radius: 0 12px 12px 0;
  border-left: none;
}

.email-username:focus {
  border-right: 2px solid #3b82f6;
}

.email-domain:focus {
  border-left: 2px solid #3b82f6;
}

/* Email Preview */
.email-preview {
  text-align: center;
  margin-top: 12px;
  padding: 8px 16px;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  border-radius: 8px;
  color: #059669;
  font-size: 13px;
  font-weight: 500;
}

.email-preview-text {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-weight: 400;
}

/* Time Pills */
.time-pills{ 
  display: flex; 
  gap: 16px; 
  align-items: center;
  flex-wrap: wrap;
}

.time-pill{ 
  min-width: 100px; 
  text-align: center; 
  background: #f1f5f9; 
  padding: 16px 20px; 
  border-radius: 12px; 
  font-weight: 700; 
  font-size: 16px;
  color: #475569;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
}

.time-pill:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.time-arrow{ 
  font-size: 20px; 
  color: #64748b;
  font-weight: 600;
}

/* Duration Display */
.duration-display{ 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  font-weight: 600; 
  color: #3b82f6; 
  background: #eff6ff; 
  padding: 16px 20px; 
  border-radius: 12px; 
  border: 2px solid #bfdbfe;
  text-align: center;
  justify-content: center;
}

/* Checkbox Container */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 0;
}

.checkbox-container input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 24px;
  height: 24px;
  background: #f8fafc;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 16px;
  font-weight: bold;
}

.checkbox-text {
  color: #374151;
  font-size: 16px;
  font-weight: 500;
  line-height: 0.6;
}

/* Submit Button */
.btn-submit{ 
  margin-top: 2px; 
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #ffffff; 
  border: 0; 
  width: 100%; 
  padding: 20px 10px; 
  border-radius: 12px; 
  letter-spacing: 1px; 
  font-weight: 700; 
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

/* Success View Button */
.success-view .btn-submit {
  margin-top: 32px;
}

.btn-submit:hover{ 
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.btn-submit:active{ 
  transform: translateY(0);
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

.btn-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-text, .btn-loading {
  display: inline-block;
  transition: opacity 0.2s ease;
}

/* Success View */
.success-view {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 120px;
  height: 120px;
  margin: 8px auto 24px;
  display: grid;
  place-items: center;
  font-size: 56px;
  color: #ffffff;
  background: #8b5cf6;
  border: 6px solid #e5e7eb;
  border-radius: 50%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal__dialog {
    width: 95vw;
    margin: 20px;
    border-radius: 16px;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 24px 20px 20px 20px;
  }
  
  .form {
    padding: 24px 20px;
    gap: 20px;
  }
  
  .form__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .form__label {
    min-width: auto;
    font-size: 16px;
    margin-bottom: 4px;
  }
  
  .modal__title {
    font-size: 24px;
    margin: 0 0 6px 0;
  }
  
  .modal__subtitle {
    font-size: 20px;
    margin-top: 2px;
  }
  
  .time-pills {
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .time-pill {
    min-width: 80px;
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .email-domain {
    flex: 0 0 180px;
  }
  
  .form__input,
  .form__textarea {
    padding: 14px 16px;
    font-size: 16px;
  }
  
  .duration-display {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .btn-submit {
    padding: 18px 16px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .modal__dialog {
    width: 100vw;
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
    max-height: 100vh;
  }
  
  .modal-header {
    padding: 20px 16px 16px 16px;
  }
  
  .modal__close {
    right: 16px;
    top: 20px;
    font-size: 40px;
    width: 32px;
    height: 32px;
  }
  
  .form {
    padding: 20px 16px;
    gap: 18px;
  }
  
  .form__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .form__label {
    min-width: auto;
    font-size: 15px;
    margin-bottom: 4px;
  }
  
  .modal__title {
    font-size: 22px;
    margin: 0 0 4px 0;
  }
  
  .modal__subtitle {
    font-size: 18px;
    margin-top: 2px;
  }
  
  .time-pills {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .time-pill {
    min-width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .time-arrow {
    display: none;
  }
  
  .email-split-container {
    flex-direction: column;
    gap: 8px;
  }
  
  .email-username,
  .email-domain {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
  }
  
  .email-domain {
    flex: 1;
  }
  
  .form__input,
  .form__textarea {
    padding: 12px 14px;
    font-size: 16px;
  }
  
  .form__textarea {
    height: 100px;
  }
  
  .duration-display {
    padding: 12px 14px;
    font-size: 14px;
    text-align: center;
  }
  
  .btn-submit {
    padding: 16px 14px;
    font-size: 16px;
    margin-top: 8px;
  }
  
  .form__check {
    margin: 16px 0;
    gap: 10px;
  }
  
  .form__check input {
    width: 20px;
    height: 20px;
  }
  
  .form__check span {
    font-size: 14px;
    line-height: 1.4;
  }
}

@media (max-width: 360px) {
  .modal__dialog {
    width: 100vw;
    margin: 0;
  }
  
  .modal-header {
    padding: 16px 12px 12px 12px;
  }
  
  .form {
    padding: 16px 12px;
    gap: 16px;
  }
  
  .form__label {
    font-size: 14px;
  }
  
  .modal__title {
    font-size: 20px;
  }
  
  .modal__subtitle {
    font-size: 16px;
  }
  
  .form__input,
  .form__textarea {
    padding: 10px 12px;
    font-size: 15px;
  }
  
  .time-pill {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .btn-submit {
    padding: 14px 12px;
    font-size: 15px;
  }
}



/* Visual feedback for limit reached */
.selection-limit-reached {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Tooltip for limit reached */
.slot.limit-reached {
  position: relative;
}

.slot.limit-reached::after {
  content: "5-hour limit reached";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.slot.limit-reached:hover::after {
  opacity: 1;
}

/* Limit message popup */
.limit-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 2px solid #dc3545;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 2000;
  animation: slideIn 0.3s ease-out;
}

.limit-message-content {
  text-align: center;
  position: relative;
}

.limit-message-content span {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #dc3545;
  margin-bottom: 10px;
}

.limit-message-content p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.limit-message-content p:last-child {
  margin-bottom: 0;
}

.limit-message-content p strong {
  color: #333;
}

/* Close button for limit message */
.limit-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.limit-close-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ====== Booking Management Modal ====== */

#booking-management-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20000;
  display: none;
}

#booking-management-modal[aria-hidden="false"] {
  display: block;
}

#booking-management-modal .modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 19999;
}

#booking-management-modal .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  z-index: 20000;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

#booking-management-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}

#booking-management-modal .modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

#booking-management-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

#booking-management-modal .modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

#booking-management-modal .modal-body {
  padding: 24px;
}

.booking-info-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-row label {
  font-weight: 600;
  color: #374151;
  min-width: 80px;
  flex-shrink: 0;
}

.info-row span {
  color: #111827;
  word-break: break-word;
}

.booking-actions {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.btn-secondary {
  background: #6b7280;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #4b5563;
}

/* Loading state for secondary buttons */
.btn-secondary.loading {
  background: #9ca3af;
  cursor: wait;
  position: relative;
  opacity: 0.7;
}

.btn-secondary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Processing state - lighter color to show request is being processed */
.btn-primary.processing,
.btn-secondary.processing {
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
  color: #6b7280;
  cursor: wait;
  opacity: 0.8;
  transform: scale(0.98);
}

.btn-primary.processing:hover,
.btn-secondary.processing:hover {
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

/* Disabled state for secondary buttons */
.btn-secondary:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Button state transitions */
.btn-primary,
.btn-secondary {
  transition: all 0.3s ease;
}

/* Success state for secondary buttons */
.btn-secondary.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-secondary.success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Error state for buttons */
.btn-primary.error,
.btn-secondary.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-primary.error:hover,
.btn-secondary.error:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Button text transitions */
.btn-primary .btn-text,
.btn-primary .btn-loading,
.btn-secondary .btn-text,
.btn-secondary .btn-loading {
  display: inline-block;
  transition: opacity 0.2s ease;
}

/* Hide button text when loading */
.btn-primary.loading .btn-text,
.btn-secondary.loading .btn-text {
  opacity: 0;
}

/* Show loading text when loading */
.btn-primary.loading .btn-loading,
.btn-secondary.loading .btn-loading {
  opacity: 1;
}

.otp-section {
  text-align: center;
  margin-bottom: 24px;
}

.otp-section h3 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #3b82f6;
}

.btn-primary {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border: none;
  width: 100%;
  padding: 20px 10px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading state for OTP button */
.btn-primary.loading {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  cursor: wait;
  position: relative;
}

.btn-primary.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Success state for OTP button */
.btn-primary.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary.success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Ripple effect for OTP button */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
  width: 300px;
  height: 300px;
}

/* Focus state for accessibility */
.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5), 0 4px 14px rgba(59, 130, 246, 0.3);
}

/* Pulse animation for attention */
.btn-primary.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.6), 0 0 0 20px rgba(59, 130, 246, 0.1);
  }
  100% {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  }
}

/* Success and error message styles */
.booking-success {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  color: #166534;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10000;
  max-width: 400px;
}

.booking-error {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10000;
  max-width: 400px;
}

/* Additional mobile improvements for better accessibility */
@media (max-width: 480px) {
  /* Ensure modal content is scrollable */
  .modal__dialog {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Full height on mobile */
    overflow-y: auto;
  }
  
  /* Make the form take remaining space */
  .form {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 100px; /* Space for fixed button */
  }
  
  /* Ensure submit button is always visible at bottom */
  .btn-submit {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    margin: 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    width: 100vw;
  }
  
  /* Add visual indicator that content is scrollable */
  .form::before {
    content: '↓ Scroll to see all fields ↓';
    display: block;
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    padding: 8px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
    opacity: 0.7;
  }
  
  /* Hide scroll indicator after first scroll */
  .form.scrolled::before {
    display: none;
  }
  
  /* Improve touch targets */
  .form__input,
  .form__textarea,
  .btn-submit {
    min-height: 44px; /* iOS recommended touch target size */
  }
  
  .checkbox-container {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Better spacing for mobile */
  .form__row {
    margin-bottom: 16px;
  }
  
  /* Ensure time pills are easily tappable */
  .time-pill {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Ensure form fields are properly spaced */
  .form__row + .form__row {
    margin-top: 20px;
  }
  
  /* Make the submit button more prominent */
  .btn-submit {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
  }
  
  .btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  
  /* Ensure proper spacing around form elements */
  .form__input,
  .form__textarea {
    margin-bottom: 8px;
  }
  
  /* Better checkbox styling for mobile */
  .checkbox-container {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
  }
  
  .checkbox-container:hover {
    background: #f1f5f9;
  }
  
  /* Improve time pills visibility on mobile */
  .time-pills {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
  }
  
  /* Better email field layout on mobile */
  .email-split-container {
    background: #f8fafc;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
  }
  
  /* Ensure duration display is visible */
  .duration-display {
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #1d4ed8;
  }
}

/* Very small screen optimizations */