/* ══════════════════════════════════════════
   ORDER DETAILS PAGE
   woocommerce/order/order-details.php
   woocommerce/order/order-details-customer.php
══════════════════════════════════════════ */
 
/* ──────────────────────────────────────────
   ORDER DETAILS — HEADER BAR
────────────────────────────────────────── */
.ms-od-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
 
.ms-od-title {
  font-family: var(--ff-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: .04em;
  line-height: 1.1;
  margin-bottom: 6px;
}
 
.ms-od-meta {
  font-size: 13px;
  color: var(--muted);
}
.ms-od-meta strong { color: var(--text); }

/* ──────────────────────────────────────────
   ORDER DETAILS — LINE ITEMS TABLE
────────────────────────────────────────── */
.ms-od-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
 
.ms-od-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--text);
}
 
/* Head */
.ms-od-table thead tr {
  border-bottom: 1px solid var(--border);
}
.ms-od-table thead th {
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: none;
}
.ms-od-table thead th.product-total {
  text-align: right;
}
 
/* Body rows — WC injects these via order-details-item.php */
.ms-od-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.ms-od-table tbody tr:last-child {
  border-bottom: none;
}
.ms-od-table tbody tr:hover {
  background: rgba(255,255,255,.015);
}
 
.ms-od-table tbody td {
  padding: 18px 20px;
  vertical-align: middle;
  border: none;
  background: transparent;
}
 
/* Product name cell */
.ms-od-table tbody td.product-name {
  font-weight: 700;
}
.ms-od-table tbody td.product-name a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}
.ms-od-table tbody td.product-name a:hover {
  color: var(--accent);
}
 
/* Quantity × price meta rendered by WC */
.ms-od-table tbody td.product-name .woocommerce-Price-amount {
  color: var(--muted);
  font-weight: 400;
}
 
/* Variation data */
.ms-od-table .wc-item-meta {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.ms-od-table .wc-item-meta li {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 4px;
}
.ms-od-table .wc-item-meta li p {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}
 
/* Purchase note */
.ms-od-table .woocommerce-product-purchase-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.03);
  border-left: 2px solid var(--accent3);
  border-radius: 0 6px 6px 0;
}
 
/* Product total cell */
.ms-od-table tbody td.product-total {
  text-align: right;
}
.ms-od-table tbody td.product-total .woocommerce-Price-amount {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: .03em;
}
 
/* ── Totals footer ── */
.ms-od-totals tr {
  border-top: 1px solid var(--border);
}
.ms-od-totals tr:first-child {
  border-top: 2px solid var(--border);
}
 
.ms-od-totals th,
.ms-od-totals td {
  padding: 13px 20px;
  font-size: 13px;
  background: transparent;
  border: none;
}
.ms-od-totals th {
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  width: 50%;
}
.ms-od-totals td {
  text-align: right;
  color: var(--text);
  font-weight: 700;
}
 
/* Highlight the grand-total row */
.ms-od-total-order_total th,
.ms-od-total-order_total td {
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 2px solid var(--border) !important;
}
.ms-od-total-order_total th {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text);
}
.ms-od-total-order_total td .woocommerce-Price-amount {
  font-family: var(--ff-head);
  font-size: 1.7rem;
  color: var(--accent);
  letter-spacing: .03em;
}
 
/* Discount row — teal */
.ms-od-total-discount td .woocommerce-Price-amount {
  color: var(--accent3);
}
 
/* Customer note row */
.ms-od-note-row td {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}
 
/* ── Order action buttons ── */
.ms-od-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
  margin-bottom: 32px;
}
 
/* ──────────────────────────────────────────
   ORDER DETAILS — CUSTOMER / ADDRESS CARDS
────────────────────────────────────────── */
.ms-od-addresses {
  margin-top: 32px;
}
 
.ms-od-addresses-title {
  font-family: var(--ff-head);
  font-size: 1.3rem;
  letter-spacing: .04em;
  margin-bottom: 16px;
}
 
.ms-od-address-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.ms-od-address-grid.has-shipping {
  grid-template-columns: 1fr 1fr;
}
 
.ms-od-address-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
 
/* Card header with icon */
.ms-od-address-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
 
.ms-od-address-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ms-od-address-icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--addr-color, var(--accent));
  fill: none;
  stroke-width: 1.8;
}
 
.ms-od-address-card-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
 
/* Address body */
.ms-od-address-body {
  padding: 18px 20px;
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
 
/* WC outputs the address as a series of inline elements separated by <br> */
.ms-od-address-body p,
.ms-od-address-body br + br {
  margin: 0;
}
 
.ms-od-address-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
 
/* Phone / email rows with inline icon */
.ms-od-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px !important;
}
.ms-od-contact svg {
  width: 13px;
  height: 13px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
}
.woocommerce-customer-details--phone .ms-od-contact svg { stroke: var(--accent3); }
.woocommerce-customer-details--email .ms-od-contact svg { stroke: var(--accent); }

.woocommerce-order {
	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg);
	min-height: 60vh;
	padding: 48px 24px;
}

.thankyou-card-container {
	display: flex;
	align-items: center;
	justify-content: center;
}
 
/* ── Success card ─────────────────────────────── */
.thankyou-card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.08);
	max-width: 560px;
	width: 100%;
	overflow: hidden;
	animation: cardIn .55s cubic-bezier(.22,.68,0,1.2) both;
}
 
@keyframes cardIn {
	from { opacity: 0; transform: translateY(28px) scale(.97); }
	to   { opacity: 1; transform: translateY(0)  scale(1); }
}
 
/* ── Hero banner ──────────────────────────────── */
.thankyou-hero {
	background: var(--color-ink);
	padding: 15px 0;
	position: relative;
	overflow: hidden;
	text-align: center;
}
 
.thankyou-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 60% 80% at 80% 20%, rgba(201,169,110,.25) 0%, transparent 60%),
		radial-gradient(ellipse 50% 60% at 10% 90%, rgba(201,169,110,.12) 0%, transparent 55%);
	pointer-events: none;
}
 
.thankyou-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	border: 2px solid rgba(201,169,110,.5);
	margin-bottom: 24px;
	position: relative;
}
 
.thankyou-hero h1 {
	font-family: var(--ff-body);
	font-size: clamp(1.6rem, 4vw, 2rem);
	font-weight: 600;
	color: #fff;
	margin: 0 0 10px;
	letter-spacing: -.01em;
}
 
.thankyou-hero p {
	font-size: .95rem;
	color: rgba(255,255,255,.55);
	font-weight: 300;
	margin: 0;
	letter-spacing: .01em;
}
 
/* ── Order details ────────────────────────────── */
.thankyou-details {
	padding: 20px 0;
}
 
.woocommerce ul.order_details {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
}
 
.woocommerce ul.order_details li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 9px;
	border-bottom: 1px solid var(--border);
	font-size: .7rem;
	color: var(--text);
	font-weight: 400;
	margin: 0;
}
 
.woocommerce ul.order_details li:last-child {
	border-bottom: none;
}
 
@keyframes rowIn {
	from { opacity: 0; transform: translateX(-10px); }
	to   { opacity: 1; transform: translateX(0); }
}
 
.woocommerce-order-overview li strong {
	font-weight: 500;
	color: var(--text);
	text-align: right;
}
 
.woocommerce-order-overview__total {
	font-size: 1rem !important;
}
 
.woocommerce-order-overview__total strong {
	font-family: var(--ff-body) !important;
	font-size: 1.25rem !important;
	color: var(--accent) !important;
}
 
/* ── Received / success notice ────────────────── */
.woocommerce-thankyou-order-received,
.woocommerce-order-received p {
	display: none; /* We replace with hero; keep WC hooks intact */
}
 
/* ── Continue shopping CTA ───────────────────── */
.thankyou-cta {
	padding: 0 20px 20px;
	text-align: center;
}
 
.thankyou-cta a.button,
.thankyou-cta a {
	display: inline-block;
	background: var(--bg);
	color: #fff !important;
	text-decoration: none;
	font-family: var(--ff-body);
	font-size: .8rem;
	border: 2px solid var(--text);
	font-weight: 500;
	letter-spacing: .03em;
	text-transform: uppercase;
	padding: 10px 20px;
	border-radius: 999px;
	transition: background .2s, transform .15s;
}
 
.thankyou-cta a.button:hover,
.thankyou-cta a:hover {
	background: #3a3530;
	transform: translateY(-1px);
}
 
/* ── Error state ──────────────────────────────── */
.thankyou-card--error .thankyou-hero {
	background: #2d1a1a;
}
 
.woocommerce-notice--error {
	background: #fff5f5;
	border: 1px solid #f5c6c6;
	border-radius: 10px;
	color: var(--color-error);
	padding: 16px 20px;
	margin: 0 40px 24px;
	font-size: .9rem;
	font-weight: 400;
}
 
.woocommerce-thankyou-order-failed-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	padding: 0 40px 36px;
	flex-wrap: wrap;
}
 
.woocommerce-thankyou-order-failed-actions a.button {
	background: var(--color-error);
	color: #fff !important;
	text-decoration: none;
	font-size: .875rem;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 13px 28px;
	border-radius: 999px;
	transition: opacity .2s;
}
 
.woocommerce-thankyou-order-failed-actions a.button:hover {
	opacity: .85;
}
 
/* ── Responsive ───────────────────────────────── */
@media (max-width: 480px) {
	.thankyou-hero  { padding: 36px 24px 28px; }
	.thankyou-details,
	.thankyou-cta   { padding-left: 24px; padding-right: 24px; }
}
 
/* ──────────────────────────────────────────
   RESPONSIVE — ORDER DETAILS
────────────────────────────────────────── */
@media (max-width: 768px) {
  .ms-od-header { flex-direction: column; gap: 12px; }
 
  .ms-od-table thead { display: none; }
 
  .ms-od-table tbody tr {
/*     display: grid;
    grid-template-columns: 1fr auto; */
    gap: 0;
    padding: 14px 16px;
  }
  .ms-od-table tbody td {
    padding: 0;
    background: transparent;
  }
  .ms-od-table tbody td.product-name  { grid-column: 1; }
  .ms-od-table tbody td.product-total { grid-column: 2; align-self: start; text-align: right; }
 
  .ms-od-totals th,
  .ms-od-totals td { padding: 10px 16px; }
 
  .ms-od-address-grid.has-shipping { grid-template-columns: 1fr; }
}
 
@media (max-width: 480px) {
  .ms-od-table-wrap { border-radius: 10px; }
  .ms-od-address-card { border-radius: 10px; }
  .ms-od-actions { flex-direction: column; }
  .ms-od-actions .btn { width: 100%; justify-content: center; }
}
 