/* Brand */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

/* Navbar container */
.navbar {
  background-color: #fff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); 
  z-index: 1000;
}

/* Nav links */
.navbar .nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s;
  color: #000;
}

.iconlinksdiv{
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    text-decoration: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.iconlinksdiv i{
    font-size: 1.2em;
    color: black;
}

/* Profile image */
.navbar .dropdown-toggle img {
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #ddd;
}

/* Dropdown menu items */
.navbar .dropdown-menu {
  border-radius: 10px;
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 260px;
  max-width: 300px;
  width: max-content;
}

.navbar .dropdown-menu .dropdown-item {
  border-radius: 6px;
  padding: 10px 12px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.navbar .dropdown-menu .dropdown-item:hover {
  background-color: #f5f5f5;
  color: #040B16;
  font-weight: 500;
}

/* make logout always red on hover */
.navbar .dropdown-menu .dropdown-item.text-danger:hover {
  background-color: #ffecec;
  color: #dc3545;
  font-weight: 600;
}

.navbar .dropdown-menu .dropdown-divider {
  margin: 0.5rem 0;
}

.droptoggle {
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 8px;
  padding: 5px 10px;
  gap: 10px;
  font-size: 0.8em;
  cursor: pointer;
}

.droptogglediv {
  display: flex;
  flex-direction: column;
  padding-right: 5px;
}

.dropicon {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #666;
}

/* Hover effect for user toggle */
.droptoggle:hover {
  background-color: #f9fbff;  /* subtle light blue */
  border-color: #cce5ff;      /* blue border highlight */
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transition: all 0.25s ease;
}

.droptoggle:hover img {
  transform: scale(1.05);
  transition: transform 0.25s ease;
}

.droptoggle:hover .droptogglediv span {
  color: #37B34A; /* make "Hi, Welcome" green */
}

.droptoggle:hover .droptogglediv strong {
  color: #000; /* emphasize user name */
}

@media (max-width: 1400px){
  .droptogglediv{
    display: none;
  }
  .dropdown{
    margin-left: 20px;
  }
}
.dropdown{
    max-height: 50px;
}

/* Mobile dropdown fix */
@media (max-width: 991.98px) {
  .navbar .dropdown {
    position: relative !important;
  }
  .navbar .dropdown-menu {
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    margin-top: 0.5rem;
  }
}


/* Hover Links */
/* Show dropdown on hover */
.navbar .nav-item.dropdown:hover .dropdown-menu {
  display: block;
  margin-top: 0; /* remove gap */
}

/* Keep parent link clickable */
.navbar .dropdown-toggle::after {
  display: none; /* remove the Bootstrap caret arrow */
}

/* HEADER WITH BACKGROUND IMAGE */
.staycation-header {
  background: url('/uploads/img/header.png') center / cover no-repeat;
  padding: 32px 0 10px;
  position: fixed;  /* Fixed position */
  top: 0;
  left: 0;
  width: 100%;   /* Full width */
  z-index: 4000; /* Make sure header stays above other content */
  transition: padding 260ms ease, background-position 260ms ease;
}

/* WHITE CARD OVER HEADER IMAGE */
.header-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 16px;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  position: relative;
  overflow: visible;
}

/* BRAND TEXT */
.header-text h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.header-text p {
  color: #6c757d;
  margin-bottom: 0;
}

/* Staycation Search Bar */
.staycation-search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    border: 1px solid #eaeaea;
    gap: 8px;
    width: 100%;
    max-width: 800px; /* expand it nicely */
    margin: 0 auto; /* center horizontally */
}

/* Each section */
.search-item {
    position: relative;
    padding: 0 12px;
    flex: 1; /* expand each input evenly */
    display: flex;
    flex-direction: column;
}

.search-item small {
    font-size: 12px;
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
}

.search-item input {
    font-size: 14px;
    color: #717171;
    background: transparent;
    outline: none;
    width: 100%;
}

/* Vertical divider */
.divider {
    width: 1px;
    height: 32px;
    background: #ddd;
}

/* Search Button */
.search-btn {
    background: #ff385c;
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
}

.search-btn i {
    font-size: 16px;
}

/* Hover effect */
.staycation-search:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    transition: box-shadow 0.25s ease;
}

/* CATEGORY NAV */
.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding-bottom: 6px;
}

.header-nav a.active {
  color: #000;

}

/* USER TOGGLE */
.droptoggle {
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.droptoggle:hover {
  background: #f8f9fa;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}



/* MOBILE */
@media (max-width: 991px) {
  .staycation-search {
    grid-template-columns: 1fr;
  }

  .header-nav {
    justify-content: space-between;
  }

  .droptogglediv {
    display: none;
  }
}

/* Mobile search trigger (pill) */
.mobile-search-trigger {
  display: none; /* shown by media query when needed */
  align-items: center;
  gap: 8px;
  /* pull the pill up slightly so it visually overlaps the card */
  margin: -28px auto 12px;
  width: calc(100% - 48px); /* respect container padding */
  max-width: 760px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.14);
  border: 1px solid #eee;
  color: #222;
  font-weight: 600;
  justify-content: center;
  z-index: 1200; /* above header card but below overlay */
}

/* Fullscreen overlay */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

/* header / close */
.mobile-search-header{
  display:flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid #eee;
  background: transparent;
}
.mobile-search-header h2 {
  margin: 0;
  font-size: 1.2rem;
}
.mobile-search-close {
  background: #f1f1f1;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* form layout */
.mobile-search-form {
  padding: 18px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

/* Where field */
.mobile-input-wrap {
  position: relative;
}
.mobile-input-icon{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#9aa0a6;
  font-size:18px;
}
.mobile-input-wrap input {
  width:100%;
  padding:12px 14px 12px 40px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  font-size: 15px;
  color: #333;
}

/* suggestions list */
.mobile-suggestions {
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.suggest-item{
  background:#f7f7f9;
  border-radius:12px;
  padding:12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.suggest-title{ font-weight:700; }
.suggest-sub{ font-size:13px; color:#6b6b6b; margin-top:6px; }

/* When / Who stacked */
.mobile-field.row-two {
  display:flex;
  gap:12px;
}
.mobile-subfield{
  flex: 1;
  display:flex;
  flex-direction:column;
}
.mobile-subfield input{
  padding:12px;
  border-radius:10px;
  border:1px solid #eee;
}
.mobile-subfield select{
  padding:12px;
  border-radius:10px;
  border:1px solid #eee;
}

/* footer buttons */
.mobile-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:8px;
  padding: 0 2px 18px;
}
.mobile-footer .btn-link{ color:#111; text-decoration: none; padding-left:0; }

/* make overlay contents breathe */
@media (min-width: 360px) {
  .mobile-search-form { padding: 22px; }
}

.search-float {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 760px;
  max-width: 95%;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 25px 70px rgba(0,0,0,.2);
  z-index: 8000;
  display: none;
  overflow: hidden;
}

.search-float.active {
  display: block;
}

.search-inner {
  display: flex;
  width: 200%;
  transition: transform .35s ease;
}

.panel {
  width: 50%;
  padding: 20px;
}

.search-float.show-date .search-inner {
  transform: translateX(0);
}

.search-float.show-guest .search-inner {
  transform: translateX(-50%);
}

/* ================= FLATPICKR – AIRBNB STYLE ================= */
/* Calendar shell */
.flatpickr-calendar {
  background: #fff !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18) !important;
  border: none;
  padding: 26px 28px 28px;
  max-width: 920px;
  width: auto !important;
  z-index: 6000 !important;
}

/* Months row */
.flatpickr-months {
  display: flex;
  justify-content: space-between;
  gap: 80px;
  padding-bottom: 12px;
}

/* Month header */
.flatpickr-month {
  background: transparent;
  display: flex;
  justify-content: center;
}

.flatpickr-current-month {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  text-align: center;
}

/* Arrows */
.flatpickr-prev-month,
.flatpickr-next-month {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  background: #f2f2f2;
}

/* Weekdays */
.flatpickr-weekdays {
  margin-top: 6px;
  margin-bottom: 10px;
}

.flatpickr-weekday {
  font-size: 12px;
  font-weight: 600;
  color: #777;
  width: 40px;
  text-align: center;
}

/* Days grid */
.flatpickr-days {
  display: grid;
  grid-template-columns: repeat(7, 40px);
  justify-content: center;
  gap: 6px;
}

/* Day */
.flatpickr-day {
  width: 40px !important;
  height: 40px !important;
  line-height: 40px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 500;
  color: #111;
}

/* Disabled / outside days */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.disabled {
  color: #d4d4d4 !important;
  opacity: 1;
}

/* Hover */
.flatpickr-day:not(.disabled):hover {
  background: #f3f3f3;
}

/* Selected start / end */
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #000 !important;
  color: #fff !important;
  font-weight: 700;
}

/* In-range */
.flatpickr-day.inRange {
  background: #f1f1f1 !important;
  border-radius: 10px;
  font-weight: 600;
}

/* Mobile bottom-sheet */
@media (max-width: 576px) {
    
   /* Reduce header padding */
  .staycation-header {
    padding: 16px 0 10px;
  }

  /* Header card spacing */
  .header-card {
    padding: 20px 16px 12px;
    border-radius: 16px;
  }

  /* Center & scale text */
  .header-text h1 {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .header-text p {
    font-size: 0.9rem;
  }

  /* Hide desktop search completely */
  .staycation-search {
    display: none !important;
  }

  /* Show mobile search button */
  #mobileSearchTrigger {
    display: flex !important;
    margin: 12px auto 8px;
    width: 100%;
    max-width: 100%;
  }

  .tab {
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    text-align: center;
  }

  .tab img {
    width: 36px;
    height: 36px;
  }

  /* Navbar top row tighter */
  .navbar .container > .d-flex {
    margin-bottom: 12px !important;
  }

  /* Avatar size */
  .droptoggle img {
    width: 32px !important;
    height: 32px !important;
  }

  .flatpickr-calendar {
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 16px;
    top: auto;
    transform: none !important;
    border-radius: 18px !important;
    padding-bottom: 28px;
  }

  .flatpickr-months {
    gap: 16px;
  }

  .flatpickr-days {
    grid-template-columns: repeat(7, 44px);
  }

  .flatpickr-day {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px;
  }
  
    /* Ensure calendar becomes a fixed bottom-sheet and does not grow beyond viewport */
  .flatpickr-calendar {
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    top: auto !important;
    transform: none !important;
    border-radius: 18px !important;
    padding: 16px !important;
    max-width: calc(100% - 32px) !important;
    max-height: calc(100vh - 96px) !important; /* leaves space for header/close button */
    overflow: auto !important; /* allow scrolling if content taller than viewport */
  }

  /* Reduce month gap on mobile */
  .flatpickr-months {
    gap: 12px;
  }

  /* slightly larger day buttons on tiny phones */
  .flatpickr-days {
    grid-template-columns: repeat(7, 44px);
  }

  /* remove the default pointer/arrow so bottom sheet looks clean */
  .flatpickr-calendar::after,
  .flatpickr-calendar::before {
    display: none !important;
  }

  /* ensure inner padding isn't excessive */
  .flatpickr-innerContainer {
    padding-bottom: 8px;
  }
}

/* Guest picker (desktop + mobile) */

/* Base container */
.guest-picker {
  position: absolute;
  z-index: 7000;
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
  padding: 12px;
}

.guest-picker .gp-inner {
  border-radius: 12px;
  overflow-x: hidden;
  overflow-y: hidden;
}

/* Row */
.gp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 12px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.gp-title {
  font-weight:700;
  font-size: 15px;
  color: #111;
}
.gp-sub {
  display:block;
  font-size: 13px;
  color: #6b6b6b;
  margin-top: 6px;
  font-weight:400;
}

/* Left side text block */


/* Controls */
.gp-controls {
  display:flex;
  align-items:center;
  gap:12px;
}

/* circular buttons */
.gp-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:50%;
  border:1px solid #e6e6e6;
  background: #fff;
  cursor:pointer;
  color:#333;
  font-size:18px;
  user-select:none;
}
.gp-btn:active { transform: scale(0.98); }
.gp-count {
  min-width: 30px;
  text-align:center;
  font-weight:600;
  color:#111;
}


/* Footer */
.gp-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 12px 6px 6px 6px;
}
.gp-footer .btn-clear {
  background: transparent;
  border: none;
  color: #111;
  text-decoration: underline;
  padding:6px 10px;
  cursor:pointer;
}
.gp-footer .btn-done {
  background:#111;
  color:#fff;
  border:none;
  padding:8px 14px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}

/* CATEGORY PICKER */

.category-picker {
  position: absolute;
  z-index: 7000;
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
  padding: 12px;
}

.category-picker .cp-inner {
  border-radius: 12px;
  overflow-x: hidden;
  overflow-y: hidden;
}

.cp-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 12px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.cp-option:hover {
  background: #f5f5f5;
}

.cp-option strong {
  display: block;
  font-size: 15px;
}

.cp-option span {
  font-size: 13px;
  color: #6b6b6b;
}

.cp-option i {
  font-size: 20px;
  color: #999;
}

.cp-option.active {
  background: #f1f1f1;
}

.cp-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
}

.cp-footer .btn-clear {
  background: none;
  border: none;
  text-decoration: underline;
  font-weight: 500;
}

.cp-footer .btn-done {
  background: #111;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
}

@media (max-width:768px) {
  .hide-in-mobile{
      display: none;
  }
}

/* Mobile = bottom sheet */
@media (max-width:768px) {
  .hide-in-mobile{
      display: none;
  }    
    
  .guest-picker {
    position: fixed;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: auto;
  }
    
  .category-picker {
    position: fixed;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: auto;
  }
}

/* Accessibility focus */
.gp-btn:focus { outline: 2px solid rgba(0,0,0,0.08); outline-offset: 2px; }

/* small link styling inside row (for pets/service animal) */
.gp-link {
  display:block;
  font-size:13px;
  color:#2b6cb0;
  text-decoration:underline;
  margin-top:6px;
}

/*===== SafeGuard =====*/
/* Always above sticky header */
.flatpickr-calendar {
  z-index: 6000 !important;
}

.guest-picker,
.category-picker {
  z-index: 7000;
}

.mobile-search-overlay {
  z-index: 8000;
}

/* ================= Header shrink / hide header-text on scroll =================
   Append this to the end of your existing header.css
   - Smooth transitions
   - Collapses header-text with max-height + opacity for smoothness
   - Mobile is untouched because the script only sets the class above 576px
============================================================================== */

#header-spacer {
  height: 0; /* will be set dynamically by JS to avoid layout jumps */
  transition: height 200ms ease;
}

/* allow smooth changes for the header + card */
.staycation-header {
  transition: padding 260ms ease, background-position 260ms ease;
  will-change: padding;
}

/* animate header-card to a smaller pill-like look when scrolled */
.staycation-header .header-card {
  transition: padding 260ms ease, border-radius 260ms ease, box-shadow 260ms ease, transform 260ms ease;
  will-change: padding, border-radius, box-shadow, transform;
}

/* header-text hide animation: we'll collapse height and fade out */
.header-text {
  transition: opacity 220ms ease, transform 220ms ease, max-height 220ms ease, margin 220ms ease;
  max-height: 120px; 
  opacity: 1;
  transform: translateY(0);
}

/* Shrink the header when scrolled */
.staycation-header.scrolled {
  padding: 8px 0 8px; /* Shrink padding */
}

.staycation-header.scrolled .header-card {
  padding: 0;
  box-shadow: none;  /* Lighter shadow */
  background: none;
}

/* hide header text with a smooth collapse */
.staycation-header.scrolled .header-text {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  margin-bottom: 0;
  pointer-events: none;
}

/* Optional small tweaks to search bar when scrolled (keeps layout stable) */
.staycation-header.scrolled .staycation-search {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* --- Safety: do NOT apply shrink on tiny screens (mobile) --- */
/* Keep mobile exactly as before; JS won't add the class on small viewports,
   but in case some other code adds it, we guard here */
/* Optional adjustments for mobile */
@media (max-width: 576px) {
  .staycation-header.scrolled {
    padding: 16px 0 24px;
  }

  .staycation-header.scrolled .header-card {
    padding: 20px 16px 12px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  }

  .staycation-header.scrolled .header-text {
    opacity: 1 !important;
    max-height: 120px !important;
    transform: translateY(0) !important;
  }
}

:root {
  /* how much of the header-card is allowed to overlap the page content (px) */
  --header-overlap: 24px;
}

/* ensure the spacer transitions smoothly and is present */
#header-spacer {
  height: 0;
  transition: height 220ms ease;
  will-change: height;
}

/* make sure mobile doesn't get overlap (keeps earlier mobile look) */
@media (max-width: 576px) {
  :root {
    --header-overlap: 0px;
  }
}

/* (Optional safety) slightly reduce default bottom padding if you want less vertical space
   but leave commented so you can enable if desired */
/*
.staycation-header {
  padding-bottom: 18px;
}
*/