/* Errands pages and request app. Builds on styles.css and colors_and_type.css. */

.errand-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-snap), box-shadow var(--dur-base) var(--ease-snap);
}

.errand-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.errand-card-link {
  margin-top: auto;
  color: var(--brand);
  font-weight: 700;
}

.errand-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.errand-price {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid var(--border);
}

.errand-price--featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.errand-price-name {
  margin: 0;
  color: var(--fg-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
}

.errand-price-amount {
  margin: 6px 0 12px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}

.errand-price p:last-child {
  margin: 0;
  color: var(--fg-muted);
}

.errand-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.errand-areas li {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 600;
}

/* ---------- Request app ---------- */

.errand-app-section {
  padding-top: clamp(32px, 6vw, 56px);
}

.errand-app-shell {
  max-width: 760px;
}

.errand-app-head {
  margin-bottom: 28px;
}

.errand-app-head h1 {
  margin: 4px 0 8px;
}

.errand-install {
  margin-top: 12px;
  min-height: 44px;
}

.errand-ios-hint {
  margin: 12px 0 0;
  color: var(--fg-muted);
}

.errand-form,
.errand-pay {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.errand-form[hidden],
.errand-pay[hidden],
.errand-history[hidden],
.errand-row[hidden],
.errand-field[hidden] {
  display: none;
}

.errand-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.errand-field legend,
.errand-label {
  font-weight: 700;
  padding: 0;
  margin-bottom: 8px;
}

.errand-label {
  margin-bottom: 0;
}

.errand-label em {
  color: var(--fg-subtle);
  font-style: normal;
  font-weight: 500;
}

.errand-field input,
.errand-field textarea,
.errand-field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}

.errand-field textarea {
  resize: vertical;
}

.errand-field input:focus,
.errand-field textarea:focus,
.errand-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

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

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

.errand-type {
  position: relative;
  cursor: pointer;
}

.errand-type input {
  position: absolute;
  opacity: 0;
}

.errand-type span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 14px;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.errand-type strong {
  color: var(--fg);
  font-size: 16px;
}

.errand-type input:checked + span {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}

.errand-type input:focus-visible + span {
  box-shadow: var(--focus-ring);
}

.errand-hint {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
}

.errand-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #FDECEC;
  color: #9B1C1C;
  font-weight: 600;
}

.errand-error[hidden] {
  display: none;
}

.errand-submit {
  width: 100%;
}

.errand-pay h2 {
  margin: 0;
}

.errand-pay .section-copy {
  margin: 0;
}

.errand-pay-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.errand-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px dashed var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--fg);
  font: inherit;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
}

.errand-copy::after {
  content: attr(data-copied);
  color: var(--brand);
  font-family: var(--font-body);
  font-size: 13px;
}

.errand-copy:disabled {
  border-style: solid;
  border-color: var(--border);
  background: transparent;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: default;
}

.errand-linkbtn {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.errand-history {
  margin-top: 32px;
}

.errand-history-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
}

.errand-history-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.errand-history-item {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
}

.errand-history-item p {
  margin: 0;
}

.errand-history-task,
.errand-history-status {
  color: var(--fg-muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .errand-price-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .errand-row,
  .errand-types {
    grid-template-columns: 1fr;
  }
}

.errand-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.errand-pay-form {
  display: grid;
  gap: 16px;
}

.errand-pay:focus,
.errand-done:focus {
  outline: none;
}

.errand-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.errand-help {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  font-size: 15px;
}

.errand-help a {
  color: var(--brand);
  font-weight: 700;
}

/* ---------- Delivery prices, parcel size, live price ---------- */

.errand-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.errand-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.errand-table th,
.errand-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.errand-table tbody tr:last-child th,
.errand-table tbody tr:last-child td {
  border-bottom: 0;
}

.errand-table thead th {
  color: var(--fg-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.errand-table tbody th {
  white-space: nowrap;
}

.errand-table td {
  color: var(--fg-muted);
}

.errand-table .errand-table-num {
  color: var(--fg);
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}

.errand-table thead th:last-child {
  text-align: right;
}

.errand-examples-title {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.errand-examples {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.errand-sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.errand-type--sm span {
  padding: 10px 12px;
  font-size: 13px;
}

.errand-type--sm strong {
  font-size: 15px;
}

.errand-quote {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  font-size: 15px;
}

.errand-quote:empty {
  display: none;
}

.errand-quote p {
  margin: 0;
}

.errand-quote-price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.errand-quote-lines {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg-muted);
  font-size: 14px;
}

.errand-quote-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 260px;
}

@media (max-width: 640px) {
  .errand-sizes {
    grid-template-columns: 1fr;
  }

  .errand-table th,
  .errand-table td {
    padding: 10px;
  }

  .errand-table tbody th {
    white-space: normal;
  }
}

/* Paystack: shown only when the server says it is switched on */
.errand-paystack[hidden],
[data-paybill-block][hidden] {
  display: none;
}

.errand-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
