/* Music Coast Shop & Private Order Experience — v2.8.0 */

.mc-order-page,
.page-checkout .site-main,
.page-checkout-success .site-main,
.page-checkout-cancel .site-main {
  min-width: 0;
}

.mc-order-page {
  max-width: 1160px;
}

.mc-order-flash {
  max-width: 860px;
  margin: 0 auto var(--space-lg);
}

.mc-order-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1rem, 4vw, 3rem);
  margin: 0 auto clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(1.2rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border-color, var(--border));
}

.mc-order-hero:not(.mc-order-hero-private) {
  display: block;
  max-width: 760px;
  text-align: center;
}

.mc-order-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(2.15rem, 7vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.mc-order-hero p {
  max-width: 700px;
  margin: 0.85rem auto 0;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.65;
}

.mc-order-hero-private p {
  margin-left: 0;
}

.mc-order-kicker {
  margin-bottom: 0.6rem;
  color: var(--text-tertiary, var(--text-secondary));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mc-order-help-grid,
.mc-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: start;
}

.mc-order-help-grid {
  max-width: 1040px;
  margin: 0 auto;
}

.mc-order-recovery-card,
.mc-order-security-card,
.mc-order-main-card,
.mc-order-address-card,
.mc-private-link-card,
.mc-order-action-card {
  border: 1px solid var(--border-color, var(--border));
  box-shadow: none;
}

.mc-order-recovery-card,
.mc-order-main-card,
.mc-order-action-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.mc-order-recovery-card h2,
.mc-order-security-card h2,
.mc-order-main-card h2,
.mc-order-address-card h2,
.mc-private-link-card h2,
.mc-order-action-card h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  letter-spacing: -0.02em;
}

.mc-order-recovery-card > p,
.mc-order-security-card > p,
.mc-private-link-card > p,
.mc-order-action-card > div > p {
  margin: 0 0 1.2rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.mc-order-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mc-order-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.mc-order-field > span {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.mc-order-field small {
  color: var(--text-tertiary, var(--text-secondary));
  font-weight: 500;
}

.mc-order-field input,
.mc-private-link-row input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color, var(--border));
  border-radius: 10px;
  background: var(--bg-primary, var(--surface));
  color: var(--text-primary);
  font: inherit;
}

.mc-order-field input:focus,
.mc-private-link-row input:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.58);
  outline-offset: 2px;
  border-color: rgba(var(--accent-rgb), 0.72);
}

.mc-order-turnstile {
  display: flex;
  justify-content: flex-start;
  max-width: 100%;
  margin-top: 1rem;
  overflow-x: auto;
}

.mc-order-form-actions,
.mc-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1.1rem;
}

.mc-order-form-status,
.mc-copy-feedback {
  min-height: 1.45rem;
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mc-order-form-status.is-error {
  color: #b42318;
}

html[data-theme="dark"] .mc-order-form-status.is-error,
html[data-theme-mode="dark"] .mc-order-form-status.is-error {
  color: #ffaaa0;
}

.mc-order-form-status.is-success,
.mc-copy-feedback.is-success {
  color: #167647;
}

html[data-theme="dark"] .mc-order-form-status.is-success,
html[data-theme-mode="dark"] .mc-order-form-status.is-success,
html[data-theme="dark"] .mc-copy-feedback.is-success,
html[data-theme-mode="dark"] .mc-copy-feedback.is-success {
  color: #83e3b0;
}

.mc-honeypot {
  position: fixed !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.mc-order-security-card {
  padding: clamp(1.2rem, 3vw, 1.7rem);
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.mc-order-security-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color, var(--border));
  border-radius: 50%;
  background: var(--bg-secondary);
}

.mc-order-security-card ul {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.mc-order-security-card li + li {
  margin-top: 0.45rem;
}

.mc-order-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.48rem 0.78rem;
  border: 1px solid var(--border-color, var(--border));
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 800;
}

.mc-order-status-paid,
.mc-order-status-processing,
.mc-order-status-confirmed,
.mc-order-status-fulfilled,
.mc-order-status-shipped,
.mc-order-status-delivered {
  border-color: rgba(28, 160, 92, 0.38);
  background: rgba(28, 160, 92, 0.1);
  color: #12683c;
}

html[data-theme="dark"] .mc-order-status-paid,
html[data-theme="dark"] .mc-order-status-processing,
html[data-theme="dark"] .mc-order-status-confirmed,
html[data-theme="dark"] .mc-order-status-fulfilled,
html[data-theme="dark"] .mc-order-status-shipped,
html[data-theme="dark"] .mc-order-status-delivered {
  color: #90e6b7;
}

.mc-order-status-cancelled,
.mc-order-status-canceled,
.mc-order-status-payment_failed,
.mc-order-status-payment_denied,
.mc-order-status-amount_mismatch,
.mc-order-status-printful_error,
.mc-order-status-refunded,
.mc-order-status-reversed {
  border-color: rgba(194, 59, 52, 0.34);
  background: rgba(194, 59, 52, 0.09);
  color: #9f2f2a;
}

html[data-theme="dark"] .mc-order-status-cancelled,
html[data-theme="dark"] .mc-order-status-canceled,
html[data-theme="dark"] .mc-order-status-payment_failed,
html[data-theme="dark"] .mc-order-status-payment_denied,
html[data-theme="dark"] .mc-order-status-amount_mismatch,
html[data-theme="dark"] .mc-order-status-printful_error,
html[data-theme="dark"] .mc-order-status-refunded,
html[data-theme="dark"] .mc-order-status-reversed {
  color: #ffaaa4;
}

.mc-order-state-notice {
  margin-bottom: 1.25rem;
}

.mc-order-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, var(--border));
}

.mc-order-email-chip {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.mc-order-items {
  display: grid;
  margin-top: 0.35rem;
}

.mc-order-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color, var(--border));
}

.mc-order-item > div {
  display: grid;
  gap: 0.25rem;
}

.mc-order-item span {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.mc-order-totals {
  display: grid;
  gap: 0.72rem;
  max-width: 420px;
  margin: 1.25rem 0 0 auto;
}

.mc-order-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.mc-order-totals span {
  color: var(--text-secondary);
}

.mc-order-totals .mc-order-total {
  margin-top: 0.3rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-color, var(--border));
  font-size: 1.08rem;
}

.mc-order-totals .mc-order-total span {
  color: var(--text-primary);
  font-weight: 700;
}

.mc-order-side-stack {
  display: grid;
  gap: 1rem;
}

.mc-order-address-card,
.mc-private-link-card {
  padding: 1.25rem;
}

.mc-order-address-card address {
  color: var(--text-secondary);
  font-style: normal;
  line-height: 1.65;
}

.mc-private-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.mc-private-link-row input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
}

.mc-order-action-card {
  display: flex;
  justify-content: space-between;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  margin-top: 1rem;
}

.mc-order-action-card > div:first-child {
  max-width: 600px;
}

.mc-order-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.mc-order-actions form {
  margin: 0;
}

/* Shop-directory recovery panel */
.resume-order.mc-order-recovery-entry {
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.mc-order-recovery-entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.mc-order-recovery-entry-head p {
  max-width: 720px;
  margin-bottom: 0;
}

.mc-order-recovery-entry .mc-order-recovery-form {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, var(--border));
}

/* Checkout trust and email note */
.mc-checkout-email-note {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color, var(--border));
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.mc-checkout-email-note svg {
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

/* Checkout result pages */
.mc-checkout-result {
  max-width: 760px;
  margin: 0 auto;
}

.mc-checkout-result .mc-private-link-card {
  margin-top: 1rem;
  text-align: left;
}

@media (max-width: 900px) {
  .mc-order-help-grid,
  .mc-order-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mc-order-security-card {
    position: static;
  }

  .mc-order-action-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .mc-order-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .mc-order-page {
    padding-inline: max(0.9rem, env(safe-area-inset-left));
  }

  .mc-order-hero,
  .mc-order-hero-private {
    display: block;
    text-align: left;
  }

  .mc-order-hero:not(.mc-order-hero-private) {
    text-align: left;
  }

  .mc-order-hero p {
    margin-left: 0;
  }

  .mc-order-status {
    margin-top: 1rem;
  }

  .mc-order-form-grid,
  .mc-order-recovery-entry-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .mc-order-field input,
  .mc-private-link-row input {
    font-size: 16px;
  }

  .mc-private-link-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .mc-order-form-actions,
  .mc-order-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .mc-order-form-actions .btn,
  .mc-order-actions .btn,
  .mc-order-actions form,
  .mc-order-actions form .btn,
  .mc-private-link-row .btn {
    width: 100%;
  }

  .mc-order-card-head {
    display: block;
  }

  .mc-order-email-chip {
    display: block;
    margin-top: 0.65rem;
  }

  .mc-order-item {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-order-page *,
  .mc-order-page *::before,
  .mc-order-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
