/* No display rule may ever reveal something the script has hidden. */
.order-page [hidden] {
  display: none !important;
}

/* Focus and summary links must not land underneath the sticky navbar. */
.order-page a,
.order-page input,
.order-page button,
.order-error-summary,
.order-confirmation {
  scroll-margin-top: 7rem;
}

.order-page a {
  color: var(--logoBlue);
}

.order-page a:hover {
  color: var(--darkBlue);
}

.order-page a:focus,
.order-page .btn:focus,
.order-page .form-control:focus,
.order-page .form-check-input:focus,
.order-error-summary:focus,
.order-confirmation:focus {
  outline: 3px solid var(--darkBlue);
  outline-offset: 2px;
  box-shadow: none;
}

/* The shadow paints each band out to the screen edges without widening the page, so zoomed-in visitors keep their horizontal scrollbar. */
.order-header {
  background-color: var(--logoBlue);
  box-shadow: 0 0 0 100vmax var(--logoBlue);
  clip-path: inset(0 -100vmax);
  padding: 0.5rem 1rem;
  text-align: center;
}

.order-title,
.order-subtitle {
  font-family: var(--bodyFont);
  color: white;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
}

.order-title {
  margin-bottom: 0;
  padding-top: 2.5rem;
  font-size: 3rem;
  font-weight: 800;
}

.order-subtitle {
  margin-bottom: 0;
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.order-title-underline {
  height: 50px;
  background-color: var(--darkBlue);
  box-shadow: 0 0 0 100vmax var(--darkBlue);
  clip-path: inset(0 -100vmax);
}

.order-content {
  max-width: 56rem;
  margin: 2rem auto;
  font-family: var(--bodyFont);
  font-size: 1.1rem;
  color: var(--darkBlue);
}

.order-intro {
  margin-bottom: 1.5rem;
}

.order-error-summary {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  background-color: white;
  border: 3px solid #b02a37;
  border-radius: 12px;
}

.order-error-heading {
  font-family: var(--headerFont);
  font-size: 1.5rem;
  color: #b02a37;
}

.order-error-list {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.order-page .order-error-list a {
  color: #b02a37;
}

.order-section {
  margin-bottom: 1.75rem;
  padding: 1.75rem 2rem;
  background-color: white;
  border-radius: 25px;
  box-shadow: 0 0.3rem 0.8rem #D3D3D3;
}

.order-section legend {
  margin-bottom: 0.75rem;
  font-family: var(--headerFont);
  font-size: 1.75rem;
  color: var(--darkBlue);
}

.order-hint {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.order-table {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--darkBlue);
}

/* Not .visually-hidden: Bootstrap 5.1 positions it absolutely, which can break a caption out of the table. */
.order-table caption {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.order-page .order-table th,
.order-page .order-table td {
  padding: 0.6rem 0.5rem;
  vertical-align: middle;
}

.order-table thead th,
.order-table tfoot th,
.order-table tfoot td {
  font-weight: 800;
}

.order-table tbody th {
  font-weight: 400;
  overflow-wrap: anywhere;
}

.order-product-name,
.order-product-code {
  display: block;
}

.order-product-name {
  font-weight: 700;
}

.order-table .order-money,
.order-table tfoot th {
  text-align: right;
}

.order-table td.order-money {
  white-space: nowrap;
}

.order-table .order-quantity-column {
  text-align: center;
}

.order-page .form-label {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* 16px stops iOS from zooming the page when a field takes focus. */
.order-page .form-control {
  min-height: 44px;
  font-size: 16px;
  border-color: #6c757d;
}

.order-page .order-quantity {
  width: 4.5rem;
  margin: 0 auto;
  text-align: center;
}

.order-page .form-check {
  min-height: 1.75rem;
  margin-bottom: 0.5rem;
  padding-left: 2rem;
}

.order-page .form-check .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  margin-left: -2rem;
  border-color: #6c757d;
}

.order-page .form-check .form-check-input:checked {
  background-color: var(--logoBlue);
  border-color: var(--logoBlue);
}

.order-page .form-check-label {
  font-weight: 600;
}

.order-field-error {
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #b02a37;
}

.order-page .form-control.is-invalid,
.order-page .form-check .form-check-input.is-invalid {
  border-color: #b02a37;
}

.order-page .form-check-input.is-invalid ~ .form-check-label {
  color: #b02a37;
}

/* Bootstrap's invalid icon and its padding would leave no room for three digits. */
.order-page .order-quantity.is-invalid {
  padding-right: 0.75rem;
  background-image: none;
  border-width: 2px;
}

.order-payment-instructions {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background-color: rgba(var(--logoBlueRGB), 0.1);
  border-left: 0.35rem solid var(--logoBlue);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.order-payment-instructions p {
  margin-bottom: 0.5rem;
}

.order-payment-instructions p:last-child {
  margin-bottom: 0;
}

.order-payment-fields {
  margin-top: 1rem;
}

.order-actions {
  text-align: center;
}

.order-submit {
  padding: 0.6rem 3rem;
  font-family: var(--bodyFont);
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  background-color: var(--logoBlue);
  border-radius: 10px;
}

.order-submit:hover,
.order-submit:focus,
.order-submit:active {
  color: white;
  background-color: var(--darkBlue);
}

.order-page .order-submit:disabled {
  color: white;
  background-color: #4f6b80;
  opacity: 1;
}

.order-status {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-weight: 600;
}

.order-paper {
  margin: 1.5rem 0 0;
  text-align: center;
}

.order-confirmation {
  max-width: 56rem;
  margin: 2rem auto;
  padding: 2rem;
  font-family: var(--bodyFont);
  font-size: 1.1rem;
  color: var(--darkBlue);
  background-color: white;
  border-radius: 25px;
  box-shadow: 0 0.3rem 0.8rem #D3D3D3;
  overflow-wrap: anywhere;
}

.order-confirmation h1,
.order-confirmation h2 {
  font-family: var(--headerFont);
  color: var(--darkBlue);
}

.order-confirmation h1 {
  font-size: 2.25rem;
}

.order-confirmation h2 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
}

.order-back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
}

@media (max-width: 767.98px) {
  .order-title {
    padding-top: 1.5rem;
    font-size: 2.25rem;
  }

  .order-subtitle {
    padding-bottom: 1rem;
    font-size: 1.2rem;
  }

  .order-title-underline {
    height: 25px;
  }

  .order-section,
  .order-confirmation {
    padding: 1.25rem 0.85rem;
    border-radius: 16px;
  }

  .order-page .order-table th,
  .order-page .order-table td {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  .order-submit {
    width: 100%;
  }
}
