/* Component order form — scoped to .order-form-* (see layouts/components/single.html) */

.order-form-section {
  --order-form-accent: #d9232d;
}

.order-form-intro {
  margin-bottom: 2rem;
}

.order-form-disclaimer {
  margin: 1rem 0 0;
}

p.order-form-disclaimer {
  color: #6c757d;
  margin: 1.25rem 0 0.5rem;
}

.order-form-root fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 2rem;
}

.order-form-root legend {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  width: auto;
  float: none;
}

.order-form-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.5rem;
}

.order-form-items legend {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.order-form-search {
  flex: 1 1 100%;
}

.order-form-search-input {
  width: 100%;
}

.order-form-items .table-responsive,
.order-form-items .order-form-search-empty {
  flex: 1 1 100%;
}

.order-form-search-empty {
  margin: 0.5rem 0 0;
}

/* Honeypot — kept in the layout but pushed off-screen (not display:none, so bots fill it) */
.order-form-botcheck {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Items table --- */
.order-form-table {
  vertical-align: middle;
}

.order-form-table thead th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
}

.order-form-table th[scope="row"] {
  font-weight: 600;
}

.order-form-item-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.order-form-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background-color: #f1f3f5;
}

.order-form-thumb-link {
  flex: 0 0 auto;
  display: inline-block;
  position: relative;
  cursor: zoom-in;
}

.order-form-thumb-link .order-form-thumb {
  transition: opacity 0.15s ease;
}

.order-form-thumb-link:hover .order-form-thumb,
.order-form-thumb-link:focus-visible .order-form-thumb {
  opacity: 0.85;
}

.order-form-field-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 400;
  margin-bottom: 0.15rem;
}

.order-form-colour-select {
  width: 14rem;
  max-width: 100%;
}

.order-form-row.is-selected {
  background-color: rgba(217, 35, 45, 0.05);
}

.order-form-unit {
  white-space: nowrap;
}

.order-form-qty-cell {
  white-space: normal;
}

.order-form-qty-inner {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.order-form-qty-field,
.order-form-colour {
  display: flex;
  flex-direction: column;
}

.order-form-qty {
  width: 6.5rem;
}

.order-form-line {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.order-form-table tfoot th,
.order-form-table tfoot td {
  border-top: 2px solid #dee2e6;
  font-size: 1.05rem;
  font-weight: 700;
}

.order-form-subtotal {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --- Contact + delivery --- */
.order-form-root label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.order-form-contact .form-control {
  max-width: 32rem;
  margin-bottom: 1rem;
}

.order-form-address {
  margin-top: 0.75rem;
  max-width: 32rem;
}

#of-comment {
  max-width: 40rem;
}

/* --- Validation --- */
.order-form-error {
  color: var(--order-form-accent);
  font-size: 0.9rem;
  margin: 0.25rem 0 0.75rem;
}

.order-form-root [aria-invalid="true"] {
  border-color: var(--order-form-accent);
}

/* --- Submit + status --- */
.order-form-submit {
  margin-top: 0.5rem;
}

.order-form-submit[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.order-form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 0.375rem;
  max-width: 46rem;
}

.order-form-status.is-success {
  background-color: #d1e7dd;
  color: #0f5132;
}

.order-form-status.is-error {
  background-color: #f8d7da;
  color: #842029;
}

.order-form-status a {
  color: inherit;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .order-form-table,
  .order-form-table thead,
  .order-form-table tbody,
  .order-form-table tfoot,
  .order-form-table tr,
  .order-form-table th,
  .order-form-table td {
    display: block;
    width: 100%;
  }

  .order-form-table thead {
    display: none;
  }

  .order-form-row {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .order-form-line::before {
    content: "Line total: ";
    color: #6c757d;
  }
}
