/* =============================================================================
   bookingsmaker.com - "bmdefault" NEW THEME
   File: bm-components.css
   Purpose: Shared, reusable UI primitives used across the hotel-search,
            hotel-listing, hotel-detail and hotel-booking pages: layout
            container, buttons, form controls, cards, badges/chips, star
            ratings, pagination, tabs, and a base modal shell.

   Depends on: bm-tokens.css (must be loaded first).
   Namespacing: every class is prefixed "bm-" to avoid collisions with
   Bootstrap 3.3.1 (.btn, .form-control, .badge, .label, .pagination,
   .modal, .panel, .nav, .tab*, etc.) already present on every page.
   ========================================================================== */

/* -----------------------------------------------------------------------
   Layout helpers
   ----------------------------------------------------------------------- */
.bm-container {
  max-width: var(--bm-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--bm-container-padding-x);
  padding-right: var(--bm-container-padding-x);
}

@media (max-width: 767px) {
  .bm-container {
    padding-left: var(--bm-container-padding-x-mobile);
    padding-right: var(--bm-container-padding-x-mobile);
  }
}

.bm-section {
  padding-top: var(--bm-space-xl);
  padding-bottom: var(--bm-space-xl);
}


@media (max-width: 767px) {
  .bm-section {
    padding-top: var(--bm-space-sm);
    padding-bottom: var(--bm-space-2xl-mobile);
  }
}

/* Reusable page/section heading style - used on hotel-detail's overview
   title and reused verbatim on hotel-booking's summary card titles (both
   pages load this shared file via BmThemeAsset). Typography only, no
   layout/display changes, safe to layer on top of any legacy heading. */
.bm-detail-header__title {
  font-family: var(--bm-font-family);
  font-size: var(--bm-fs-headline-lg);
  font-weight: 700;
  color: var(--bm-color-on-surface);
}

.bm-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -----------------------------------------------------------------------
   Typography helpers
   ----------------------------------------------------------------------- */
.bm-font { font-family: var(--bm-font-family); }

.bm-text-display-lg { font-size: var(--bm-fs-display-lg); line-height: var(--bm-lh-display-lg); font-weight: 800; letter-spacing: -0.02em; }
.bm-text-headline-lg { font-size: var(--bm-fs-headline-lg); line-height: var(--bm-lh-headline-lg); font-weight: 700; letter-spacing: -0.01em; }
.bm-text-headline-md { font-size: var(--bm-fs-headline-md); line-height: var(--bm-lh-headline-md); font-weight: 600; }
.bm-text-headline-sm { font-size: var(--bm-fs-headline-sm); line-height: var(--bm-lh-headline-sm); font-weight: 600; }
.bm-text-body-lg { font-size: var(--bm-fs-body-lg); line-height: var(--bm-lh-body-lg); font-weight: 400; }
.bm-text-body-md { font-size: var(--bm-fs-body-md); line-height: var(--bm-lh-body-md); font-weight: 400; }
.bm-text-label-md { font-size: var(--bm-fs-label-md); line-height: var(--bm-lh-label-md); font-weight: 600; letter-spacing: 0.01em; }
.bm-text-label-sm { font-size: var(--bm-fs-label-sm); line-height: var(--bm-lh-label-sm); font-weight: 500; }
.bm-text-caption { font-size: var(--bm-fs-caption); line-height: var(--bm-lh-caption); font-weight: 400; }

@media (max-width: 767px) {
  .bm-text-headline-lg { font-size: var(--bm-fs-headline-lg-mobile); line-height: var(--bm-lh-headline-lg-mobile); }
}

/* -----------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------- */
.bm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bm-space-2xs);
  font-family: var(--bm-font-family);
  font-size: var(--bm-fs-label-md);
  font-weight: 700;
  line-height: 1;
  border: none;
  
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--bm-transition-fast), box-shadow var(--bm-transition-fast), transform var(--bm-transition-fast), opacity var(--bm-transition-fast);
}
.bm-btn:active { transform: scale(0.97); }
.bm-btn:disabled,
.bm-btn.bm-is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.bm-btn--primary {
  background-color: var(--bm-color-primary);
  color: var(--bm-color-on-primary);
}
.bm-btn--primary:hover { opacity: 0.92; }

.bm-btn--accent {
  background-color: var(--bm-color-secondary-container);
  color: var(--bm-color-on-secondary);
  box-shadow: var(--bm-shadow-md);
}
.bm-btn--accent:hover { background-color: var(--bm-color-secondary); }

.bm-btn--outline {
  background-color: transparent;
  color: var(--bm-color-primary-container);
  border: 1px solid var(--bm-color-primary-container);
}
.bm-btn--outline:hover { background-color: var(--bm-color-surface-container-low); }

.bm-btn--ghost {
  background-color: transparent;
  color: var(--bm-color-on-surface-variant);
}
.bm-btn--ghost:hover { color: var(--bm-color-secondary); background-color: var(--bm-color-surface-container-low); }

.bm-btn--sm { padding: 0.5rem 1rem; font-size: var(--bm-fs-label-sm); }
.bm-btn--lg { padding: 1rem 2rem; font-size: var(--bm-fs-headline-sm); }
.bm-btn--pill { border-radius: var(--bm-radius-full); }
.bm-btn--block { width: 100%; }

.bm-btn--icon {
  padding: 0.5rem;
  border-radius: var(--bm-radius-full);
  background: transparent;
  color: var(--bm-color-on-surface-variant);
}
.bm-btn--icon:hover { background-color: var(--bm-color-surface-container-low); color: var(--bm-color-secondary); }

/* -----------------------------------------------------------------------
   Form controls
   ----------------------------------------------------------------------- */
.bm-field { display: flex; flex-direction: column; margin-bottom: var(--bm-space-sm); }

.bm-field__label {
  font-size: var(--bm-fs-label-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bm-color-on-surface-variant);
  margin-bottom: var(--bm-space-3xs);
}
.bm-field__label .bm-required { color: var(--bm-color-error); }

.bm-input,
.bm-select,
.bm-textarea {
  font-family: var(--bm-font-family);
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  background-color: var(--bm-color-surface-container-low);
  border: 1px solid var(--bm-color-outline-variant);
  border-radius: var(--bm-radius-md);
  font-size: var(--bm-fs-body-md);
  color: var(--bm-color-on-surface);
  transition: border-color var(--bm-transition-fast), box-shadow var(--bm-transition-fast), background-color var(--bm-transition-fast);
}
.bm-textarea { min-height: 88px; resize: vertical; }

.bm-input:focus,
.bm-select:focus,
.bm-textarea:focus {
  outline: none;
  background-color: var(--bm-color-surface-container-lowest);
  border-color: var(--bm-color-secondary-container);
  box-shadow: 0 0 0 3px rgba(253, 143, 26, 0.18);
}

.bm-input--plain {
  background: transparent;
  border: none;
  padding: 0;
  min-height: auto;
}
.bm-input--plain:focus { box-shadow: none; }

.bm-input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--bm-color-outline-variant);
  border-radius: var(--bm-radius-md);
  background-color: var(--bm-color-surface-container-low);
  overflow: hidden;
  transition: border-color var(--bm-transition-fast), box-shadow var(--bm-transition-fast);
}
.bm-input-group:focus-within {
  background-color: var(--bm-color-surface-container-lowest);
  border-color: var(--bm-color-secondary-container);
  box-shadow: 0 0 0 3px rgba(253, 143, 26, 0.18);
}
.bm-input-group .bm-input { border: none; background: transparent; box-shadow: none !important; }
.bm-input-group__addon {
  display: flex;
  align-items: center;
  padding: 0 0.625rem;
  background-color: var(--bm-color-surface-container);
  border-right: 1px solid var(--bm-color-outline-variant);
  font-size: var(--bm-fs-label-sm);
  font-weight: 600;
  color: var(--bm-color-on-surface-variant);
}

.bm-input-icon-wrap { position: relative; }
.bm-input-icon-wrap .ti {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--bm-color-outline);
  pointer-events: none;
}
.bm-input-icon-wrap .bm-input { padding-left: 2.25rem; }

.bm-checkbox-row,
.bm-radio-row {
  display: flex;
  align-items: center;
  gap: var(--bm-space-2xs);
  font-size: var(--bm-fs-label-sm2);
  color: var(--bm-color-on-surface);
  cursor: pointer;
  user-select: none;
  font-weight: 400;
}
.bm-checkbox-row input,
.bm-radio-row input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--bm-color-secondary-container);
}

/* Pill-style checkbox used for e.g. "Special Requests" chips */
.bm-check-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--bm-space-2xs);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--bm-color-outline-variant);
  border-radius: var(--bm-radius-md);
  background-color: var(--bm-color-surface-container-lowest);
  font-size: var(--bm-fs-label-sm);
  font-weight: 600;
  color: var(--bm-color-on-surface-variant);
  cursor: pointer;
  transition: all var(--bm-transition-fast);
}
.bm-check-pill input { accent-color: var(--bm-color-secondary-container); width: 1rem; height: 1rem; }
.bm-check-pill.bm-is-checked,
.bm-check-pill:has(input:checked) {
  background-color: var(--bm-color-secondary-fixed);
  border-color: var(--bm-color-secondary-fixed-dim);
  color: var(--bm-color-on-secondary-fixed-variant);
}

/* -----------------------------------------------------------------------
   Cards
   ----------------------------------------------------------------------- */
.bm-card {
  background-color: var(--bm-color-surface-container-lowest);
  border: 1px solid var(--bm-color-outline-variant);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-shadow-card);
}

.bm-card--sharp { border-radius: var(--bm-radius-sharp); }
.bm-card--hover { transition: box-shadow var(--bm-transition-base), transform var(--bm-transition-base); }
.bm-card--hover:hover { box-shadow: var(--bm-shadow-lg); }

.bm-card__body { padding: var(--bm-space-md); }

/* -----------------------------------------------------------------------
   Badges / chips / tags
   ----------------------------------------------------------------------- */
.bm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--bm-radius-sm);
  font-size: var(--bm-fs-label-xss);
  font-weight: 500;
  line-height: 1.3;
}
.bm-badge--accent { background-color: var(--bm-color-secondary-container); color: var(--bm-color-on-secondary); }
.bm-badge--info { background-color: var(--bm-color-tertiary-fixed); color: var(--bm-color-on-tertiary-fixed-variant); }
.bm-badge--dark { background-color: rgba(11, 28, 48, 0.9); color: var(--bm-color-white); }
.bm-badge--error { background-color: var(--bm-color-error-container); color: var(--bm-color-on-error-container); }
.bm-badge--success { background-color: var(--bm-color-success-container); color: var(--bm-color-on-success-container); }
.bm-badge--outline { background: #c6e7ff; color: var(--bm-color-on-surface-variant); font-weight: 500; }

.bm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--bm-radius-full);
  border: 1px solid var(--bm-color-outline-variant);
  background-color: var(--bm-color-surface-container-lowest);
  font-size: var(--bm-fs-label-sm);
  font-weight: 600;
  color: var(--bm-color-on-surface-variant);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--bm-transition-fast);
}
.bm-chip:hover,
.bm-chip.bm-is-active { border-color: var(--bm-color-secondary); color: var(--bm-color-secondary); }
.bm-chip .ti { font-size: 18px; }

/* -----------------------------------------------------------------------
   Star rating
   ----------------------------------------------------------------------- */
.bm-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--bm-color-on-tertiary-container);
}
.bm-rating-stars .ti { font-size: 16px; }

.bm-rating-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bm-color-primary-container);
  color: var(--bm-color-white);
  font-weight: 800;
  font-size: var(--bm-fs-label-sm);
  padding: 0.15rem 0.45rem;
  border-radius: var(--bm-radius-sm);
}

/* -----------------------------------------------------------------------
   Tabs (e.g. search widget vertical/hotels-flights-bus tabs, payment tabs)
   ----------------------------------------------------------------------- */
.bm-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.bm-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--bm-space-2xs);
  padding: 0.9rem 1.25rem;
  font-family: var(--bm-font-family);
  font-size: var(--bm-fs-label-md);
  font-weight: 600;
  color: var(--bm-color-on-surface-variant);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color var(--bm-transition-fast), border-color var(--bm-transition-fast);
}
.bm-tab:hover { color: var(--bm-color-secondary); }
.bm-tab.bm-is-active {
  color: var(--bm-color-secondary);
  border-bottom-color: var(--bm-color-secondary);
  font-weight: 700;
}

/* Grid-style tab buttons (used for payment method selector) */
.bm-tab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--bm-space-2xs);
}
@media (min-width: 640px) {
  .bm-tab-grid { grid-template-columns: repeat(4, 1fr); }
}
.bm-tab-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--bm-space-3xs);
  padding: 0.875rem 0.625rem;
  background-color: var(--bm-color-surface-container-low);
  border: 1px solid var(--bm-color-outline-variant);
  border-radius: var(--bm-radius-md);
  font-size: var(--bm-fs-label-md);
  font-weight: 600;
  color: var(--bm-color-on-surface-variant);
  cursor: pointer;
  transition: all var(--bm-transition-fast);
}
.bm-tab-card:hover { background-color: var(--bm-color-surface-container); }
.bm-tab-card.bm-is-active {
  background-color: var(--bm-color-tertiary-fixed);
  border-color: var(--bm-color-on-tertiary-fixed-variant);
  color: var(--bm-color-on-tertiary-fixed-variant);
  font-weight: 800;
  box-shadow: var(--bm-shadow-sm);
}

/* -----------------------------------------------------------------------
   Pagination
   ----------------------------------------------------------------------- */
.bm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--bm-space-2xs);
}
.bm-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--bm-color-outline-variant);
  background-color: var(--bm-color-surface-container-lowest);
  color: var(--bm-color-on-surface);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--bm-transition-fast);
  text-decoration: none;
}
.bm-pagination__item:hover { background-color: var(--bm-color-surface-container); }
.bm-pagination__item.bm-is-active {
  background-color: var(--bm-color-primary-container);
  border-color: var(--bm-color-primary-container);
  color: var(--bm-color-white);
}
.bm-pagination__ellipsis { padding: 0 var(--bm-space-2xs); color: var(--bm-color-on-surface-variant); }

/* -----------------------------------------------------------------------
   Modal shell (used e.g. for hotel-booking confirmation receipt)
   ----------------------------------------------------------------------- */
.bm-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 28, 48, 0.6);
  z-index: var(--bm-z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--bm-space-sm);
}
.bm-modal-backdrop.bm-is-open { display: flex; }

.bm-modal {
  background-color: var(--bm-color-surface-container-lowest);
  border-radius: var(--bm-radius-lg);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: bm-modal-slide-in 0.25s ease-out;
}
@keyframes bm-modal-slide-in {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.bm-modal__head {
  background-color: var(--bm-color-primary-container);
  color: var(--bm-color-white);
  padding: 1.5rem 1.25rem;
  text-align: center;
  position: relative;
}
.bm-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--bm-radius-full);
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--bm-color-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bm-modal__success-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--bm-radius-full);
  background-color: var(--bm-color-success);
  color: var(--bm-color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}
.bm-modal__body { padding: 1.25rem; font-size: var(--bm-fs-label-md); }

/* -----------------------------------------------------------------------
   Trust / info callout bar (used on search hero, detail sidebar, booking)
   ----------------------------------------------------------------------- */
.bm-callout {
  display: flex;
  align-items: flex-start;
  gap: var(--bm-space-xs);
  padding: var(--bm-space-sm);
  border-radius: var(--bm-radius-md);
  background-color: var(--bm-color-surface-container-low);
  border: 1px solid var(--bm-color-outline-variant);
}
.bm-callout--info {
  background-color: var(--bm-color-tertiary-fixed);
  border-color: var(--bm-color-tertiary-fixed-dim);
  color: var(--bm-color-on-tertiary-fixed-variant);
}
.bm-callout__icon { flex-shrink: 0; color: var(--bm-color-on-tertiary-container); }
.bm-callout__title { font-weight: 800; font-size: var(--bm-fs-body-md); margin-bottom: 0.25rem; }
.bm-callout__text { font-size: var(--bm-fs-label-sm); color: var(--bm-color-on-surface-variant); line-height: 1.5; }
