/* Visualizador PDF do regulamento — layout verde Fundação Bradesco */

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

.regulamento-viewer {
  border-radius: 1.5rem;
  border: 1px solid var(--c-navy);
  background: var(--c-white);
  box-shadow: var(--shadow);
  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(232, 192, 90, 0.35);
  background: linear-gradient(180deg, var(--c-forest-2) 0%, var(--c-forest) 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: linear-gradient(180deg, rgba(246, 241, 232, 0.96) 0%, rgba(239, 232, 216, 0.98) 100%);
  padding: 0.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(3, 66, 8, 0.16);
}

.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-sans);
  font-size: 1.05rem;
  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(232, 192, 90, 0.28);
  border-color: rgba(232, 192, 90, 0.7);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(232, 192, 90, 0.22);
}

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

.regulamento-toolbar__page {
  min-width: 4.5rem;
  font-size: 1rem;
  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: 24px;
  text-align: center;
  color: var(--c-muted);
  background: rgba(255, 255, 255, 0.96);
}

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

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

.regulamento-status--error {
  color: var(--c-error);
}

.regulamento-status--error i {
  color: var(--c-error);
}

@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);
  }
}
