/*
 * Application-wide styles
 * With Propshaft, this file is served directly without compilation
 */

/* Calendar Dense Mode */
.calendar--dense [data-unit-row] {
  height: 2.5rem !important; /* 40px instead of 64px */
}

.calendar--dense [data-calendar-part="unit-names"] .h-16:not(.calendar-unit-header) {
  height: 2.5rem !important;
}

.calendar--dense [data-calendar-part="unit-names"] .calendar-unit-header {
  height: 4rem !important; /* Keep header height consistent */
}

.calendar--dense [data-calendar-cell="grid"] {
  width: 3rem !important; /* 48px on mobile, stays same on desktop */
}

@media (min-width: 768px) {
  .calendar--dense [data-calendar-cell="grid"],
  .calendar--dense [data-calendar-cell="date"] {
    width: 6rem !important; /* 96px instead of 128px on desktop */
  }
}

.calendar--dense [data-calendar-cell="grid"] > div,
.calendar--dense [data-calendar-cell="grid"] > div > div {
  height: 1.75rem !important; /* 28px instead of 48px */
  top: 0.25rem !important;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

/* Hide reservation number and price details in dense mode */
.calendar--dense .calendar-res-number,
.calendar--dense .calendar-res-details {
  display: none !important;
}

/* Adjust text sizing in dense mode */
.calendar--dense .calendar-res-name {
  font-size: 8px !important;
  line-height: 1.2 !important;
}

@media (min-width: 768px) {
  .calendar--dense .calendar-res-name {
    font-size: 10px !important;
  }
}

/* Slim Select adjustments for Calendar Header */
.calendar-property-select + .ss-main {
  min-height: 2rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  border-radius: 0.75rem;
}

.calendar-property-select + .ss-main .ss-values .ss-placeholder,
.calendar-property-select + .ss-main .ss-values .ss-single {
  font-size: 0.75rem;
}

.calendar-property-select + .ss-content .ss-option {
  font-size: 0.75rem;
}

/* Keep reservation guest select dropdown above adjacent cards on edit page */
.reservation-edit-guest-card {
  position: relative;
  z-index: 20;
}

.reservation-edit-guest-card .ss-main {
  position: relative;
  z-index: 30;
}

.reservation-edit-guest-card .ss-content {
  z-index: 10000 !important;
}

/* Mobile calendar touch scrolling fixes */
[data-calendar-part="date-scroll"] {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Intl phone input wrapper should fill form width */
.iti {
  width: 100%;
}

@media (max-width: 767px) {
  /* Ensure smooth horizontal scrolling on mobile */
  [data-calendar-part="date-scroll"] {
    scroll-snap-type: x proximity;
  }

  /* Prevent sticky column from interfering with touch scroll */
  [data-unit-row] .sticky {
    touch-action: none;
  }

  /* Prevent overscroll on calendar container */
  #calendar_grid {
    overscroll-behavior: contain;
  }
}
