.rules-page {
  min-height: 600px;
}

.rules-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.rules-title-row h1 {
  margin: 0;
}

.rules-subtitle {
  margin: 7px 0 0;
  color: #777;
  font-size: 14px;
  line-height: 1.5;
}

.rules-download-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 11px 16px;
  color: #32804a;
  background-color: #eef7f0;
  border: 1px solid #d4e8d9;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
          color 0.2s ease,
          background-color 0.2s ease,
          border-color 0.2s ease;
}

.rules-download-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rules-download-link:hover,
.rules-download-link:focus-visible {
  color: #fff;
  background-color: #32804a;
  border-color: #32804a;
}

.rules-intro {
  margin-bottom: 20px;
  color: #555;
  line-height: 1.7;
}

.rules-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 14px;
  padding: 12px 16px;
  background-color: #f7f8f7;
  border: 1px solid #e5e8e5;
}

.rules-page-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-page-selector-label {
  color: #555;
  font-size: 13px;
  font-weight: 600;
}

/* Formulář je generovaný v proměnné $filtr_form. */
.rules-page-selector #filtr {
  width: auto;
  margin: 0;
}

.rules-page-selector form {
  margin: 0;
}

.rules-page-selector select {
  min-width: 125px;
  height: 38px;
  padding: 0 35px 0 12px;
  color: #333;
  background-color: #fff;
  border: 1px solid #d7ddd8;
  font-size: 14px;
  cursor: pointer;
}

.rules-page-selector select:focus {
  border-color: #32804a;
  outline: 2px solid rgba(50, 128, 74, 0.15);
  outline-offset: 1px;
}

.rules-viewer {
  overflow: hidden;
  background-color: #ecefec;
  border: 1px solid #dfe4df;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

.rules-page {
  position: relative;
}

.rules-page-controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background-color: #fff;
  border-bottom: 1px solid #e2e5e2;
}

.rules-page-control {
  display: flex;
}

.rules-page-control-next {
  justify-content: flex-end;
}

.rules-current-page {
  color: #555;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.rules-page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  color: #32804a;
  background-color: #eef7f0;
  border: 1px solid #d4e8d9;
  border-radius: 50%;
  text-decoration: none;
  transition:
          color 0.2s ease,
          background-color 0.2s ease,
          border-color 0.2s ease;
}

.rules-page-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a.rules-page-arrow:hover,
a.rules-page-arrow:focus-visible {
  color: #fff;
  background-color: #32804a;
  border-color: #32804a;
}

.rules-page-arrow.is-disabled {
  color: #aaa;
  background-color: #f5f5f5;
  border-color: #e5e5e5;
  cursor: default;
}

.rules-page-document {
  padding: 18px;
}

.rules-page-document iframe {
  display: block;
  width: 100%;
  height: 1200px;
  margin: 0 auto;
  background-color: #fff;
  border: 0;
}

@media (max-width: 767px) {
  .rules-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .rules-download-link {
    align-self: stretch;
    justify-content: center;
  }

  .rules-toolbar {
    justify-content: stretch;
  }

  .rules-page-selector {
    justify-content: space-between;
    width: 100%;
  }

  .rules-page-document {
    padding: 8px;
  }

  .rules-page-document iframe {
    height: 78vh;
    min-height: 600px;
  }
}

@media (max-width: 480px) {
  .rules-page-selector-label {
    font-size: 12px;
  }

  .rules-page-controls {
    padding: 8px 10px;
  }

  .rules-page-arrow {
    width: 36px;
    height: 36px;
  }
}
