/* Accounts and order history */
.account-shell {
  display: grid;
  min-height: 660px;
  padding-block: 72px 100px;
  place-items: start center;
}

.account-panel {
  width: min(100%, 520px);
  padding: 44px;
  border: 1px solid var(--line);
  background: var(--white);
}

.account-panel--wide {
  width: min(100%, 680px);
}

.account-panel h1,
.account-result h1 {
  margin-bottom: 14px;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.05;
}

.account-intro,
.account-result > p:not(.eyebrow) {
  margin-bottom: 30px;
  color: var(--muted);
}

.account-identity {
  display: grid;
  margin-bottom: 28px;
  padding: 16px 18px;
  border-left: 3px solid var(--heritage-green);
  background: #eef3ef;
  gap: 3px;
}

.account-identity span {
  color: var(--heritage-green);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.account-identity strong {
  overflow-wrap: anywhere;
}

.account-identity small {
  color: var(--muted);
}

.account-form {
  display: grid;
  gap: 20px;
}

.account-form--two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-form--two-column .form-field:nth-of-type(n + 3),
.account-form--two-column .form-errors,
.account-form__submit {
  grid-column: 1 / -1;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field > label {
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #c7cec7;
  border-radius: 2px;
  background: var(--white);
}

.form-field input:focus {
  border-color: var(--heritage-green);
  box-shadow: 0 0 0 3px rgba(26, 71, 49, 0.1);
  outline: 0;
}

.form-field input:disabled {
  background: #eef3ef;
  color: var(--muted);
  cursor: not-allowed;
}

.form-field--error input {
  border-color: var(--error);
}

.form-help {
  color: var(--muted);
  font-size: 11px;
}

.form-help ul,
.form-errors ul,
.errorlist {
  margin: 6px 0 0;
  padding-left: 18px;
}

.form-error,
.form-errors,
.errorlist {
  color: var(--error);
  font-size: 12px;
}

.form-error {
  margin: 0;
}

.account-form__aside {
  margin-top: -8px;
  text-align: right;
}

.account-form__aside a,
.account-switch a,
.account-back,
.text-link {
  color: var(--heritage-green);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #aebbaf;
  text-underline-offset: 4px;
}

.account-switch {
  display: flex;
  margin-top: 30px;
  padding-top: 24px;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.account-back {
  display: inline-block;
  margin-top: 28px;
  font-size: 13px;
}

.account-support-link {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-result__note {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.account-result {
  text-align: center;
}

.account-result .button {
  justify-content: center;
}

.account-dashboard {
  display: grid;
  padding-block: 52px 100px;
  gap: 18px;
}

.account-section {
  display: grid;
  min-height: 150px;
  padding: 30px 34px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  border: 1px solid var(--line);
  background: var(--white);
}

.account-section--muted {
  background: #f0f3ef;
}

.account-section--support {
  border-left: 4px solid var(--heritage-green);
  background: #eef4ef;
}

.account-section h2 {
  margin-bottom: 5px;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 26px;
}

.account-orders-section {
  padding: 34px;
  border: 1px solid var(--line);
  background: #f1f4f0;
}

.account-orders-section--muted {
  background: #f0f3ef;
}

.account-orders-heading {
  display: flex;
  margin-bottom: 24px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.account-orders-heading h2 {
  margin: 0;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 30px;
}

.account-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-order-card {
  display: grid;
  min-width: 0;
  min-height: 152px;
  padding: 16px;
  grid-template-columns: 112px minmax(0, 1fr) 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  gap: 18px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.account-order-card:hover {
  border-color: #aeb9b0;
  box-shadow: var(--shadow-small);
  transform: translateY(-2px);
}

.account-order-card > svg {
  width: 18px;
  height: 18px;
  color: var(--heritage-green);
}

.account-order-card__image {
  display: grid;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border: 1px solid #e1e4df;
  background: #f7f8f5;
  color: var(--heritage-green);
  font-family: var(--font-display);
  font-size: 28px;
  place-items: center;
}

.account-order-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-order-card__body {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.account-order-card__meta,
.account-order-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-order-card__meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.account-order-card__body > strong {
  overflow: hidden;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-order-card__body > small {
  color: var(--muted);
  font-size: 11px;
}

.account-order-card__footer {
  margin-top: 8px;
}

.account-order-card__footer b {
  color: var(--heritage-green);
  font-family: var(--font-mono);
  font-size: 13px;
}

.order-status {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  padding: 5px 8px;
  align-items: center;
  border: 1px solid #b7c8bc;
  border-radius: 3px;
  background: #e7efe9;
  color: var(--heritage-green);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.order-status--pending {
  border-color: #d8bd7b;
  background: #f6edd5;
  color: #684d13;
}

.order-status--payment_review,
.order-status--payment_failed,
.order-status--cancelled,
.order-status--refunded {
  border-color: #d8b0aa;
  background: #f5e4e1;
  color: #762c22;
}

.order-detail-header__row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.order-detail-header__row h1 {
  margin-bottom: 8px;
}

.order-detail-header__row p:last-child {
  margin: 0;
}

.order-detail-layout {
  display: grid;
  padding-block: 48px 100px;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  align-items: start;
  gap: 54px;
}

.order-detail-main {
  display: grid;
  min-width: 0;
  gap: 42px;
}

.order-status-panel,
.order-progress-section,
.order-items-section,
.order-help-section {
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.order-status-panel {
  padding: 32px;
  border: 1px solid #bed0c3;
  border-left: 4px solid var(--heritage-green);
  background: var(--white);
}

.order-status-panel--pending {
  border-color: #dac284;
  border-left-color: var(--patina-gold);
  background: #fbf7ec;
}

.order-status-panel--payment_review,
.order-status-panel--payment_failed,
.order-status-panel--cancelled,
.order-status-panel--refunded {
  border-color: #d9b5af;
  border-left-color: #9d5353;
  background: #fbf3f1;
}

.order-status-panel h2,
.order-progress-section h2,
.order-items-section h2,
.order-help-section h2,
.order-summary-panel h2,
.order-address-panel h2 {
  margin-bottom: 10px;
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 28px;
}

.order-help-section > p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
}

.order-help-actions {
  display: flex;
  margin-top: 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.order-withdrawal-link {
  display: inline-flex;
  min-height: 44px;
  padding-inline: 8px;
  align-items: center;
  color: var(--heritage-green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #aebbaf;
  text-underline-offset: 4px;
}

.order-withdrawal-link:hover {
  color: var(--green-dark);
  text-decoration-color: currentColor;
}

.order-case-list {
  display: grid;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.order-case-list h3 {
  margin: 20px 0 8px;
  color: var(--green-dark);
  font-size: 15px;
}

.order-case-list a {
  display: flex;
  padding-block: 12px;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.order-case-list a:hover strong {
  color: var(--heritage-green);
}

.order-case-list small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.order-status-panel > p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.order-status-panel > .button {
  margin-top: 20px;
}

.order-checkout-actions {
  display: grid;
  max-width: 520px;
  margin-top: 24px;
  grid-template-columns: minmax(0, 1.35fr) minmax(170px, 0.65fr);
  gap: 10px;
}

.order-checkout-actions .checkout-return,
.order-checkout-actions .checkout-cancel-button {
  height: 100%;
}

.order-progress {
  display: grid;
  margin: 28px 0 0;
  padding: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
}

.order-progress li {
  position: relative;
  display: block;
  min-width: 0;
  color: #8b908b;
}

.order-progress li::before {
  position: absolute;
  top: 12px;
  right: 0;
  left: 26px;
  height: 2px;
  background: #d6dad5;
  content: "";
}

.order-progress li:last-child::before {
  display: none;
}

.order-progress li > span {
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  border: 2px solid #c4cac4;
  border-radius: 50%;
  background: var(--paper);
  place-items: center;
}

.order-progress li > span svg {
  width: 14px;
  height: 14px;
}

.order-progress li.is-complete {
  color: var(--heritage-green);
}

.order-progress li.is-complete > span {
  border-color: var(--heritage-green);
  background: var(--heritage-green);
  color: #fff;
}

.order-progress li.is-path-complete::before {
  background: var(--heritage-green);
}

.order-progress li div {
  display: grid;
  min-width: 0;
  padding: 8px 12px 0 0;
  gap: 3px;
}

.order-progress li strong {
  font-size: 11px;
}

.order-progress li small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.order-item-list {
  display: grid;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.order-item {
  display: grid;
  min-width: 0;
  padding-block: 18px;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

.order-item__image {
  display: grid;
  width: 96px;
  height: 96px;
  border: 1px solid #e0e4df;
  background: var(--white);
  place-items: center;
}

.order-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.order-item__body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.order-item__body strong {
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 18px;
}

.order-item__body span,
.order-item__body small {
  color: var(--muted);
  font-size: 11px;
}

.order-item > b {
  color: var(--heritage-green);
  font-family: var(--font-mono);
  font-size: 13px;
}

.order-detail-sidebar {
  position: sticky;
  top: 118px;
  display: grid;
  gap: 14px;
}

.order-summary-panel,
.order-address-panel {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--white);
}

.order-summary-facts {
  margin: 22px 0 0;
}

.order-summary-facts div {
  display: flex;
  padding-block: 10px;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #eceeeb;
  font-size: 12px;
}

.order-summary-facts dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.order-summary-facts .order-summary-facts__total {
  padding-top: 18px;
  border-bottom: 0;
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 800;
}

.order-address-panel address {
  display: grid;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.account-section p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.account-signout {
  padding-top: 10px;
  justify-self: start;
}

.account-signout .text-button {
  color: var(--error);
}
