/* Hemp clone ordering (order-hemp.php) and its admin page (hemp-order/admin.php).
   Builds on css/site.css (colours, type, buttons, form controls and tables). */

.hemp-order {
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(3.5rem, 8vw, 6rem);
}

.hemp-order-narrow {
  max-width: 44rem;
}

.hemp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 560;
  text-decoration: none;
}

.hemp-back:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.hemp-order h1 {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
}

.hemp-order-head .lead {
  color: var(--muted);
}

.hemp-order h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
}

.hemp-order hr + h2 {
  margin-top: 0;
}

/* How many cuttings are left in this round. */
.hemp-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.75rem 0;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.hemp-counter::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.hemp-counter.is-open {
  background: var(--accent-soft);
  color: var(--accent);
}

.hemp-callout {
  margin: 0 0 1.5rem 0;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.hemp-callout > :last-child {
  margin-bottom: 0;
}

.hemp-fine-print {
  color: var(--muted);
  font-size: 0.875rem;
}

/* The Certificate of Analysis, shown in the page. */
.hemp-coa {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hemp-coa-image {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- The order form ---------- */
.hemp-error {
  margin: -0.6rem 0 1.1rem 0;
  color: #b42318;
  font-size: 0.9rem;
  font-weight: 560;
}

.hemp-error-box {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #f0c9c4;
  border-left: 4px solid #b42318;
  border-radius: var(--radius);
  background: #fdf3f2;
  color: var(--ink);
}

.hemp-error-box ul {
  margin: 0.4rem 0 0 0;
}

/* A trap for spam bots: real people never see it. */
.hemp-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hemp-order fieldset {
  margin-bottom: 1.75rem;
}

.hemp-order legend {
  margin-bottom: 0.85rem;
}

/* Suburb, town and postcode side by side once there's room. */
@media (min-width: 640px) {
  .hemp-address-row {
    display: grid;
    grid-template-columns: 1fr 1fr 8rem;
    gap: 1rem;
  }
}

.hemp-checks > label {
  display: flex;
  align-items: flex-start;
  margin: 0 0 0.5rem 0;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  line-height: 1.45;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hemp-checks > label:hover {
  border-color: #b9b8b2;
}

.hemp-checks > label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hemp-checks input {
  margin-top: 0.1em;
}

.hemp-checks input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.hemp-submit {
  margin-top: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
}

@media (max-width: 559px) {
  .hemp-submit {
    width: 100%;
  }
}

/* ---------- Admin ---------- */
.hemp-admin-actions {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .hemp-admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .hemp-admin-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hemp-admin-actions form {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.hemp-admin-actions label {
  margin: 0;
}

.hemp-admin-actions .btn {
  align-self: flex-start;
}

.btn-danger {
  border-color: #b42318;
  background: #fff;
  color: #b42318;
}

.btn-danger:hover {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

table.hemp-orders td,
table.hemp-orders th {
  font-size: 0.875rem;
}

table.hemp-orders form {
  display: inline;
  margin: 0;
}

table.hemp-orders .btn {
  margin: 0 0.25rem 0.35rem 0;
  font-family: inherit;
  cursor: pointer;
}

.hemp-redacted {
  color: var(--muted);
  font-style: italic;
}
