/* Walmart.ca-inspired refund flow */

:root {
  --walmart-blue: #0071ce;
  --walmart-blue-dark: #004f9a;
  --walmart-blue-light: #e6f1fc;
  --walmart-yellow: #ffc220;
  --walmart-green: #2a8703;
  --walmart-green-bg: #eaf3e6;
  --text-primary: #2e2f32;
  --text-secondary: #74767c;
  --border: #e3e4e5;
  --bg-page: #f1f1f2;
  --bg-card: #ffffff;
  --radius: 8px;
  --font: Bogle, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--walmart-blue);
}

/* ── Header ── */
.site-header {
  background: var(--walmart-blue);
  color: #fff;
}

.header-main {
  padding: 12px 0;
}

.header-main-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-block {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.logo-tagline {
  font-size: 11px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 4px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.nav-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.chevron {
  opacity: 0.8;
}

.header-search {
  display: flex;
  align-items: stretch;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.header-search input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 999px 0 0 999px;
  font: inherit;
  font-size: 14px;
  min-width: 0;
}

.header-search input:focus {
  outline: 2px solid var(--walmart-yellow);
  outline-offset: -2px;
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  background: var(--walmart-yellow);
  border: none;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  color: var(--text-primary);
}

.search-btn:hover {
  background: #e6ae00;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.header-icon-link strong {
  font-weight: 700;
}

.header-icon-link:hover {
  text-decoration: underline;
}

.cart-link {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  left: 14px;
  background: var(--walmart-yellow);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-total {
  font-weight: 700;
  font-size: 13px;
}

.header-sub {
  background: #004f9a;
  padding: 8px 0;
  font-size: 13px;
}

.header-sub-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.store-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.store-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.95);
}

.store-item strong {
  font-weight: 700;
}

.lang-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Page top ── */
.page-top {
  background: var(--bg-page);
  padding: 20px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--walmart-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  color: var(--text-secondary);
}

.breadcrumb .current {
  color: var(--text-secondary);
}

.page-title {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
}

/* ── Layout ── */
.main-content {
  flex: 1;
  padding: 0 0 40px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.layout-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Alerts ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}

.alert p {
  margin: 0;
}

.alert-success {
  background: var(--walmart-green-bg);
  color: #1e5c02;
  border: 1px solid #c8dfc0;
}

.alert-success svg {
  color: var(--walmart-green);
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-info {
  background: var(--walmart-blue-light);
  color: #003d7a;
  border: 1px solid #b8d4f0;
}

.alert-info svg {
  color: var(--walmart-blue);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Cards ── */
.content-card,
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.card-title,
.sidebar-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.card-subtitle {
  margin: -4px 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.amount-green {
  color: var(--walmart-green);
  font-weight: 700;
}

.text-green {
  color: var(--walmart-green);
}

/* Order meta (page 2) */
.order-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.order-meta-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.order-meta-item strong {
  font-size: 14px;
}

/* ── Payment options (page 1) ── */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.payment-option {
  cursor: pointer;
  display: block;
  position: relative;
}

.payment-option + .payment-option {
  border-top: 1px solid var(--border);
}

.payment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-option-inner {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transition: background 0.15s;
}

.payment-option:hover .payment-option-inner {
  background: #fafafa;
}

.payment-option input:checked + .payment-option-inner {
  background: var(--walmart-blue-light);
}

.payment-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #babbbe;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.payment-option input:checked + .payment-option-inner .payment-radio {
  border-color: var(--walmart-blue);
}

.payment-option input:checked + .payment-option-inner .payment-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--walmart-blue);
  border-radius: 50%;
}

.payment-logo {
  width: 48px;
  height: 30px;
  object-fit: contain;
}

.payment-logo-interac {
  width: auto;
  height: 28px;
}

.payment-name {
  display: block;
  font-weight: 700;
  font-size: 14px;
}

.payment-meta {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.badge-recommended {
  background: var(--walmart-green-bg);
  color: var(--walmart-green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.secure-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.secure-inline svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.form-disclaimer {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.form-disclaimer a {
  color: var(--walmart-blue);
}

/* ── Sidebar ── */
.detail-list,
.summary-list {
  margin: 0;
  padding: 0;
}

.detail-row,
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.detail-row:last-of-type,
.summary-row:last-of-type {
  border-bottom: none;
}

.detail-row dt,
.summary-row dt {
  color: var(--text-secondary);
  margin: 0;
}

.detail-row dd,
.summary-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.detail-row-total,
.summary-row-total {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--border);
  border-bottom: none;
  font-size: 15px;
}

.info-box {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--walmart-blue-light);
  border-radius: var(--radius);
  font-size: 13px;
  color: #003d7a;
}

.info-box p {
  margin: 0;
}

.info-box svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--walmart-blue);
}

.help-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-links li + li {
  margin-top: 4px;
}

.help-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--walmart-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.help-links a:hover {
  text-decoration: underline;
}

/* ── Forms (page 2) ── */
.details-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-row input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-row input:focus {
  outline: none;
  border-color: var(--walmart-blue);
  box-shadow: 0 0 0 2px rgba(0, 113, 206, 0.2);
}

.form-row input::placeholder {
  color: #aaa;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-with-icons {
  position: relative;
}

.input-with-icons input {
  padding-right: 110px;
}

.inline-logos {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.inline-logos img {
  height: 20px;
  width: auto;
}

/* Interac section */
.interac-hero {
  margin: 0 0 20px;
}

.interac-hero img {
  height: 44px;
  width: auto;
}

.interac-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 16px;
}

.interac-steps {
  margin: 0 0 24px;
  padding-left: 20px;
  font-size: 14px;
}

.interac-steps li {
  margin-bottom: 8px;
}

.interac-steps li:last-child {
  margin-bottom: 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--walmart-blue);
  color: #fff;
}

.btn-primary:not(:disabled):hover {
  background: var(--walmart-blue-dark);
}

.btn-full {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
}

.btn-outline {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.btn-outline:hover {
  background: #f5f5f5;
}

.btn-interac {
  background: #f0ab00;
  color: #1a1a1a;
}

.btn-interac:hover {
  background: #d99900;
}

.page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.help-footer-link {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.help-footer-link a {
  font-weight: 600;
}

.hidden {
  display: none !important;
}

/* ── Cancel order page ── */
.cancel-info-banner {
  margin-bottom: 16px;
}

.cancel-layout {
  margin-bottom: 0;
}

.cancel-card {
  padding: 0;
  overflow: hidden;
}

.order-meta-grid-bordered {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.cancel-items-section {
  padding: 20px 24px 24px;
}

.cancel-items-header {
  margin-bottom: 16px;
}

.cancel-items-header .card-title {
  margin-bottom: 4px;
}

.cancel-items-header .card-subtitle {
  margin: 0;
}

.select-all-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.cancel-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cancel-item {
  border-bottom: 1px solid var(--border);
}

.cancel-item:last-child {
  border-bottom: none;
}

.cancel-item-inner {
  display: grid;
  grid-template-columns: auto 80px 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
}

.cancel-item-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 4px;
}

.cancel-item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cancel-item-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.cancel-item-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.cancel-item-status {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.cancel-item-arrival {
  font-size: 13px;
  color: var(--text-secondary);
}

.cancel-item-price {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.item-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-ui {
  width: 20px;
  height: 20px;
  border: 2px solid #babbbe;
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.item-checkbox:checked + .checkbox-ui {
  background: var(--walmart-blue);
  border-color: var(--walmart-blue);
}

.item-checkbox:checked + .checkbox-ui::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cancel-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cancel-bottom-right {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Footer ── */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--walmart-blue);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .header-main-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .header-left {
    justify-content: space-between;
    width: 100%;
  }

  .header-nav {
    display: none;
  }

  .header-search {
    max-width: none;
    order: 3;
    grid-column: 1 / -1;
  }

  .header-right {
    gap: 12px;
  }

  .layout-grid {
    grid-template-columns: 1fr;
  }

  .layout-sidebar {
    order: -1;
  }

  .order-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .page-title {
    font-size: 26px;
  }

  .content-card,
  .sidebar-card {
    padding: 16px;
  }

  .payment-option-inner {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .payment-logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }

  .payment-details {
    grid-column: 1 / -1;
    padding-left: 34px;
  }

  .badge-recommended {
    grid-column: 1 / -1;
    justify-self: start;
    margin-left: 34px;
  }

  .form-row-split {
    grid-template-columns: 1fr;
  }

  .page-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .page-actions .btn {
    width: 100%;
  }

  .order-meta-grid {
    grid-template-columns: 1fr;
  }

  .store-info {
    flex-direction: column;
    gap: 6px;
  }

  .header-icon-link span:not(.cart-total):not(.cart-badge) {
    display: none;
  }

  .cancel-item-inner {
    grid-template-columns: auto 64px 1fr;
    grid-template-rows: auto auto;
  }

  .cancel-item-image {
    width: 64px;
    height: 64px;
  }

  .cancel-item-price {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .cancel-bottom-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cancel-bottom-right {
    flex-direction: column-reverse;
    width: 100%;
  }

  .cancel-bottom-right .btn,
  .cancel-bottom-actions > .btn {
    width: 100%;
  }
}
