/*
Theme Name: Base Child
Theme URI: 
Description: Child theme for the Accent Inns custom theme.
Author: Accent Inns
Template: base
Version: 1.0.0
Text Domain: base-child
*/

/*
 * Mobile booking slide-in panel
 */

/* Component-level box sizing */
.booking-panel,
.booking-panel *,
.booking-panel *::before,
.booking-panel *::after,
.booking-panel-overlay {
  box-sizing: border-box;
}

/* Screen-reader-only labels */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
 * Open button
 */
.booking-widget__open-mobile {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #f99501;
  color: #fff;
}

/*
 * Background overlay
 */
.booking-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  background: rgba(0, 0, 0, 0.5);
  opacity: 0;

  transition: opacity 0.3s ease;
}

.booking-panel-overlay.is-open {
  opacity: 1;
}

.booking-panel-overlay[hidden] {
  display: none;
}

/*
 * Slide-in panel
 *
 * The panel animates using right rather than transform.
 * This helps native date inputs behave more reliably in iOS Safari.
 */
.booking-panel {
  position: fixed;
  top: 0;
  right: -100vw;
  bottom: 0;
  z-index: 10001;

  display: flex;
  flex-direction: column;

  width: min(100vw, 430px);
  max-width: 100%;
  min-width: 0;

  height: 100vh;
  height: 100dvh;

  background-color: #fff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2);

  visibility: hidden;
  transform: none;

  transition:
    right 0.3s ease,
    visibility 0s linear 0.3s;
}

.booking-panel.is-open {
  right: 0;
  visibility: visible;
  transform: none;

  transition:
    right 0.3s ease,
    visibility 0s linear 0s;
}

/*
 * Panel header
 */
.booking-panel__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  min-height: 70px;
  padding:
    calc(12px + env(safe-area-inset-top))
    20px
    12px;

  border-bottom: 0px solid #ddd;
  background-color: #fff;
}

.booking-panel__header h2 {
  margin: 0;
  color: #222;
  font-size: 1.4rem;
  line-height: 1.2;
}

/*
 * Close button
 */
.booking-widget__close-mobile {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;
  padding: 0;

  border: 0;
  border-radius: 4px;
  background: transparent;

  color: #222;
  font: inherit;
  font-size: 2rem;
  line-height: 1;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.booking-widget__close-mobile:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.booking-widget__close-mobile:focus-visible {
  outline: 3px solid rgba(0, 64, 113, 0.3);
  outline-offset: 2px;
}

/*
 * Scrollable panel content
 */
.booking-panel__content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;

  padding:
    24px
    20px
    calc(24px + env(safe-area-inset-bottom));

  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/*
 * Form layout
 */
.booking-form {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 18px;
  margin: 0;
}

.booking-form__field,
.booking-form__dates {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.booking-form__field {
  display: grid;
  gap: 8px;
}

.booking-form__field label:not(.sr-only) {
  margin: 0;
  color: #222;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

/*
 * Keep native date fields stacked on mobile.
 * This avoids Safari's intrinsic date-input width pushing
 * the form outside the panel.
 */
.booking-form__dates {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

/*
 * Standard select and text fields
 */
.booking-form select,
.booking-form input[type="text"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 52px;

  padding: 12px 14px;
  margin: 0;

  border: 1px solid #b8b8b8;
  border-radius: 6px;
  background-color: #fff;

  color: #222;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
}

.booking-form select {
  cursor: pointer;
}

.booking-form input[type="text"]::placeholder {
  color: #666;
  opacity: 1;
}

.booking-form select:focus,
.booking-form input[type="text"]:focus {
  border-color: #004071;
  outline: 3px solid rgba(0, 64, 113, 0.2);
  outline-offset: 1px;
}

/*
 * Native Safari date-control wrapper
 *
 * Padding, borders, and background belong on this wrapper,
 * not directly on the native input.
 */
.booking-date-control {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;

  padding: 0 14px;
  margin: 0;
  overflow: hidden;

  border: 1px solid #b8b8b8;
  border-radius: 6px;
  background-color: #fff;
}

/*
 * Native date input
 *
 * Do not use appearance:none.
 * Do not add horizontal padding directly to this input.
 */
.booking-date-control input[type="date"] {
  display: block;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;

  height: 52px;
  min-height: 52px;

  padding: 0;
  margin: 0;

  border: 0;
  border-radius: 0;
  background: transparent;

  color: #222;
  font: inherit;
  font-size: 16px;
  line-height: normal;

  -webkit-appearance: auto;
  appearance: auto;
}

/*
 * Safari's internal date-value element
 */
.booking-date-control input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  min-height: 1.5em;
  margin: 0;
  text-align: left;
}

/*
 * Keep Safari's native calendar indicator available.
 */
.booking-date-control input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  cursor: pointer;
}

/*
 * Focus styling belongs on the wrapper.
 */
.booking-date-control input[type="date"]:focus {
  outline: none;
}

.booking-date-control:focus-within {
  border-color: #004071;
  outline: 3px solid rgba(0, 64, 113, 0.2);
  outline-offset: 1px;
}

/*
 * Submit button
 */
.booking-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  margin: 2px 0 0;

  border: 0;
  border-radius: 6px;
  background-color: #196fa8;

  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.booking-form__submit:hover {
  background-color: #196fa8;
}

.booking-form__submit:focus-visible {
  outline: 3px solid rgba(0, 64, 113, 0.3);
  outline-offset: 3px;
}

/*
 * Prevent page scrolling while the panel is open.
 */
body.booking-panel-open {
  overflow: hidden;
  overscroll-behavior: none;
}

/*
 * Reduced-motion support
 */
@media (prefers-reduced-motion: reduce) {
  .booking-panel,
  .booking-panel-overlay {
    transition: none;
  }
}

#btnTopReserve, #booking-widget {
  display: none!important;
}

/* Only use the slide-in interface on mobile */
@media (min-width: 1199px) {
  .booking-widget__open-mobile,
  .booking-panel,
  .booking-panel-overlay {
    display: none!important;
  }
  #btnTopReserve, #booking-widget {
    display: inline-block!important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-panel,
  .booking-panel-overlay {
    transition: none;
  }
}

@media (max-width: 767px) {
  .booking-widget__open-mobile {
    min-width: 29px;
    color: #f99501;
    font: 500 14px/1 "proxima-soft",sans-serif;
    text-transform: uppercase;
    padding: 34px 10px 0;
    display: inline-block;
    border: 0;
    background: url(../base/images/icons/icon-calendar.png) no-repeat top center;
  }
}
