/* Bloco "Excursão de preferência" no checkout — visual integrado, coeso,
   aparece abaixo das opções de frete. */

.evo-exc-block {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}
.evo-exc-block__title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
}
.evo-exc-field { display: block; margin: 0 0 12px; }
.evo-exc-field:last-child { margin-bottom: 0; }
.evo-exc-field__label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #2b2d2f;
}
.evo-exc-input {
  width: 100%;
  box-sizing: border-box;
  padding: .55rem .65rem;
  border: 1px solid #c9ccd1;
  border-radius: 6px;
  font-size: .95rem;
  background: #fff;
}
.evo-exc-input:focus {
  outline: 2px solid var(--wc-form-border-color, #3858e9);
  outline-offset: -1px;
  border-color: transparent;
}
.evo-exc-input[disabled] { background: #f1f1f1; color: #888; }
textarea.evo-exc-input { resize: vertical; }

.evo-exc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Dias da semana — botões toggle */
.evo-exc-days { display: flex; flex-wrap: wrap; gap: 6px; }
.evo-exc-day {
  appearance: none;
  cursor: pointer;
  min-width: 44px;
  padding: .45rem .55rem;
  border: 1px solid #c9ccd1;
  border-radius: 6px;
  background: #fff;
  font-size: .85rem;
  font-weight: 500;
  color: #2b2d2f;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.evo-exc-day:hover { border-color: #8a8f98; }
.evo-exc-day.is-active {
  background: #1e1e1e;
  border-color: #1e1e1e;
  color: #fff;
}

/* Horário de/até */
.evo-exc-hours { display: flex; align-items: center; gap: 8px; }
.evo-exc-hours__sep { font-size: .85rem; color: #50575e; }
.evo-exc-input--hour { width: auto; flex: 1 1 0; }

.evo-exc-block__notice {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #d7d7d7;
  font-size: .82rem;
  color: #50575e;
  line-height: 1.5;
}

/* Botão "Mais detalhes" — fica ABAIXO do nome da excursão (própria linha),
   dentro do __option-layout (coluna). align-self evita esticar na largura. */
.evo-exc-more {
  display: inline-block;
  align-self: flex-start;
  appearance: none;
  background: none;
  border: 0;
  padding: 2px 0 0;
  margin: 2px 0 0;
  font-size: .82rem;
  font-weight: 500;
  color: var(--wc-form-border-color, #3858e9);
  text-decoration: underline;
  cursor: pointer;
}
.evo-exc-more:hover { filter: brightness(.9); }

/* Variante "empilhada": quando o link é injetado DENTRO do span do nome
   (carrinho-CEP e simulador da página do produto), fica em bloco logo abaixo do
   título — alinhado a ele, e com a MESMA distância do checkout (só a margem,
   sem o row-gap do container da linha). */
.evo-exc-more--stacked {
  display: block;
  width: fit-content;
  align-self: auto;
  margin-top: 2px;
  padding-top: 0;
  text-align: left;
}

/* Popup do "Mais detalhes" */
.evo-exc-modal__p { margin: 0 0 .7em; line-height: 1.55; }
.evo-exc-modal__p:last-child { margin-bottom: 0; }

/* Bloco de contato (excursão cadastrada) */
.evo-exc-modal__contact {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f6f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.evo-exc-modal__contact .evo-exc-modal__p { margin: 0 0 .35em; }
.evo-exc-modal__contact a { font-weight: 600; }
.evo-exc-modal__instruction { margin: .5em 0 0; font-size: .9rem; color: #50575e; line-height: 1.5; }

/* Overlay fallback (quando wp.components.Modal indisponível) */
.evo-exc-overlay {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); padding: 16px;
}
.evo-exc-overlay__box {
  background: #fff; border-radius: 8px; max-width: 520px; width: 100%;
  max-height: 80vh; overflow: auto; padding: 20px 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.evo-exc-overlay__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: 1.05rem;
}
.evo-exc-overlay__close {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: #555;
}

/* Preview no editor */
.evo-exc-block--editor p { margin: 0; color: #50575e; font-size: .85rem; }

/* ── Mobile (Android/iOS) ─────────────────────────────────────────────────
   - font-size 16px nos campos evita o AUTOZOOM do iOS Safari ao focar.
   - layout em coluna única; alvos de toque maiores; horário pode quebrar. */
@media (max-width: 600px) {
  .evo-exc-input { font-size: 16px; }
  .evo-exc-row { grid-template-columns: 1fr; }
  .evo-exc-day { min-height: 42px; font-size: .95rem; }
  .evo-exc-hours { flex-wrap: wrap; }
  .evo-exc-input--hour { min-width: 120px; }

  /* "Mais detalhes": alvo de toque maior (≥32px de área clicável). */
  .evo-exc-more { padding: 6px 0; font-size: .9rem; }

  /* Popup vira bottom-sheet: ancorado embaixo, cantos arredondados no topo,
     respeita a safe-area do iOS. Mais natural no toque que um modal central. */
  .evo-exc-overlay { padding: 0; align-items: flex-end; }
  .evo-exc-overlay__box {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .evo-exc-overlay__head { font-size: 1.1rem; }
  .evo-exc-overlay__close { font-size: 2rem; padding: 0 4px; margin: -4px -4px 0 0; }
}
