:root {
  --primary-red: #d31219;
  --deep-black: #1a1a1a;
  --off-white: #f8f9fa;
  --gold-accent: #bca643;
  --success: #2d6a4f;
  --warning: #d4a017;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 15px 35px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.03);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#morumbis-tour {
  position: relative;
  height: 100dvh;
  padding: 20px 20px 140px;
  margin: 0;
  background: var(--off-white);
  overflow-x: hidden;
  overflow-y: auto;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  color: var(--deep-black);
  -webkit-font-smoothing: antialiased;
}

header {
  text-align: center;
  position: relative;
  margin-bottom: 40px;
  animation: fadeInDown 0.6s ease-out;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 1.5rem;
  margin-bottom: 0 !important;
}

header h1 strong {
  color: var(--primary-red);
}

header .button {
  margin: 0 !important;
  background: unset;
  color: #000;
  padding: unset;
  border: unset;
  line-height: unset;
  height: unset;
  min-height: unset;
  font-size: 1em;
}

header .button:hover {
  background: unset !important;
  color: unset !important;
  box-shadow: unset !important;
}

header .button i {
  margin: 0;
}

.step:not(.active) {
  display: none;
}

h2.step-header {
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 20px;
  font-size: 1.75rem;
}

#calendar {
  background: #fff;
  box-shadow: var(--shadow-premium);
  border-radius: 8px;
  padding: 10px 10px 15px;
  margin-bottom: 40px;
  border: 1px solid var(--border-subtle);
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-nav button {
  margin: 0;
}

span.display-month {
  font-size: 1.25em;
  line-height: 1;
  text-transform: capitalize;
}

.calendar-dates {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  gap: 10px;
  overflow-y: scroll;
}

.calendar-dates::-webkit-scrollbar {
  display: none;
}

.calendar-date input {
  display: none !important;
}

.calendar-date {
  text-align: center;
  width: 55px;
  display: block;
  flex-shrink: 0;
  line-height: 1;
}

.calendar-date label {
  font-weight: normal;
  border: dashed 1px #dcdcdc;
  display: flex !important;
  width: 100%;
  border-radius: 4px;
  transition: all 150ms ease;
  margin: 0;
  padding: 8px 0;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.calendar-date input:checked + label {
  border: solid 1px black;
  background: black;
  color: #fff;
}

.weekdate {
  font-size: 1.35em;
  font-weight: bold;
}

div#schedule-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-option {
  border: 1px solid var(--color);
  background: #fff; /* Fundo branco para legibilidade, borda colorida */
  border-left-width: 6px; /* Destaque lateral */
  border-radius: 10px;
  padding: 18px 15px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.schedule-option.sold-out {
  --color: #e5e5e5;
  opacity: 0.7;
  pointer-events: none !important;
}
.schedule-option.available {
  --color: #28a745;
}
.schedule-option.ending-soon {
  --color: #ffc107;
}

.schedule-option.selected {
  transform: scale(1.02);
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
}

h3.schedule-hour {
  margin: 0;
  font-weight: normal;
  width: auto;
}

span.schedule-status {
  white-space: nowrap;
  color: var(--color);
  font-weight: bold;
}

.schedule-addon {
  margin-top: 10px;
  background: #fff;
  border-radius: 8px;
}

.schedule-addon h4 {
  text-align: center;
}

.schedule-addon .addon-price-label {
  text-align: center;
  margin-bottom: 10px;
}

.addon-img {
  margin: 10px auto 20px;
  display: block;
  max-width: 100%;
}

.schedule-type {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.schedule-type button {
  margin: 0;
  font-size: 80%;
  flex: 1;
  padding: 5px;
  line-height: 1;
  border: solid 1px;
}

.schedule-option:not(.selected.has-addon) .schedule-addon {
  display: none;
}

footer {
  margin-top: auto;
  background: #fff;
  position: fixed !important;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  translate: 0 100%;
  transition: all 150ms ease;
  z-index: 1000;
}

footer button {
  margin: 0 !important;
  border-radius: 8px !important;
}

footer span {
  display: block;
  font-size: 1.35em;
}

footer.show {
  translate: 0;
}

.schedule-option.has-addon::after {
  font-size: 10px;
  position: absolute;
  top: 0;
  left: 25%;
  background: #000;
  text-align: center;
  padding: 0 50px;
  transform: rotate(45deg) translate(10px, 10px);
  color: #fff;
}

.schedule-option {
  position: relative;
  overflow: hidden;
}

.tickets-options {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.ticket-option {
  background: #fff;
  box-shadow: var(--shadow-premium);
  border-radius: 8px;
  padding: 10px 10px 15px;
}

.ticket-option-header {
  display: flex;
  gap: 10px;
}

.ticket-option-header p {
  margin: 0;
}

.ticket-option-name {
  flex-shrink: 0;
}

.product-quantity {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  gap: 3px;
}

.product-quantity * {
  margin: 0;
}

.product-quantity input {
  border: unset !important;
  box-shadow: unset !important;
  text-align: center !important;
  padding: 0 !important;
  width: 40px !important;
  pointer-events: none !important;
  user-select: none !important;
  padding: unset !important;
}

.product-quantity input::-webkit-outer-spin-button,
.product-quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-quantity input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.product-quantity button {
  border: solid 1px;
  border-radius: 6px;
  padding: 5px;
  min-height: unset;
  line-height: 1;
}

.product-quantity button.remove {
  opacity: 0.55;
}

.ticket-option-cpf {
  border-top: dashed 1px;
  margin-top: 15px;
  padding-top: 10px;
}

.cross-sell-discount {
  background: linear-gradient(135deg, #fff9e6 0%, #f4f1e8 100%);
  border: 1px solid var(--gold-accent);
  color: #8a731d; /* Um tom de dourado mais escuro para leitura */
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(188, 166, 67, 0.1);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.6s ease-out;
}

.cross-sell-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  padding-bottom: 20px;
}

@media (min-width: 768px) {
  .cross-sell-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cross-sell-image img {
  object-fit: cover;
  aspect-ratio: 1;
  height: auto;
  width: 100%;
  display: block;
  border-radius: 8px;
}

.cross-sell {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.cross-sell:hover {
  border-color: var(--border-subtle);
  transform: translateY(-4px);
}

.cross-sell-image {
  margin-bottom: 5px;
}

.cross-sell-data label {
  display: block;
  border: solid 1px #bca643;
  line-height: 1;
  margin: 0;
  padding: 10px;
  color: #bca643;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
}

.cross-sell-data {
  text-align: center;
}

.cross-sell-data .product-quantity {
  justify-content: center;
  background: #f8f9fa;
}

.premium-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.premium-modal {
  background: white;
  padding: 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-premium);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-modal-overlay.active {
  opacity: 1;
}
.premium-modal-overlay.active .premium-modal {
  transform: scale(1);
}

.modal-btn {
  margin: 20px 0 0 !important;
  padding: 12px 25px;
  border-radius: 8px;
  border: none;
  background: var(--deep-black);
  color: white;
  font-weight: 600;
  cursor: pointer;
  min-height: unset !important;
  height: unset !important;
}

.premium-modal p {
  margin: 0;
}

/* Container de Loading */
#morumbis-tour.loading::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px); /* Efeito de vidro luxuoso */
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

/* Spinner Minimalista (Substitui o texto) */
#morumbis-tour.loading::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  z-index: 10001;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Texto de carregamento refinado (Opcional) */
#morumbis-tour.loading-text {
  position: fixed;
  top: calc(50% + 40px);
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10002;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--deep-black);
  animation: pulse 1.5s infinite;
}

/* Filtro de desfoque no conteúdo */
#morumbis-tour.loading header,
#morumbis-tour.loading main,
#morumbis-tour.loading footer {
  filter: blur(4px); /* Aumentei o blur para parecer mais intencional */
  pointer-events: none;
  user-select: none;
  transition: filter 0.3s ease;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Botão Flutuante Refinado */
a#open-tips {
  position: fixed;
  background: var(--deep-black);
  color: #fff;
  border-radius: 50px;
  padding: 10px 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  z-index: 90;
  border: 1px solid rgba(255, 255, 255, 0.1);
  bottom: 20px;
  right: 20px;
}

a#open-tips:hover {
  transform: translateY(-5px);
  background: var(--primary-red);
  box-shadow: 0 15px 30px rgba(211, 18, 25, 0.3);
}

/* Estilização do Elemento Dialog */
dialog#tour-tips {
  border: none;
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  background: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* O "Backdrop" (Fundo escurecido) */
dialog#tour-tips::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.4s ease;
}

/* Animação de Entrada do Dialog */
dialog#tour-tips[open] {
  animation: modalShow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

dialog#tour-tips h2 {
  font-weight: 800;
  color: var(--deep-black);
  margin-top: 0;
  font-size: 1.8rem;
  letter-spacing: -1px;
}

dialog#tour-tips p {
  color: #555;
  line-height: 1.6;
  font-size: 1rem;
}

/* Botão Fechar dentro do Dialog */
dialog#tour-tips .close-button {
  width: 100%;
  background: var(--deep-black);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin: 10px 0 0;
}

dialog#tour-tips .close-button:hover {
  background: var(--primary-red);
}

#tour-tips .tips-content {
  max-height: 60dvh;
  overflow: auto;
}

/* Keyframes */
@keyframes modalShow {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
