/* HitchHub Trailer Rentals — front end */
.hh {
  --hh-navy: #2b2a68;
  --hh-navy-dark: #1f1e4d;
  --hh-yellow: #ffd23f;
  --hh-slate: #3f4451;
  --hh-line: rgba(43, 42, 104, 0.15);
  --hh-ok: #157f4a;
  --hh-warn: #b45309;
  --hh-err: #b91c1c;
  --hh-radius: 14px;
  color: var(--hh-slate);
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}
.hh *, .hh *::before, .hh *::after { box-sizing: inherit; }
.hh h3, .hh h4 { margin: 0 0 4px; color: var(--hh-navy); line-height: 1.2; }
.hh p { margin: 0 0 8px; }
.hh-muted { color: #5b6172; font-size: 0.9rem; }
.hh-eyebrow { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hh-navy); font-weight: 700; margin: 0; }

/* Buttons */
.hh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--hh-navy); color: #fff !important; border: 2px solid var(--hh-navy);
  border-radius: 8px; padding: 10px 18px; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, background .12s ease;
}
.hh-btn:hover { background: var(--hh-navy-dark); transform: translateY(-1px); }
.hh-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.hh-btn--ghost { background: transparent; color: var(--hh-navy) !important; }
.hh-btn--ghost:hover { background: rgba(43, 42, 104, .08); }
.hh-btn--pay { background: var(--hh-yellow); border-color: #d9a900; color: var(--hh-navy) !important; }
.hh-btn--pay:hover { background: #ffc61a; }

/* Badges */
.hh-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: #eef0f7; color: var(--hh-navy); }
.hh-badge--ok, .hh-badge--completed { background: #dcf5e7; color: var(--hh-ok); }
.hh-badge--warn, .hh-badge--pending { background: #fdf0d5; color: var(--hh-warn); }
.hh-badge--info, .hh-badge--approved { background: #e2e8fb; color: var(--hh-navy); }
.hh-badge--checked_out, .hh-badge--return_pending { background: var(--hh-yellow); color: var(--hh-navy-dark); }
.hh-badge--cancelled { background: #fbe3e3; color: var(--hh-err); }

/* Alerts + hints */
.hh-alert { border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: 0.9rem; font-weight: 600; }
.hh-alert.is-error { background: #fbe3e3; color: var(--hh-err); }
.hh-alert.is-ok { background: #dcf5e7; color: var(--hh-ok); }
.hh-hint { font-size: 0.82rem; margin: 6px 0 0; font-weight: 600; }
.hh-hint.is-ok { color: var(--hh-ok); }
.hh-hint.is-error { color: var(--hh-err); }

/* Fleet grid */
.hh-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hh-card { background: #fff; border: 1px solid var(--hh-line); border-radius: var(--hh-radius); overflow: hidden; display: flex; flex-direction: column; }
.hh-card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.hh-card__body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hh-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hh-specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.85rem; }
.hh-specs li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--hh-line); padding-bottom: 4px; }
.hh-specs strong { color: var(--hh-navy); font-weight: 700; }
.hh-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hh-rate { font-size: 1.4rem; font-weight: 800; color: var(--hh-navy); margin: 0; }
.hh-rate small { font-size: 0.72rem; font-weight: 600; color: #5b6172; margin-left: 4px; }

/* Wizard */
.hh-wizard { background: var(--hh-yellow); border-radius: 20px; padding: 20px; box-shadow: 0 12px 30px rgba(31, 30, 77, .18); }
.hh-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid rgba(31, 30, 77, .2); }
.hh-steps li { font-weight: 600; color: rgba(31, 30, 77, .45); font-size: 1rem; }
.hh-steps li span { font-size: 1.25rem; font-weight: 800; }
.hh-steps li.is-active { color: var(--hh-navy-dark); font-weight: 800; }
.hh-steps li.is-done { color: rgba(31, 30, 77, .7); }

.hh-step { display: none; }
.hh-step.is-active { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hh-field { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 12px; }
.hh-field--wide { grid-column: 1 / -1; grid-template-columns: 1fr; }
.hh-field label { font-weight: 600; color: var(--hh-navy-dark); }
.hh-field input[type="text"], .hh-field input[type="email"], .hh-field input[type="tel"],
.hh-field input[type="date"], .hh-field input[type="time"], .hh-field select {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(31, 30, 77, .18);
  background: #fff; color: var(--hh-slate); font-size: 0.95rem; line-height: 1.3;
}
.hh-field input:focus, .hh-field select:focus { outline: 3px solid rgba(31, 30, 77, .35); outline-offset: 1px; }
.hh-field .hh-hint { grid-column: 2; }
.hh-field--wide .hh-hint { grid-column: 1; }
.hh-signature { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.25rem; }

.hh-addons { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.hh-check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; color: var(--hh-navy-dark); }
.hh-check input { margin-top: 4px; }
.hh-terms { background: rgba(255, 255, 255, .75); border-radius: 10px; padding: 12px 14px; max-height: 170px; overflow-y: auto; font-size: 0.86rem; }
.hh-terms p { margin: 0 0 8px; }

.hh-summary { margin: 0; display: grid; gap: 10px; grid-column: 1 / -1; }
.hh-summary > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.hh-summary dt { font-weight: 600; color: var(--hh-navy-dark); margin: 0; }
.hh-summary dd { margin: 0; font-weight: 600; }
.hh-summary__total dt, .hh-summary__total dd { font-size: 1.15rem; font-weight: 800; color: var(--hh-navy-dark); }

.hh-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.hh-actions--stack { flex-direction: column; align-items: flex-start; }
.hh-actions--wrap { flex-wrap: wrap; justify-content: flex-start; }

/* Tracker */
.hh-lookup { background: var(--hh-yellow); border-radius: 18px; padding: 20px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hh-rental { border: 1px solid var(--hh-line); border-radius: var(--hh-radius); background: #fff; padding: 18px; margin-top: 18px; display: grid; gap: 18px; }
.hh-rental__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hh-rental__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hh-panel { border: 1px solid var(--hh-line); border-radius: 12px; padding: 14px; background: #fafbff; }
.hh-sig { font-family: Georgia, serif; font-style: italic; font-size: 1.3rem; color: var(--hh-navy); margin: 8px 0; }
.hh-uploads { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.hh-photos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.hh-photos figure { margin: 0; border: 1px solid var(--hh-line); border-radius: 8px; overflow: hidden; }
.hh-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.hh-photos figcaption { font-size: 0.65rem; text-transform: uppercase; text-align: center; background: #eef0f7; padding: 2px; letter-spacing: .06em; }

.hh-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hh-timeline li { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; color: #8a90a2; }
.hh-timeline__dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #eef0f7; color: #8a90a2; flex: 0 0 auto; }
.hh-timeline li.is-done .hh-timeline__dot { background: var(--hh-ok); color: #fff; }
.hh-timeline li.is-done { color: var(--hh-ok); }
.hh-timeline li.is-current .hh-timeline__dot { background: var(--hh-navy); color: #fff; }
.hh-timeline li.is-current { color: var(--hh-navy); }

@media (max-width: 640px) {
  .hh-field { grid-template-columns: 1fr; align-items: stretch; gap: 6px; }
  .hh-field .hh-hint { grid-column: 1; }
  .hh-summary > div { grid-template-columns: 1fr; gap: 2px; }
  .hh-steps { gap: 8px 14px; }
  .hh-steps li { font-size: 0.85rem; }
  .hh-actions { flex-direction: column-reverse; align-items: stretch; }
  .hh-actions .hh-btn { width: 100%; }
}
