/**
 * Calendário duplo estilo Booking — CheckInAll
 */
.bdc-wrap {
  position: relative;
}

.bdc-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 0.15rem 0.5rem 0.5rem;
  font-size: 0.95rem;
  color: var(--text, #222);
  font-family: inherit;
  min-height: 2.25rem;
}

.bdc-trigger:hover {
  color: var(--accent, #e61e4d);
}

.bdc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 200;
  /* Fechado: fora do layout — não intercepta cliques em nenhum motor. */
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 0.2s, visibility 0.2s;
}

.bdc-backdrop.is-open {
  display: block !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
}

.bdc-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 210;
  width: min(640px, calc(100vw - 1.5rem));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.bdc-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .bdc-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -48%) scale(0.98);
    max-height: 90vh;
    overflow-y: auto;
  }

  .bdc-panel.is-open {
    transform: translate(-50%, -50%) scale(1);
  }
}

.bdc-tabs {
  display: flex;
  padding: 6px;
  gap: 4px;
  background: #f0ebe3;
  border-radius: 10px 10px 0 0;
}

.bdc-tab {
  flex: 1;
  border: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #555;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s;
}

.bdc-tab.is-active {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.bdc-tab:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.5);
}

.bdc-panel-body {
  padding: 0.75rem 1rem 1rem;
}

.bdc-flex-placeholder {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
  font-size: 0.9rem;
}

.bdc-flex-placeholder.is-visible {
  display: block;
}

.bdc-cal-view {
  display: none;
}

.bdc-cal-view.is-visible {
  display: block;
}

.bdc-months-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .bdc-months-row {
    grid-template-columns: 1fr;
  }
}

.bdc-month {
  min-width: 0;
}

.bdc-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  min-height: 36px;
}

.bdc-month-head .bdc-month-title {
  flex: 1;
  text-align: center;
  margin: 0;
}

.bdc-month-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: lowercase;
}

.bdc-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #4a4a4a;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.bdc-nav:hover:not(:disabled) {
  background: #333;
}

.bdc-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bdc-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #888;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bdc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.bdc-day {
  aspect-ratio: 1;
  max-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  color: #1a1a1a;
  font-family: inherit;
  padding: 0;
  transition: background 0.12s, color 0.12s;
}

.bdc-day:hover:not(:disabled):not(.is-muted) {
  background: #f0f0f0;
}

.bdc-day.is-muted {
  color: #c8c8c8;
  cursor: default;
  font-weight: 400;
}

.bdc-day:disabled {
  color: #d0d0d0;
  cursor: not-allowed;
}

.bdc-day.is-in-range {
  background: #e8f1fe;
  border-radius: 0;
}

.bdc-day.is-range-start,
.bdc-day.is-range-end {
  background: var(--accent, #e61e4d);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
}

.bdc-day.is-range-start.is-range-end {
  border-radius: 6px;
}

.bdc-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eee;
}

.bdc-flex-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bdc-flex-btn {
  padding: 0.4rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #333;
  transition: border-color 0.15s, background 0.15s;
}

.bdc-flex-btn:hover {
  border-color: #999;
}

.bdc-flex-btn.is-active {
  border-color: var(--accent, #e61e4d);
  background: rgba(230, 30, 77, 0.06);
  color: var(--accent, #e61e4d);
}

.bdc-apply {
  padding: 0.55rem 1.5rem;
  border: 0;
  border-radius: 8px;
  background: #7a6a5a;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.bdc-apply:hover {
  background: #6a5c4e;
}

.ap-field--dates-range {
  flex: 1 1 200px;
  min-width: 160px;
}

.ap-field--dates-range .bdc-trigger-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.15rem 0.5rem 0.5rem;
  font-size: 0.95rem;
}

.ap-field--dates-range .bdc-trigger-line .sep {
  color: #bbb;
}

/* Pop-up do calendário não ser cortado pela barra de pesquisa */
.ap-search-inner,
.ap-search-form {
  overflow: visible;
}

.ap-search-band {
  overflow: visible;
}

/* Barra de pesquisa acima de camadas internas do shell (não sobrepor header z~100). */
.alojamentos-publico .ap-search-band {
  position: relative;
  z-index: 40;
}

.alojamentos-publico .ap-search-form {
  position: relative;
  z-index: 41;
}

.ap-field--dates-range {
  position: relative;
  z-index: 2;
}

/**
 * Barra de pesquisa (lista pública) — cartão «Datas da estadia»:
 * contorno rosa, rótulo em caixa alta, área interior com borda azul e placeholders bordô.
 */
.alojamentos-publico .ap-field.ap-field--dates-range {
  flex: 1 1 220px;
  min-width: 180px;
  overflow: visible;
  border: 1px solid rgba(230, 30, 77, 0.42);
  border-radius: 12px;
  padding: 0.55rem 0.75rem 0.65rem;
  background: #f3f3f3;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  z-index: 42;
  /* Evita “selecionar” o cartão inteiro como texto (arrastar) — o alvo é só o botão interior. */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Não reforçar a borda do cartão no foco: isso fazia parecer que o div inteiro era o alvo em vez do picker azul. */
.alojamentos-publico .ap-field.ap-field--dates-range:focus-within {
  border-color: rgba(230, 30, 77, 0.42);
  background: #f3f3f3;
}

.alojamentos-publico .ap-field.ap-field--dates-range > label {
  padding: 0 0 0.4rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.alojamentos-publico .ap-field--dates-range .bdc-wrap {
  width: 100%;
  position: relative;
  z-index: 1;
}

.alojamentos-publico .ap-field--dates-range .bdc-trigger {
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #2563eb;
  border-radius: 8px;
  background: #fff;
  padding: 0.5rem 0.7rem;
  min-height: 2.45rem;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.alojamentos-publico .ap-field--dates-range .bdc-trigger:hover {
  border-color: #1d4ed8;
  color: inherit;
}

.alojamentos-publico .ap-field--dates-range .bdc-trigger:focus-visible {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

.alojamentos-publico .ap-field--dates-range .bdc-trigger-line {
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}

.alojamentos-publico .ap-field--dates-range .bdc-trigger-line .bdc-ci,
.alojamentos-publico .ap-field--dates-range .bdc-trigger-line .bdc-co {
  color: #8f1532;
  font-weight: 600;
}

.alojamentos-publico .ap-field--dates-range .bdc-trigger.has-dates .bdc-ci,
.alojamentos-publico .ap-field--dates-range .bdc-trigger.has-dates .bdc-co {
  color: #1a1a1a;
  font-weight: 500;
}

.alojamentos-publico .ap-field--dates-range .bdc-trigger-line .sep {
  color: #9ca3af;
  font-weight: 400;
}

/* Ficha de alojamento — caixa de reserva (sidebar) */
.bdc-wrap--detail-sidebar {
  width: 100%;
}

.bdc-wrap--detail-sidebar .bdc-panel {
  left: auto;
  right: 0;
}

.bdc-trigger--detail {
  width: 100%;
  background: #fff;
  border: 1px solid var(--apd-border, #ccc);
  border-radius: 4px;
  padding: 0.45rem 0.5rem;
  min-height: 2.5rem;
  box-sizing: border-box;
}

.bdc-trigger--detail:hover {
  border-color: #999;
}

.apd-form-row--dates .bdc-trigger-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  padding: 0;
}

.apd-form-row--dates .bdc-trigger-line .sep {
  color: #bbb;
}
