
/* =====================================================================
   FLOAT GRID — structural only, do not edit
===================================================================== */
[class*="cal-cell"] {
  float: none;
  margin-left: 0;
  min-height: 1px;
}
.cal-row-fluid {
  width: 100%;
  *zoom: 1;
}
.cal-row-fluid:before,
.cal-row-fluid:after {
  display: table;
  content: "";
  line-height: 0;
}
.cal-row-fluid:after {
  clear: both;
}
.cal-row-fluid [class*="cal-cell"] {
  display: block;
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  float: left;
  margin-left: 0%;
  *margin-left: -0.05213764337851929%;
}
.cal-row-fluid .controls-row [class*="cal-cell"] + [class*="cal-cell"] {
  margin-left: 0%;
}
.cal-row-fluid .cal-cell7  { width: 100%; }
.cal-row-fluid .cal-cell6  { width: 85.71428571428571%; }
.cal-row-fluid .cal-cell5  { width: 71.42857142857142%; }
.cal-row-fluid .cal-cell4  { width: 57.14285714285714%; }
.cal-row-fluid .cal-cell3  { width: 42.857142857142854%; }
.cal-row-fluid .cal-cell2  { width: 28.57142857142857%; }
.cal-row-fluid .cal-cell1  { width: 14.285714285714285%; }

.cal-week-box .cal-offset7,
.cal-row-fluid .cal-offset7,
.cal-row-fluid .cal-offset7:first-child { margin-left: 100%; }
.cal-week-box .cal-offset6,
.cal-row-fluid .cal-offset6,
.cal-row-fluid .cal-offset6:first-child { margin-left: 85.71428571428571%; }
.cal-week-box .cal-offset5,
.cal-row-fluid .cal-offset5,
.cal-row-fluid .cal-offset5:first-child { margin-left: 71.42857142857142%; }
.cal-week-box .cal-offset4,
.cal-row-fluid .cal-offset4,
.cal-row-fluid .cal-offset4:first-child { margin-left: 57.14285714285714%; }
.cal-week-box .cal-offset3,
.cal-row-fluid .cal-offset3,
.cal-row-fluid .cal-offset3:first-child { margin-left: 42.857142857142854%; }
.cal-week-box .cal-offset2,
.cal-row-fluid .cal-offset2,
.cal-row-fluid .cal-offset2:first-child { margin-left: 28.57142857142857%; }
.cal-week-box .cal-offset1,
.cal-row-fluid .cal-offset1,
.cal-row-fluid .cal-offset1:first-child { margin-left: 14.285714285714285%; }

[class*="cal-cell"].hide,
.cal-row-fluid [class*="cal-cell"].hide { display: none; }
[class*="cal-cell"].pull-right,
.cal-row-fluid [class*="cal-cell"].pull-right { float: right; }


/* =====================================================================
   CALENDAR CONTAINER
===================================================================== */
#calendar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  background: #ffffff;
  margin-top: 12px;
  font-family: inherit;
}


/* =====================================================================
   MONTH TITLE ROW
===================================================================== */
.cal-month-header {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 4px;
}

.cal-month-header .month-title {
  flex: 1;
  text-align: center;
  padding: 0;
  background: none;
  border: none;
}

.month-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #1e293b;
}

.cal-header-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1;
  flex-shrink: 0;
}
.cal-header-nav:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}
.cal-nav-prev,
.cal-nav-next {
  width: 32px;
  height: 32px;
  font-size: 1.4rem;
  font-weight: 300;
}
.cal-nav-today {
  height: 32px;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}


/* =====================================================================
   DAY-OF-WEEK HEADER ROW  (S M T W T F S)
===================================================================== */
.cal-month-box .cal-row-fluid.cal-before-eventlist:first-child {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.cal-month-box .cal-row-fluid.cal-before-eventlist:first-child .cal-month-day {
  height: 32px;
  cursor: default;
  border: none;
  border-radius: 0;
  background: transparent;
}
span[data-cal-week] {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}


/* =====================================================================
   WEEK ROWS
===================================================================== */
.cal-month-box .cal-row-fluid.cal-before-eventlist:not(:first-child) {
  border-bottom: 1px solid #f1f5f9;
}
.cal-month-box .cal-row-fluid.cal-before-eventlist:last-child {
  border-bottom: none;
}


/* =====================================================================
   INDIVIDUAL DAY CELLS
===================================================================== */
.cal-month-box .cal-cell1 {
  padding: 3px;
  box-sizing: border-box;
}

.cal-month-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cal-month-day:hover:not(.cal-day-booked):not(.cal-day-in-past):not(.cal-day-outmonth) {
  background-color: #f0f9ff;
  border-color: #7dd3fc;
  box-shadow: 0 1px 3px 0 rgba(59,130,246,0.12);
}


/* =====================================================================
   DATE NUMBER
===================================================================== */
span[data-cal-date] {
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  position: relative;
  z-index: 1;
  user-select: none;
}


/* =====================================================================
   TODAY
===================================================================== */
.cal-day-today {
  background-color: #ffffff;
  border-color: #334155;
  border-width: 2px;
  box-shadow: none;
}

.cal-day-today span[data-cal-date] {
  color: #0f172a;
  font-weight: 800;
  font-size: 0.88rem;
}


/* =====================================================================
   OUT-OF-MONTH DAYS
===================================================================== */
.cal-day-outmonth {
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}
.cal-day-outmonth span[data-cal-date] {
  opacity: 0;
  cursor: default;
}


/* =====================================================================
   PAST DAYS
===================================================================== */
.cal-day-in-past {
  background-color: #fafafa;
  border-color: #f1f5f9;
  cursor: default;
}
.cal-day-in-past span[data-cal-date] {
  opacity: 0.35;
  cursor: default;
  text-decoration: line-through;
  font-weight: 400;
}


/* =====================================================================
   BOOKED / UNAVAILABLE DAYS — same appearance as past days
===================================================================== */
.cal-day-booked {
  background-color: #fafafa;
  border-color: #f1f5f9;
  cursor: not-allowed;
}
.cal-day-booked span[data-cal-date] {
  opacity: 0.35;
  text-decoration: line-through;
  font-weight: 400;
  cursor: not-allowed;
}


/* =====================================================================
   HOVER PREVIEW (before click)
===================================================================== */
.cal-day-preview {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  transition: none;
}

.cal-day-preview-start {
  background-color: #334155;
  border-color: #1e293b;
  transition: none;
}
.cal-day-preview-start span[data-cal-date] {
  color: #ffffff;
  font-weight: 700;
  background: transparent;
}

.cal-day-preview-end {
  background-color: #64748b;
  border-color: #475569;
  transition: none;
}
.cal-day-preview-end span[data-cal-date] {
  color: #ffffff;
  font-weight: 700;
  background: transparent;
}


/* =====================================================================
   LOCKED SELECTION (after click)
===================================================================== */
.cal-day-locked {
  background-color: #1e293b;
  border-color: #0f172a;
  transition: none;
}
.cal-day-locked span[data-cal-date] {
  color: #ffffff;
  font-weight: 700;
  background: transparent;
}

.cal-day-locked-middle {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  transition: none;
}
.cal-day-locked-middle span[data-cal-date] {
  color: #334155;
  font-weight: 600;
  background: transparent;
}


/* =====================================================================
   EXTEND PREVIEW  (cells that would be added on the next click)
===================================================================== */
.cal-day-extend {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  border-style: dashed;
  transition: none;
}
.cal-day-extend-start {
  background-color: #475569;
  border-color: #1e293b;
  border-style: solid;
  transition: none;
}
.cal-day-extend-start span[data-cal-date] {
  color: #ffffff;
  font-weight: 700;
  background: transparent;
}
.cal-day-extend-end {
  background-color: #64748b;
  border-color: #475569;
  border-style: solid;
  transition: none;
}
.cal-day-extend-end span[data-cal-date] {
  color: #ffffff;
  font-weight: 700;
  background: transparent;
}


/* =====================================================================
   TRIM PREVIEW  (cells of the committed range that would be removed on click)
===================================================================== */
.cal-day-trim {
  background-color: #fafafa;
  border-color: #e2e8f0;
  border-style: dashed;
  transition: none;
}
.cal-day-trim span[data-cal-date] {
  color: #94a3b8;
  font-weight: 500;
  text-decoration: line-through;
  background: transparent;
}


/* =====================================================================
   EVENTS / DOTS (for week/day view compatibility)
===================================================================== */
.cal-events-num {
  margin-top: 0px;
}
.events-list {
  position: absolute;
  bottom: 0;
  left: 0;
  overflow: hidden;
  max-height: 47px;
  padding-left: 5px;
}
.event {
  display: block;
  background-color: #c3c3c3;
  width: 10px;
  height: 10px;
  margin-right: 2px;
  margin-bottom: 2px;
  box-shadow: inset 0px 0px 4px 0px rgba(0,0,0,0.3);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
}
.event-block {
  display: block;
  background-color: #c3c3c3;
  width: 20px;
  height: 100%;
}
.cal-event-list .event.pull-left {
  margin-top: 3px;
}
.event-important  { background-color: #ef4444; }
.event-info       { background-color: #3b82f6; }
.event-warning    { background-color: #f59e0b; }
.event-inverse    { background-color: #1e293b; }
.event-success    { background-color: #16a34a; }
.event-special    { background-color: #8b5cf6; }

.day-highlight:hover,
.day-highlight { background-color: #f1f5f9; }
.day-highlight.dh-event-important:hover,
.day-highlight.dh-event-important { background-color: #fef2f2; }
.day-highlight.dh-event-warning:hover,
.day-highlight.dh-event-warning  { background-color: #fefce8; }
.day-highlight.dh-event-info:hover,
.day-highlight.dh-event-info     { background-color: #eff6ff; }
.day-highlight.dh-event-inverse:hover,
.day-highlight.dh-event-inverse  { background-color: #e2e8f0; }
.day-highlight.dh-event-success:hover,
.day-highlight.dh-event-success  { background-color: #f0fdf4; }
.day-highlight.dh-event-special:hover,
.day-highlight.dh-event-special  { background-color: #f5f3ff; }


/* =====================================================================
   YEAR / MISC VIEWS
===================================================================== */
.cal-row-head [class*="cal-cell"]:first-child,
.cal-row-head [class*="cal-cell"] {
  min-height: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  text-align: center;
  padding: 8px 0;
  font-size: 0.78rem;
  color: #64748b;
}
.cal-row-head [class*="cal-cell"] small {
  font-weight: 400;
}
.cal-year-box [class*="span"],
.cal-month-box [class*="cal-cell"] {
  min-height: 30px;
  position: relative;
}
.cal-year-box [class*="span"] {
  min-height: 60px;
}
.cal-year-box .row-fluid,
.cal-month-box .cal-row-fluid {
  margin-left: 0px;
  margin-right: 0px;
}


/* =====================================================================
   WEEK-BOX POSITIONING (week view)
===================================================================== */
#cal-week-box {
  position: absolute;
  width: 70px;
  left: -71px;
  top: -1px;
  padding: 8px 5px;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background-color: #f8fafc;
  text-align: right;
}
#cal-day-tick {
  position: absolute;
  right: 50%;
  bottom: -21px;
  padding: 0px 5px;
  cursor: pointer;
  z-index: 5;
  text-align: center;
  width: 26px;
  margin-right: -17px;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 6px 6px;
  background-color: #f1f5f9;
}
.cal-year-box #cal-day-tick {
  margin-right: -7px;
}
#cal-slide-box {
  position: relative;
}
#cal-slide-tick {
  position: absolute;
  width: 16px;
  margin-left: -7px;
  height: 9px;
  top: -1px;
  z-index: 1;
}
#cal-slide-tick.tick-month1 { left: 12.5%; }
#cal-slide-tick.tick-month2 { left: 37.5%; }
#cal-slide-tick.tick-month3 { left: 62.5%; }
#cal-slide-tick.tick-month4 { left: 87.5%; }
#cal-slide-tick.tick-day1   { left: 7.14285714285715%; }
#cal-slide-tick.tick-day2   { left: 21.42857142857143%; }
#cal-slide-tick.tick-day3   { left: 35.71428571428572%; }
#cal-slide-tick.tick-day4   { left: 50%; }
#cal-slide-tick.tick-day5   { left: 64.2857142857143%; }
#cal-slide-tick.tick-day6   { left: 78.57142857142859%; }
#cal-slide-tick.tick-day7   { left: 92.85714285714285%; }


/* =====================================================================
   SLIDE CONTENT (event popup)
===================================================================== */
#cal-slide-content {
  padding: 16px 20px;
  color: #ffffff;
  background: #1e293b;
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0px 0px 15px 0px rgba(0,0,0,0.3);
}
#cal-slide-tick {
  background-image: url("../img/tick.png?2");
}
#cal-slide-content:hover {
  background-color: transparent;
}
#cal-slide-content a.event-item {
  color: #e2e8f0;
  font-weight: 400;
  line-height: 22px;
}
#cal-slide-content ul.unstyled {
  margin-bottom: 0;
}
a.cal-event-week {
  text-decoration: none;
  color: #334155;
}
.badge-important {
  background-color: #ef4444;
}


/* =====================================================================
   WEEK VIEW
===================================================================== */
.cal-week-box {
  position: relative;
}
.cal-week-box [data-event-class] {
  white-space: nowrap;
  height: 30px;
  margin: 2px 3px;
  line-height: 30px;
  border-radius: 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  padding-left: 10px;
}
.cal-week-box .cal-column {
  position: absolute;
  height: 100%;
  z-index: -1;
}
.cal-week-box .arrow-before,
.cal-week-box .arrow-after { position: relative; }
.cal-week-box .arrow-after:after {
  content: "";
  position: absolute;
  top: 0px;
  width: 0;
  height: 0;
  right: 0;
}
.cal-week-box .arrow-before:before {
  content: "";
  position: absolute;
  top: 0px;
  width: 0;
  height: 0;
  left: 1px;
}


/* =====================================================================
   DAY VIEW
===================================================================== */
#cal-day-box { text-wrap: none; }
#cal-day-box .cal-day-hour-part {
  height: 30px;
  box-sizing: border-box;
  border-bottom: 1px dashed #e2e8f0;
}
#cal-day-box .cal-day-hour .day-highlight { height: 30px; }
#cal-day-box .cal-hours { font-weight: 700; color: #64748b; }
#cal-day-box .cal-day-hour:nth-child(odd) { background-color: #fafafa; }
#cal-day-box #cal-day-panel { position: relative; padding-left: 60px; }
#cal-day-box #cal-day-panel-hour {
  position: absolute;
  width: 100%;
  margin-left: -60px;
}
#cal-day-box .day-event {
  position: relative;
  max-width: 200px;
  overflow: hidden;
}
#cal-day-box .day-highlight {
  line-height: 30px;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
  border-radius: 4px;
  margin: 2px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =====================================================================
   SELECTED (legacy — kept for compatibility)
===================================================================== */
.cal-day-selected {
  background-color: #f0f9ff;
  border: 1px solid #7dd3fc;
  border-radius: 8px;
}


/* =====================================================================
   LEGEND  (under the calendar)
===================================================================== */
.cal-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}
.cal-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.swatch-available  { background: #ffffff; border-color: #e2e8f0; }
.swatch-today      { background: #ffffff; border: 2px solid #334155; }
.swatch-preview    { background: #334155; }
.swatch-selected   { background: #1e293b; }
.swatch-booked     { background: #fafafa; border-color: #f1f5f9; }


/* =====================================================================
   STAY SUMMARY  (check-in / check-out / nights / price)
===================================================================== */
.stay-summary {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  background: #f8fafc;
}
.stay-empty-state {
  text-align: center;
  padding: 4px 0;
}
.stay-dates {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.stay-date-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 90px;
}
.stay-date-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
}
.stay-date-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}
.stay-date-sep {
  color: #94a3b8;
  font-size: 1.1rem;
  flex-shrink: 0;
  padding-top: 16px;
}
.stay-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.stay-price-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.stay-price-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
}


/* =====================================================================
   GUESTS STEPPER
===================================================================== */
.guests-row {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.guests-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
}
.guests-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stepper-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
  padding: 0;
}
.stepper-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.stepper-btn:disabled { opacity: 0.3; cursor: default; }
.stepper-value {
  font-size: 1.05rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  color: #0f172a;
}


/* =====================================================================
   TERMS CHECKBOX
===================================================================== */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0 2px;
}
.terms-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}
.terms-checkbox:checked {
  background: #1e293b;
  border-color: #1e293b;
}
.terms-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.terms-label {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
  cursor: pointer;
}
.terms-label a {
  color: #1e293b;
  font-weight: 600;
  text-decoration: underline;
}


/* =====================================================================
   OUT-OF-MONTH: always invisible — must come last to win specificity
===================================================================== */
.cal-day-outmonth {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  cursor: default;
}
.cal-day-outmonth span[data-cal-date] {
  opacity: 0 !important;
  pointer-events: none;
}
