/* ─────────────────────────────────────────────────────
   components.css - UI components: navigation, buttons,
   forms, modals, toasts, and interactive elements
   ───────────────────────────────────────────────────── */


/* ── NAVIGATION BAR ─────────────────────────────────── */

/* Fixed top navigation bar with blur effect and shadow */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(13,11,9,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(201,168,76,.12);
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}

/* Logo styling */
.nav-brand {
    font-family: var(--font-d);
    font-size: 1.6rem;
    letter-spacing: .12em;
    color: var(--text);
    margin-right: auto;
    cursor: pointer;
    font-weight: 300;
}

/* Highlighted part of the logo */
.nav-brand span {
    color: var(--gold);
}

/* Navigation links container */
.nav-links {
    display: flex;
    gap: 2px;
    list-style: none;
}

/* Navigation buttons */
.nav-links button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-b);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-m);
  padding: 8px 13px;
  border-radius: 6px;
  transition: var(--tr);
}

/* Hover and active states */
.nav-links button:hover,
.nav-links button.active {
    color: var(--gold);
    background: var(--rose-pale);
}

/* User avatar/button in nav */
.nav-user {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 12px;
  font-size: .9rem;
  transition: var(--tr);
  flex-shrink: 0;
}

/* Hover effect for user icon */
.nav-user:hover {
    border-color: var(--gold);
    background: var(--rose-pale);
}

/* Mobile menu toggle (hamburger) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

/* Hamburger lines */
.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-m);
    border-radius: 2px;
    transition: var(--tr);
}

/* Responsive navigation (mobile) */
@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(14,13,11,.98);
    backdrop-filter: blur(24px);
    flex-direction: column;
    gap: 0;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  /* Show menu when active */
  .nav-links.open {
    display: flex;
  }

  /* Full-width buttons on mobile */
  .nav-links button {
    width: 100%;
    text-align: left;
    padding: 13px 16px;
    border-radius: var(--r);
  }

  .nav-toggle {
    display: flex;
  }
}


/* ── BUTTONS ───────────────────────────────────────── */

/* Base button styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 40px;
  font-family: var(--font-b);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: var(--tr);
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}


/* Primary button (gold gradient) */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  color: var(--bg);
  box-shadow: 0 10px 28px rgba(201,168,76,.22);
}

/* Hover animation for primary button */
.btn-primary:hover {
  background: linear-gradient(135deg, #f0d792, var(--gold-l));
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(201,168,76,.28);
}

/* Outline button */
.btn-outline {
  background: rgba(255,255,255,.01);
  border: 1.5px solid var(--border);
  color: var(--text);
}

/* Outline hover effect */
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,.07);
  transform: translateY(-2px);
}

/* Gold variant */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  color: var(--bg);
}

/* Gold hover */
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(201,168,76,.24);
}

/* Smaller button variant */
.btn-sm {
    padding: 7px 16px;
    font-size: .68rem;
}

/* Ghost-style button */
.btn-ghost {
    background: var(--rose-pale);
    border: 1.5px solid var(--border);
    color: var(--gold);
}

/* Ghost-style hover button */
.btn-ghost:hover {
    border-color: var(--gold);
}

/* Danger button (used for destructive actions) */
.btn-danger {
    background: rgba(180,60,60,.12);
    border: 1.5px solid rgba(180,60,60,.25);
    color: #e88;
}

/* Danger hover button */
.btn-danger:hover {
    background: rgba(180,60,60,.22);
}


/* ── FORMS ─────────────────────────────────────────── */

/* Form group wrapper */
.form-group {
    margin-bottom: 16px;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-s);
    font-weight: 400;
}

/* Input fields */
.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-b);
  font-size: .92rem;
  transition: var(--tr);
  outline: none;
}

/* Focus state */
.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--glow);
}

/* Textarea: vertical resize only */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Select dropdown styling: pointer cursor */
select.form-control {
    cursor: pointer;
    background: var(--bg2);
}

/* Form row: 2 columns */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* ── TOAST NOTIFICATIONS ───────────────────────────── */

/* Container for stacked toast messages */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Toast box */
.toast {
  padding: 13px 18px;
  border-radius: var(--r);
  font-size: .85rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  pointer-events: all;
  max-width: 340px;
  color: var(--text);
}

/* Success / error states */
.toast.success {
    border-color: rgba(100,200,120,.35);
    color: #7dd894;
}

.toast.error {
    border-color: rgba(200,80,80,.35);
    color: #e88;
}

/* Toast entry animation: slides in from the right with fade-in effect */
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


/* ── MODAL ─────────────────────────────────────────── */

/* Fullscreen overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--tr);
}

/* Open state */
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Modal container */
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r2);
    padding: 36px;
    width: 100%;
    max-width: 500px;
    transform: translateY(16px);
    transition: var(--tr);
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* Reset modal transform when overlay is active (slide-in effect ends) */
.modal-overlay.open .modal {
    transform: none;
}

/* Modal heading styling */
.modal h3 {
    margin-bottom: 22px;
    font-size: 1.5rem;
    font-weight: 300;
}

/* Close button (top-right corner of modal) */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg3);
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-s);
    font-size: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr);
}

/* Hover state for close button */
.modal-close:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--rose-pale);
}


/* ── AUTH TABS ─────────────────────────────────────── */

/* Container for authentication tabs (Login / Register) */
.auth-tabs {
    display: flex;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

/* Individual tab button */
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  color: var(--text-s);
  transition: var(--tr);
}

/* Active tab state (highlighted) */
.auth-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}


/* ── LIGHTBOX ──────────────────────────────────────── */

/* Fullscreen image viewer */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: var(--tr);
}

/* Open state */
.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

/* Lightbox image */
.lightbox img {
    max-width: 88vw;
    max-height: 80vh;
    border-radius: var(--r);
    object-fit: contain;
    box-shadow: var(--shadow-lg);
}

/* Placeholder shown when no image is available */
.lightbox-placeholder {
    width: 300px;
    height: 300px;
    border-radius: var(--r);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
}

/* Close button positioned in the top-right corner of the lightbox */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.2rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--tr);
    box-shadow: var(--shadow);
}

/* Hover state for close button - highlights interactivity */
.lightbox-close:hover {
    border-color: var(--gold);
    color: var(--gold);
}


/* ── BOOKING STATUS BADGES ─────────────────────────── */

/* Base badge styling used to display booking state */
.booking-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .65rem;
    letter-spacing: .08em;
    white-space: nowrap;
    font-weight: 400;
}

/* Upcoming booking (positive / active state) */
.status-upcoming {
    background: rgba(100,200,120,.1);
    border: 1px solid rgba(100,200,120,.2);
    color: #7dd894;
}

/* Completed booking (neutral / success state) */
.status-completed {
    background: var(--gold-pale);
    border: 1px solid var(--border);
    color: var(--gold-l);
}

/* Cancelled booking (error / destructive state) */
.status-cancelled {
    background: rgba(180,60,60,.1);
    border: 1px solid rgba(180,60,60,.2);
    color: #e88;
}


/* ── STAR RATING ───────────────────────────────────── */

/* Interactive star rating component */
.star-rating {
    display: flex;
    gap: 4px;
}

/* Individual star */
.star-rating span {
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--surface2);
    transition: color .15s;
}

/* Active (selected) star */
.star-rating span.active {
    color: var(--gold);
}


/* ── TOGGLE SWITCH ─────────────────────────────────── */

/* Custom toggle switch container */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}

/* Hidden checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider background */
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 22px;
    cursor: pointer;
    transition: var(--tr);
}

/* Toggle knob */
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-s);
    top: 3px; left: 3px;
    transition: var(--tr);
}

/* Checked state */
.toggle-switch input:checked + .toggle-slider {
    background: var(--gold-pale);
    border-color: var(--gold);
}

/* Move knob when active */
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--gold);
}