/* Página Regulamento — visualizador PDF por modalidade */

/* Fundo branco + degrade amarelo→branco nos 30% superiores */
body.page-regulamento {
  background-color: #ffffff;
  background-image: linear-gradient(180deg, var(--sumup-pink) 10%, #ffffff 30%, #ffffff 100%);
  background-position: center top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.regulamento-page {
  /* Não usar padding shorthand — preserva padding-top de .site-main (header + countdown) */
  padding-inline: 0;
  padding-bottom: var(--space-6);
  background: transparent;
}

.regulamento-shell {
  max-width: min(100%, 980px);
  margin: 0 auto;
  padding-inline: var(--space-3);
}

/* Tipografia/espaçamento do hero: ver .page-hero em layout.css */

/* Tabs — padrão do guide do cliente (ref. SumUp "Muito além da maquininha")
   Trilho pill cinza (var(--sumup-surface-neutral), padding 8px) com abas pill 48px / SumUp Narrow 600 16px.
   Ativa: fundo branco + texto tinta · Inativa: transparente + borda sutil. */
.regulamento-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto var(--space-3);
  padding: 8px;
  border-radius: 999px;
  background: var(--sumup-surface-neutral);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.regulamento-tabs::-webkit-scrollbar {
  display: none;
}

.regulamento-tab {
  box-sizing: border-box;
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(30, 28, 28, 0.1);
  border-radius: 999px;
  background: transparent;
  color: #3d4743;
  font-family: var(--font-body, "SumUp Narrow", sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
  .regulamento-tab:hover:not(:disabled):not(.is-active) {
    background: rgba(30, 28, 28, 0.07);
    color: var(--sumup-ink);
  }
}

.regulamento-tab.is-active {
  background: #ffffff;
  border-color: rgba(30, 28, 28, 0.1);
  color: var(--sumup-ink-hover);
  box-shadow: none;
}

.regulamento-tab:disabled {
  cursor: not-allowed;
  color: rgba(0, 0, 0, 0.4);
}

.regulamento-tab:focus-visible {
  outline: 2px solid var(--sumup-ink);
  outline-offset: 2px;
}

.regulamento-viewer {
  border-radius: var(--radius-card);
  border: 0px solid rgba(30, 28, 28, 0.2);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: none;
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.regulamento-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, var(--sumup-ink) 0%, var(--sumup-ink-hover) 100%);
}

.regulamento-toolbar__group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.regulamento-toolbar__group--download {
  margin-left: auto;
}

.regulamento-canvas-wrap {
  position: relative;
  min-height: min(72vh, 820px);
  max-height: min(78vh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  padding: 0.75rem 0 4.75rem 0;
}

.regulamento-page-stage {
  position: relative;
  width: fit-content;
  max-width: calc(100% - 1.5rem);
  margin: 0 auto;
}

.regulamento-canvas-wrap canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  box-shadow: 0 12px 28px rgba(30, 28, 28, 0.18);
}

.regulamento-toolbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1.1875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.regulamento-toolbar__btn:hover:not(:disabled) {
  background: rgba(255, 97, 242, 0.22);
  border-color: rgba(255, 97, 242, 0.55);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 97, 242, 0.18);
}

.regulamento-toolbar__btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.regulamento-toolbar__page {
  min-width: 4.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
}

.regulamento-status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: var(--space-3);
  text-align: center;
  color: var(--sumup-ink-subtle);
  background: rgba(255, 255, 255, 0.96);
}

.regulamento-status[hidden] {
  display: none !important;
}

.regulamento-status i {
  font-size: 2rem;
  color: var(--color-primary);
}

.regulamento-status--error {
  color: #8e2018;
}

.regulamento-footer-note {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(30, 28, 28, 0.2);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--sumup-ink-subtle);
  text-align: center;
}

.regulamento-footer-note a {
  color: var(--color-primary-dark);
  font-weight: 700;
}

@media (max-width: 767px) {
  .regulamento-toolbar {
    justify-content: center;
  }

  .regulamento-toolbar__group--download {
    margin-left: 0;
  }

  .regulamento-canvas-wrap {
    min-height: 58vh;
    max-height: 68vh;
    padding: 0.5rem 0;
  }

  .regulamento-page-stage {
    max-width: calc(100% - 0.75rem);
  }
}
