.hmr-portal {
  --hmr-orange: #f28c28;
  --hmr-orange-dark: #d87311;
  --hmr-text: #242424;
  --hmr-muted: #6f6f6f;
  --hmr-border: #e8e1da;
  --hmr-bg: #fffaf5;
  box-sizing: border-box;
  color: var(--hmr-text);
  font-family: inherit;
  margin: 0 auto;
  max-width: min(1180px, calc(100vw - 72px));
  padding: 24px 18px 48px;
}

.hmr-portal *,
.hmr-portal *::before,
.hmr-portal *::after {
  box-sizing: border-box;
}

.hmr-search,
.hmr-card {
  background: #fff;
  border: 1px solid var(--hmr-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(47, 38, 28, 0.06);
}

.hmr-search {
  margin: 0 auto 22px;
  padding: 24px;
}

.hmr-search h2,
.hmr-card h3,
.hmr-returns summary strong {
  color: var(--hmr-text);
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 18px;
}

.hmr-order-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1.3fr auto;
}

.hmr-portal label span,
.hmr-return-items legend {
  color: var(--hmr-muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.hmr-portal input[type="text"],
.hmr-portal input[type="email"],
.hmr-portal select,
.hmr-portal textarea {
  border: 1px solid var(--hmr-border);
  border-radius: 6px;
  color: var(--hmr-text);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.hmr-portal textarea {
  min-height: 110px;
  resize: vertical;
}

.hmr-portal button,
.hmr-actions a,
.hmr-outline-button {
  align-items: center;
  background: var(--hmr-orange);
  border: 1px solid var(--hmr-orange);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
  transition: 0.15s ease;
}

.hmr-portal button:hover,
.hmr-actions a:hover,
.hmr-outline-button:hover {
  background: var(--hmr-orange-dark);
  color: #fff;
}

.hmr-outline-button {
  background: #fff;
  color: var(--hmr-orange-dark);
  margin-top: 14px;
}

.hmr-outline-button:hover {
  background: var(--hmr-bg);
  color: var(--hmr-orange-dark);
}

.hmr-alert,
.hmr-form-message {
  border-radius: 6px;
  margin: 14px 0 0;
  padding: 12px 14px;
}

.hmr-alert,
.hmr-form-message.is-error {
  background: #fff3f0;
  border: 1px solid #ffd6cc;
  color: #9d2f18;
}

.hmr-form-message.is-success {
  background: #f0fbf4;
  border: 1px solid #bce8c8;
  color: #20743a;
}

.hmr-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.hmr-card {
  margin-bottom: 18px;
  padding: 22px;
}

.hmr-secondary-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.hmr-card-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.hmr-kicker {
  color: var(--hmr-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.hmr-pill,
.hmr-ticket-status {
  background: var(--hmr-bg);
  border: 1px solid #f5d0ad;
  border-radius: 999px;
  color: var(--hmr-orange-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.hmr-order-facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 0;
}

.hmr-order-facts div {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 12px;
}

.hmr-order-facts dt {
  color: var(--hmr-muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.hmr-order-facts dd {
  font-weight: 800;
  margin: 0;
}

.hmr-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hmr-step {
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 1fr;
  padding: 0 0 16px;
  position: relative;
}

.hmr-step:not(:last-child)::after {
  background: #eadfd5;
  content: "";
  height: calc(100% - 24px);
  left: 13px;
  position: absolute;
  top: 28px;
  width: 2px;
}

.hmr-step-dot {
  align-items: center;
  background: #fff;
  border: 2px solid #d8d8d8;
  border-radius: 50%;
  display: flex;
  height: 28px;
  justify-content: center;
  position: relative;
  width: 28px;
  z-index: 1;
}

.hmr-step.is-done .hmr-step-dot,
.hmr-step.is-current .hmr-step-dot {
  background: var(--hmr-orange);
  border-color: var(--hmr-orange);
}

.hmr-step.is-done .hmr-step-dot::after,
.hmr-step.is-current .hmr-step-dot::after {
  color: #fff;
  content: "✓";
  font-size: 15px;
  font-weight: 900;
}

.hmr-step strong {
  display: block;
  margin-bottom: 3px;
}

.hmr-step p,
.hmr-muted,
.hmr-reviews p {
  color: var(--hmr-muted);
  margin: 0;
}

.hmr-reviews {
  align-items: center;
  border-color: #f4c998;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  min-height: 112px;
  padding: 18px;
  text-align: left;
}

.hmr-reviews h3 {
  font-size: 18px;
  margin: 0 0 4px;
}

.hmr-stars {
  color: var(--hmr-orange);
  font-size: 20px;
  letter-spacing: 0;
  white-space: nowrap;
}

.hmr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.hmr-reviews .hmr-actions {
  margin-top: 0;
}

.hmr-reviews .hmr-actions a {
  min-height: 38px;
  padding: 8px 12px;
}

.hmr-support-form,
.hmr-return-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.hmr-returns {
  padding: 0;
}

.hmr-returns summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  min-height: 112px;
  padding: 18px 20px;
}

.hmr-returns summary::-webkit-details-marker {
  display: none;
}

.hmr-returns summary::after {
  align-items: center;
  background: var(--hmr-bg);
  border: 1px solid #f5d0ad;
  border-radius: 999px;
  color: var(--hmr-orange-dark);
  content: "+";
  display: flex;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.hmr-returns[open] summary {
  border-bottom: 1px solid var(--hmr-border);
}

.hmr-returns[open] summary::after {
  content: "-";
}

.hmr-returns summary strong {
  display: block;
  font-size: 18px;
  margin: 0 0 4px;
}

.hmr-returns summary small {
  color: var(--hmr-muted);
  display: block;
  font-size: 13px;
}

.hmr-returns > p,
.hmr-returns .hmr-return-form {
  margin-left: 20px;
  margin-right: 20px;
}

.hmr-returns > p {
  margin-top: 0;
  padding-top: 16px;
}

.hmr-returns .hmr-return-form {
  margin-bottom: 20px;
}

.hmr-ticket {
  border: 1px solid var(--hmr-border);
  border-radius: 6px;
  margin-top: 10px;
  overflow: hidden;
}

.hmr-ticket summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 120px 1fr auto;
  padding: 12px;
}

.hmr-ticket[open] summary {
  border-bottom: 1px solid var(--hmr-border);
}

.hmr-messages {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.hmr-message {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 10px;
}

.hmr-message p {
  margin: 6px 0;
}

.hmr-message small {
  color: var(--hmr-muted);
}

.hmr-return-options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hmr-choice {
  align-items: start;
  border: 1px solid var(--hmr-border);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  padding: 14px;
}

.hmr-choice input {
  margin-top: 4px;
}

.hmr-choice strong,
.hmr-choice small,
.hmr-choice em {
  display: block;
}

.hmr-choice small {
  color: var(--hmr-muted);
  margin-top: 4px;
}

.hmr-choice em {
  color: var(--hmr-text);
  font-style: normal;
  margin-top: 8px;
}

.hmr-return-items {
  border: 1px solid var(--hmr-border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
}

.hmr-return-items label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.hmr-account-portal {
  --hmr-orange: #f28c28;
  --hmr-orange-dark: #d87311;
  --hmr-text: #242424;
  --hmr-muted: #6f6f6f;
  --hmr-border: #e8e1da;
  color: var(--hmr-text, #242424);
  margin-top: 18px;
}

.hmr-account-intro {
  border-bottom: 1px solid var(--hmr-border, #e8e1da);
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.hmr-account-intro h2 {
  font-size: 24px;
  margin: 0 0 8px;
}

.hmr-account-intro p {
  color: var(--hmr-muted, #6f6f6f);
  margin: 0;
}

.hmr-account-orders {
  display: grid;
  gap: 12px;
}

.hmr-account-order {
  align-items: center;
  background: #fff;
  border: 1px solid var(--hmr-border, #e8e1da);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  padding: 14px 16px;
}

.hmr-account-order strong,
.hmr-account-order span,
.hmr-account-order small {
  display: block;
}

.hmr-account-order small {
  color: var(--hmr-muted, #6f6f6f);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hmr-account-button {
  background: var(--hmr-orange, #f28c28);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.hmr-account-button:hover {
  background: var(--hmr-orange-dark, #d87311);
  color: #fff;
}

.hmr-admin-thread {
  display: block;
  max-width: 100%;
}

.hmr-admin-thread summary {
  align-items: baseline;
  color: #2271b1;
  cursor: pointer;
  display: flex;
  gap: 12px;
  font-weight: 600;
}

.hmr-admin-thread[open] {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  margin: 4px 0 8px;
  padding: 10px;
}

.hmr-admin-thread[open] summary {
  margin-bottom: 8px;
}

.hmr-admin-thread summary span {
  flex: 0 0 auto;
}

.hmr-admin-thread summary small {
  color: #646970;
  font-weight: 400;
}

.hmr-admin-thread .hmr-messages {
  max-height: 260px;
  overflow: auto;
  padding: 0;
}

.hmr-admin-thread .hmr-message {
  margin-bottom: 8px;
}

.hmr-admin-reply {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.hmr-admin-reply textarea {
  width: 100%;
}

.hmr-admin-summary-row td {
  color: #646970;
  font-size: 12px;
  padding-bottom: 8px;
  padding-top: 0;
}

@media (max-width: 900px) {
  .hmr-portal {
    max-width: calc(100vw - 24px);
    padding-inline: 8px;
  }

  .hmr-order-form,
  .hmr-grid,
  .hmr-secondary-grid,
  .hmr-order-facts,
  .hmr-return-options {
    grid-template-columns: 1fr;
  }

  .hmr-reviews {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hmr-reviews .hmr-actions {
    justify-content: center;
  }

  .hmr-ticket summary {
    grid-template-columns: 1fr;
  }

  .hmr-account-order {
    grid-template-columns: 1fr;
  }
}
