:root {
  color-scheme: light;
  font-family: "Open Sans", Arial, sans-serif;
  color: #24364b;
  background: #f4f7fb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: #f4f7fb;
}

.site-header {
  width: 100%;
  border-bottom: 1px solid #d5d5d5;
  background: #fff;
}

.site-header__inner {
  width: calc(100% - 40px);
  max-width: 1180px;
  min-height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.site-brand {
  display: inline-flex;
  align-items: center;
}

.site-brand img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 92px;
  object-fit: contain;
}

.bolillero-page {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 20px 42px;
}

.page-heading {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(31, 65, 104, .07);
  text-align: center;
}

.page-heading__icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f0fb;
  color: #28588f;
}

.page-heading__icon .material-icons {
  font-size: 34px;
}

.page-heading h1 {
  margin: 0;
  color: #1f4168;
  font-size: 25px;
  line-height: 1.3;
}

.page-heading p {
  max-width: 600px;
  margin: 9px auto 0;
  color: #607186;
  font-size: 14px;
  line-height: 1.55;
}

.bolillero-card {
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 65, 104, .10);
}

.bolillero-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid #e5ebf2;
  background: #fbfcfe;
}

.bolillero-card__header .material-icons {
  color: #376fa8;
  font-size: 24px;
}

.bolillero-card__header h2 {
  margin: 0;
  color: #263f5b;
  font-size: 17px;
}

.bolillero-form {
  padding: 28px 30px 30px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: #263f5b;
  font-size: 14px;
  font-weight: 700;
}

.form-field label span,
.form-field small {
  color: #6a7889;
  font-size: 12px;
  font-weight: 400;
}

.form-field small {
  display: block;
  margin-top: 6px;
}

.form-field input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 10px 13px;
  border: 1px solid #b8c6d6;
  border-radius: 7px;
  background: #fff;
  color: #24364b;
  font: inherit;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-field input:focus {
  outline: none;
  border-color: #376fa8;
  box-shadow: 0 0 0 3px rgba(55, 111, 168, .16);
}

.form-field input::placeholder {
  color: #8a98a8;
}

.form-error {
  display: none;
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid #e3b6b6;
  border-radius: 7px;
  background: #fff3f3;
  color: #8b2f2f;
  font-size: 13px;
  line-height: 1.45;
}

.form-error.show {
  display: block;
}

#sortearBtn {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border: 1px solid #315f91;
  border-radius: 7px;
  background: #315f91;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

#sortearBtn:hover,
#sortearBtn:focus {
  outline: none;
  border-color: #244b75;
  background: #244b75;
  box-shadow: 0 4px 12px rgba(36, 75, 117, .20);
}

#sortearBtn .material-icons {
  font-size: 20px;
}

.result {
  display: none;
  margin-top: 22px;
  padding: 22px 18px;
  border: 1px solid #bfd1e4;
  border-radius: 9px;
  background: #eef4fa;
  color: #1f4168;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}

.result.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.result strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.4;
}

.result-label {
  display: block;
  color: #536f8d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-footer {
  margin-top: auto;
  padding: 0 20px 24px;
  color: #6a7889;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .site-header__inner {
    width: 100%;
    min-height: 76px;
    justify-content: center;
    padding: 0 12px;
  }

  .site-brand img {
    height: 58px;
  }

  .bolillero-page {
    padding: 30px 14px 34px;
  }

  .page-heading {
    padding: 22px 18px;
  }

  .page-heading h1 {
    font-size: 21px;
  }

  .bolillero-card__header {
    padding: 18px;
  }

  .bolillero-form {
    padding: 22px 18px 24px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .result strong {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
