/* The order form, with its estimate beside it on wide screens. */

.order-page {
  padding-block: var(--space-6) var(--space-7);
}

.order-page h1 {
  font-size: var(--text-2xl);
}

.order-layout {
  display: grid;
  align-items: start;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

@media (min-width: 900px) {
  .order-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .order-estimate {
    position: sticky;
    top: 96px;
  }
}

.order-form {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.order-form .form-fields {
  margin-top: 0;
}

.order-form [hidden] {
  display: none;
}

.order-form .form-actions {
  margin-top: 0;
}

.order-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.order-estimate {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-accent-surface);
  border: 1px solid var(--color-accent-surface-border);
  border-radius: var(--radius-lg);
  color: var(--color-accent-surface-text);
}

.order-estimate h2 {
  margin: 0;
  font-size: var(--text-lg);
}

.order-estimate p {
  margin: 0;
}

.order-estimate .field__help {
  color: inherit;
}

.order-estimate__price {
  font-size: var(--text-lg);
  font-weight: 600;
}

.credit-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.credit-panel p {
  margin: 0;
}

.order-required {
  color: var(--color-text-subtle);
  font-weight: 400;
}

.order-group-label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.order-choices {
  display: grid;
  gap: var(--space-2);
}

.order-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
}

.order-choice input,
.order-tick input {
  flex: none;
  width: 18px;
  min-height: 0;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--color-accent);
}

.order-tick {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.order-tick .field__help,
.order-tick .order-field-error {
  grid-column: 1 / -1;
}

.order-budget {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.order-budget input {
  flex: 1 1 0;
  min-width: 0;
}

.order-field-error {
  margin: 0;
}

.order-priority {
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
