@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

:root {
  --color-primary: #69798B;
  --color-primary-dark: #526374;
  --color-primary-light: #9AADB8;
  --color-primary-lighter: #C5D3DB;
  --color-cream: #F2F5F7;
  --color-cream-dark: #DFE6EB;
  --color-warm-white: #FAFBFC;
  --color-warm-bg: #E3EBF0;
  --color-text: #1F2B3D;
  --color-text-light: #5B6872;
  --color-text-muted: #8590A0;
  --color-white: #FFFFFF;
  --color-success: #7A9E7E;
  
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(31, 43, 61, 0.06);
  --shadow-md: 0 4px 20px rgba(31, 43, 61, 0.08);
  --shadow-lg: 0 8px 40px rgba(31, 43, 61, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-warm-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; margin-bottom: 0.5em;}
a { text-decoration: none; color: inherit; transition: 0.3s; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

/* Navbar Modern Floating */
nav.floating-nav {
  position: relative; /* Remove sticky to avoid flexbox height issues, make it standard flow with margin */
  margin: 8px auto 6px auto;
  max-width: 900px;
  width: 95%;
  padding: 8px 12px 8px 24px;
  background: rgba(105, 121, 139, 0.95); /* var(--color-primary) base but slightly transparent for blur */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  box-shadow: 0 10px 40px rgba(31, 43, 61, 0.15), inset 0 0 0 1px rgba(255,255,255,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

nav.floating-nav:hover {
  box-shadow: 0 16px 50px rgba(31, 43, 61, 0.25), inset 0 0 0 1px rgba(255,255,255,0.3);
  transform: translateY(-2px);
  background: var(--color-primary); /* #69798B solid on hover */
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: brightness(0) invert(1); /* Turned logo white so it stands out perfectly against the dark blue navbar */
}
.nav-logo:hover img {
  transform: scale(1.06) rotate(-2deg);
}

/* Bubble Menu Wrapper */
.bubble-menu {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.bubble-menu .nav-link {
  position: relative;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85); /* Changed button text text to whiteish */
  letter-spacing: 0.5px;
  padding: 10px 22px;
  border-radius: 100px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  font-family: var(--font-body);
  z-index: 1;
}

/* Bubble overlay effect on hover */
.bubble-menu .nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  transform: scale(0.85) translateY(4px);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: -1;
}

.bubble-menu .nav-link:hover {
  color: #fff;
}

.bubble-menu .nav-link:hover::before {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Active Link Bubble */
.bubble-menu .nav-link.active {
  color: var(--color-primary-dark);
  background: var(--color-white);
  box-shadow: 0 4px 14px rgba(31, 43, 61, 0.15);
}
.bubble-menu .nav-link.active::before { display: none; }

/* Vibrant CTA in Navbar */
.nav-highlight-btn {
  background: var(--color-white) !important;
  color: var(--color-primary-dark) !important;
  box-shadow: 0 6px 20px rgba(31, 43, 61, 0.15) !important;
  margin-left: 4px;
}
.nav-highlight-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(31, 43, 61, 0.2) !important;
}
.nav-highlight-btn::before { display: none !important; }

@media (max-width: 900px) {
  nav.floating-nav { width: 95%; padding: 6px 12px; margin: 12px auto; }
  .nav-logo img { height: 50px; }
  .bubble-menu { padding: 4px; gap: 4px; }
  .bubble-menu .nav-link { padding: 8px 16px; font-size: 0.8rem; }
}

@media (max-width: 768px) {
  .bubble-menu .hide-mobile { display: none; }
}

/* Glass Box */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn-primary {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  background: var(--color-primary); color: var(--color-white);
  padding: 16px 28px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 1.15rem; transition: 0.3s;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-primary:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
}
.btn-danger {
  background: #f44336; color: white; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.8rem;
}

/* Forms */
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.input-group input, .input-group select {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-cream-dark);
  background: var(--color-white); font-family: inherit; font-size: 1.15rem;
}
.input-group input:focus, .input-group select:focus {
  outline: none; border-color: var(--color-primary);
}

/* Grid System */
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
@media(max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* Calendar */
.calendar-container { background: #fff; padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--color-cream-dark); }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: 600; color: var(--color-primary); margin-bottom: 10px; font-size: 1.2rem; }
.calendar-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cell { padding: 10px 5px; text-align: center; cursor: pointer; border-radius: var(--radius-sm); transition: 0.2s; border: 1px solid transparent; font-size: 1.3rem; }
.cell:hover:not(.disabled) { background: var(--color-cream); border-color: var(--color-primary-lighter); }
.cell.disabled { color: #ccc; cursor: not-allowed; }
.cell.selected { background: var(--color-primary); color: #fff; }

/* Time Slots */
.slots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot-btn {
  padding: 14px 12px; border-radius: var(--radius-sm); border: 1px solid var(--color-cream-dark);
  background: #fff; font-weight: 600; transition: 0.2s; font-size: 1.25rem;
}
.slot-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.slot-btn.selected { background: var(--color-primary-lighter); border-color: var(--color-primary); }

/* Table */
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 16px; border-bottom: 2px solid var(--color-cream-dark); color: var(--color-text-muted); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.data-table td { padding: 16px; border-bottom: 1px solid var(--color-warm-bg); font-size: 1.1rem; }

/* Config Rows */
.config-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-cream-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.config-row.active {
    border-color: var(--color-primary-lighter);
    box-shadow: var(--shadow-sm);
}
.config-day {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    min-width: 90px;
}
.config-times {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.time-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
}
.time-chip-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0 0 2px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.time-chip-remove:hover { color: white; }
.time-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px dashed var(--color-primary-lighter);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.time-add-btn:hover { border-color: var(--color-primary); background: var(--color-cream); }
.config-inactive-msg {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}
.time-input-inline {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    color: var(--color-text);
    width: 120px;
}
.config-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 72px;
    justify-content: flex-end;
}
.toggle-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    min-width: 24px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.25s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Helpers */
.hidden { display: none !important; }
.step-indicator {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: var(--color-primary);
}
.step-num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem;
}
.alert { padding: 12px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.9rem; }
.alert.error { background: #ffebee; color: #c62828; }
.alert.success { background: #e8f5e9; color: #2e7d32; }

/* Popup Notification */
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 43, 61, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: overlayIn 0.25s ease forwards;
}
#popup-overlay.hide {
  animation: overlayOut 0.3s ease forwards;
}
#popup-box {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 48px 56px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  transform: translateY(20px);
  opacity: 0;
  animation: popupIn 0.3s ease 0.05s forwards;
}
#popup-overlay.hide #popup-box {
  animation: popupOut 0.25s ease forwards;
}
.popup-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.popup-icon.success { background: #e8f5e9; color: var(--color-success); }
.popup-icon.error   { background: #ffebee; color: #c62828; }
.popup-icon svg { width: 32px; height: 32px; }
.popup-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}
.popup-message {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
}
.popup-close {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.2s;
}
.popup-close:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}
.popup-close.error { background: #c62828; }
.popup-close.error:hover { background: #b71c1c; }

@keyframes overlayIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes popupIn  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popupOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(12px); } }

/* Time Picker Modal */
#time-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 43, 61, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

#time-picker-box {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 36px 32px;
  text-align: center;
  width: 270px;
}

#tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

#tp-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
}

#tp-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}
#tp-close:hover { color: var(--color-text); }

#tp-display {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: 4px;
  margin-bottom: 20px;
}

#tp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.tp-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tp-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-cream);
  border: none;
  color: var(--color-primary);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.tp-arrow:hover { background: var(--color-cream-dark); transform: scale(1.1); }
.tp-arrow:active { transform: scale(0.95); }

.tp-value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--color-text);
  width: 54px;
  text-align: center;
}

.tp-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.tp-sep {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--color-text-muted);
  padding: 0 2px;
  margin-bottom: 26px;
}

#tp-shortcuts-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

#tp-shortcuts {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.tp-shortcut {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-cream-dark);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tp-shortcut:hover { border-color: var(--color-primary); color: var(--color-primary); }
.tp-shortcut.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

#tp-confirm {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
#tp-confirm:hover { background: var(--color-primary-dark); transform: translateY(-1px); }

