/* === MEESHO STYLE CHECKOUT v6 === */
:root {
  --msc-purple:   #9c27b0;
  --msc-purple2:  #7b1fa2;
  --msc-purple-lt:#f5eeff;
  --msc-text:     #212121;
  --msc-muted:    #757575;
  --msc-green:    #388e3c;
  --msc-border:   #e0e0e0;
  --msc-bg:       #f5f5f5;
  --msc-white:    #ffffff;
  --msc-r:        8px;
}

/* ── Kill ALL default WC cart UI ── */
.msc-cart-page .woocommerce-cart-form,
.msc-cart-page .cart-collaterals,
.msc-cart-page .wc-proceed-to-checkout,
.msc-cart-page .shop_table,
.msc-cart-page .cart_totals {
  display: none !important;
}

/* ── Kill WC checkout default UI ── */
.msc-checkout-page .woocommerce-billing-fields,
.msc-checkout-page .woocommerce-shipping-fields,
.msc-checkout-page .woocommerce-additional-fields,
.msc-checkout-page #customer_details,
.msc-checkout-page .woocommerce-checkout-review-order,
.msc-checkout-page #payment,
.msc-checkout-page .woocommerce-checkout-review-order-table,
.msc-checkout-page h3#order_review_heading {
  display: none !important;
}

/* ── WC form wrapper reset ── */
.msc-chk-form {
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* ── Hide WC notices/breadcrumbs that leak through ── */
.msc-checkout-page .woocommerce-breadcrumb,
.msc-checkout-page .woocommerce-notices-wrapper:empty {
  display: none !important;
}

/* ════════════════════════════════════════
   TWO-COLUMN LAYOUT
════════════════════════════════════════ */
.msc-cart-wrap,
.msc-checkout-wrap {
  display: flex !important;
  gap: 20px;
  align-items: flex-start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  box-sizing: border-box;
}
.msc-cart-left,
.msc-checkout-left {
  flex: 1 1 0;
  min-width: 0;
}
.msc-cart-right,
.msc-checkout-right {
  flex: 0 0 310px;
  width: 310px;
}

/* ════════════════════════════════════════
   SECTION TITLE
════════════════════════════════════════ */
.msc-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--msc-text);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
}
.msc-summary-section {
  margin-bottom: 16px;
}

/* ════════════════════════════════════════
   ITEM CARD (shared: cart + checkout summary)
════════════════════════════════════════ */
.msc-item-card {
  background: var(--msc-white);
  border: 1px solid var(--msc-border);
  border-radius: var(--msc-r);
  margin-bottom: 12px;
  overflow: hidden;
}

/* Delivery badge — green bar at top of card (step 3) */
.msc-delivery-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid #c8e6c9;
}

/* Item row */
.msc-item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 14px 10px;
  position: relative;
}
.msc-item-thumb {
  width: 70px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--msc-border);
  flex-shrink: 0;
}
.msc-item-info {
  flex: 1;
  min-width: 0;
}
.msc-item-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--msc-text);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.msc-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--msc-text);
  margin-bottom: 3px;
}
.msc-item-returns {
  font-size: 12px;
  color: var(--msc-green);
  font-weight: 500;
  margin-bottom: 3px;
}
.msc-item-meta {
  font-size: 12px;
  color: var(--msc-text);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.msc-qty-input {
  width: 42px;
  height: 26px;
  text-align: center;
  border: 1px solid var(--msc-border);
  border-radius: 4px;
  font-size: 13px;
}
.msc-remove-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--msc-muted) !important;
  text-decoration: none;
}
.msc-remove-btn:hover { color: #c62828 !important; }

/* Seller bar */
.msc-seller-bar {
  font-size: 12px;
  color: var(--msc-muted);
  background: #fafafa;
  border-top: 1px solid var(--msc-border);
  padding: 8px 14px;
}
.msc-seller-bar strong {
  color: var(--msc-text);
  font-weight: 600;
}

/* Purple link */
.msc-purple-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--msc-purple) !important;
  text-decoration: none !important;
  cursor: pointer;
}
.msc-purple-link:hover { text-decoration: underline !important; }

/* EDIT absolute top-right */
.msc-edit-abs {
  position: absolute !important;
  top: 14px;
  right: 14px;
}

/* ════════════════════════════════════════
   PRICE BOX
════════════════════════════════════════ */
.msc-price-box {
  background: var(--msc-white);
  border: 1px solid var(--msc-border);
  border-radius: var(--msc-r);
  padding: 18px 16px;
  position: sticky;
  top: 20px;
}
.msc-price-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--msc-text);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--msc-border);
}
.msc-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--msc-text);
  margin-bottom: 8px;
}
.msc-price-label {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.msc-price-hr {
  border: none;
  border-top: 1px solid var(--msc-border);
  margin: 10px 0 12px;
}
.msc-price-total {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.msc-no-deduct {
  font-size: 11px;
  color: var(--msc-muted);
  text-align: center;
  margin: 6px 0 12px;
  line-height: 1.4;
}

/* Safe box */
.msc-safe-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 10px;
  background: #ede7f6;
  border-radius: 8px;
  margin-top: 10px;
}
.msc-safe-box svg   { flex-shrink: 0; }
.msc-safe-box div   { display: flex; flex-direction: column; gap: 3px; }
.msc-safe-box strong { font-size: 13px; color: #4a148c; font-weight: 700; }
.msc-safe-box span  { font-size: 11px; color: var(--msc-muted); line-height: 1.4; }

/* ════════════════════════════════════════
   SHARED BUTTON
════════════════════════════════════════ */
.msc-btn {
  display: block !important;
  width: 100% !important;
  background: var(--msc-purple) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 13px 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-align: center !important;
  cursor: pointer !important;
  text-decoration: none !important;
  letter-spacing: 0.3px;
  transition: background 0.15s;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.3;
}
.msc-btn:hover    { background: var(--msc-purple2) !important; color: #fff !important; }
.msc-btn:disabled { opacity: 0.7; cursor: not-allowed !important; }

/* ════════════════════════════════════════
   ADDRESS SELECTOR — Step 2
════════════════════════════════════════ */
.msc-addr-selector {
  background: var(--msc-white);
  border: 1px solid var(--msc-border);
  border-radius: var(--msc-r);
  overflow: hidden;
}
.msc-addr-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--msc-border);
}
.msc-addr-selector-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--msc-text);
}
.msc-add-addr-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--msc-purple) !important;
  text-decoration: none !important;
}
.msc-add-addr-link:hover { text-decoration: underline !important; }

/* Address card */
.msc-addr-card {
  border-bottom: 1px solid var(--msc-border);
  cursor: pointer;
  transition: background 0.12s;
}
.msc-addr-card:last-of-type { border-bottom: none; }
.msc-addr-card:hover        { background: #fafafa; }
.msc-addr-card--on          { background: var(--msc-purple-lt) !important; }

/* The form inside each card — no visual impact */
.msc-addr-card form {
  padding: 16px 18px;
  margin: 0;
  background: none;
  border: none;
}

.msc-addr-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Radio dot */
.msc-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.msc-radio--on { border-color: var(--msc-purple); }
.msc-radio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s;
}
.msc-radio--on .msc-radio-dot { background: var(--msc-purple); }

.msc-addr-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--msc-text);
  flex: 1;
}

/* Card body */
.msc-addr-body { padding-left: 28px; }
.msc-addr-line {
  font-size: 13px;
  color: var(--msc-muted);
  line-height: 1.5;
  margin: 0 0 4px;
}
.msc-addr-phone {
  font-size: 13px;
  color: var(--msc-muted);
  margin: 0 0 12px;
}

/* Deliver button */
.msc-deliver-btn {
  margin-top: 14px;
  max-width: 380px;
  padding: 12px 0 !important;
  font-size: 15px !important;
}

.msc-addr-card .msc-deliver-btn { display: none !important; }
.msc-addr-card--on .msc-deliver-btn { display: block !important; }

.msc-addr-empty {
  padding: 24px 18px;
  color: var(--msc-muted);
  text-align: center;
}

/* ════════════════════════════════════════
   CHECKOUT SUMMARY INFO CARDS
════════════════════════════════════════ */
.msc-info-card {
  background: var(--msc-white);
  border: 1px solid var(--msc-border);
  border-radius: var(--msc-r);
  padding: 16px 14px;
  position: relative;
}
.msc-info-pay {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}
.msc-info-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--msc-text);
  margin-bottom: 6px;
}
.msc-info-line {
  font-size: 13px;
  color: var(--msc-muted);
  line-height: 1.5;
  margin-bottom: 3px;
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 768px) {
  .msc-cart-wrap,
  .msc-checkout-wrap {
    flex-direction: column;
    padding: 10px 10px 40px;
  }
  .msc-cart-right,
  .msc-checkout-right {
    flex: 1 1 100%;
    width: 100%;
  }
  .msc-deliver-btn { max-width: 100%; }
  .msc-price-box   { position: static; }
}


.msc-add-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.msc-add-modal-overlay.msc-modal-open { display: flex; }
.msc-add-modal {
  background: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 20px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.msc-add-modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.msc-add-modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 22px; cursor: pointer; color: #666;
}
.msc-modal-form-row { display: flex; gap: 14px; margin-bottom: 14px; }
.msc-modal-form-group { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.msc-modal-form-group.msc-modal-full { flex: 0 0 100%; width: 100%; }
.msc-modal-form-group label { font-size: 12px; color: #666; font-weight: 500; }
.msc-modal-form-group input,
.msc-modal-form-group textarea,
.msc-modal-form-group select {
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}
.msc-modal-form-group textarea { resize: vertical; min-height: 72px; }
.msc-modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.msc-modal-save-btn {
  background: var(--msc-purple);
  color: #fff; border: none;
  border-radius: 6px;
  padding: 11px 28px;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.msc-modal-cancel-btn {
  background: none; border: none;
  color: var(--msc-purple);
  font-size: 14px; font-weight: 600; cursor: pointer; text-transform: uppercase;
}
.msc-modal-msg { font-size: 13px; margin-top: 10px; color: #c0392b; }
@media (max-width: 560px) {
  .msc-modal-form-row { flex-direction: column; }
  .msc-add-modal { padding: 20px 14px 16px; }
}

/* ── Billing same as shipping toggle ── */
.msc-same-billing-row{
    display:flex;align-items:center;gap:10px;
    margin-top:12px;padding:12px 14px;
    background:#f7f7f7;border-radius:6px;
    cursor:pointer;user-select:none;
}
.msc-same-billing-row input[type=checkbox]{
    width:18px;height:18px;accent-color:#9c27b0;cursor:pointer;margin:0;
}
.msc-same-billing-text{font-size:14px;color:#333;font-weight:500}

.msc-custom-billing{
    margin-top:12px;padding:14px;
    background:#fff;border:1px solid #e6e6e6;border-radius:6px;
}
.msc-custom-billing-title{
    margin:0 0 12px;font-size:14px;font-weight:600;color:#333;
}
.msc-custom-billing input,
.msc-custom-billing textarea,
.msc-custom-billing select{
    width:100%;padding:10px 12px;margin-bottom:10px;
    border:1px solid #d4d4d4;border-radius:4px;font-size:14px;
    box-sizing:border-box;background:#fff;
}
.msc-custom-billing input:focus,
.msc-custom-billing textarea:focus,
.msc-custom-billing select:focus{
    outline:none;border-color:#9c27b0;
}
.msc-cb-row{display:flex;gap:10px}
.msc-cb-row > *{flex:1}
@media (max-width:600px){
    .msc-cb-row{flex-direction:column;gap:0}
}


/* ════════════════════════════════════════════════════════
   ORDER SUCCESS / THANK YOU PAGE
════════════════════════════════════════════════════════ */

/* Hide WooCommerce default thank-you UI */
.msc-success-page .woocommerce-order > .woocommerce-thankyou-order-received,
.msc-success-page .woocommerce-order > .woocommerce-order-overview,
.msc-success-page .woocommerce-order > .woocommerce-order-details,
.msc-success-page .woocommerce-order > .woocommerce-customer-details,
.msc-success-page .woocommerce-order > section,
.msc-success-page .woocommerce-order > p {
  display: none !important;
}

.msc-success-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Success Banner ────────────────────────────────── */
.msc-success-banner {
  background: linear-gradient(135deg, #f5eeff 0%, #ffffff 100%);
  border: 1px solid #e8d8f5;
  border-radius: var(--msc-r);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 20px;
}

.msc-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(56, 142, 60, 0.15);
  margin-bottom: 16px;
}

.msc-success-circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: msc-circle 0.6s ease-out forwards;
}

.msc-success-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: msc-check 0.4s 0.5s ease-out forwards;
}

@keyframes msc-circle {
  to { stroke-dashoffset: 0; }
}

@keyframes msc-check {
  to { stroke-dashoffset: 0; }
}

.msc-success-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--msc-text);
  margin: 0 0 8px;
}

.msc-success-sub {
  font-size: 15px;
  color: var(--msc-muted);
  margin: 0 0 24px;
}

.msc-success-sub strong {
  color: var(--msc-purple);
  font-weight: 600;
}

.msc-success-meta {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: var(--msc-r);
  padding: 14px 20px;
  border: 1px solid var(--msc-border);
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.msc-success-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 100px;
}

.msc-success-meta-divider {
  width: 1px;
  height: 32px;
  background: var(--msc-border);
}

.msc-meta-label {
  font-size: 11px;
  color: var(--msc-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.msc-meta-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--msc-text);
}

.msc-meta-purple {
  color: var(--msc-purple) !important;
}

/* ── Grid Layout ─────────────────────────────────────── */
.msc-success-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.msc-success-left {
  flex: 1 1 0;
  min-width: 0;
}

.msc-success-right {
  flex: 0 0 320px;
  width: 320px;
  position: sticky;
  top: 20px;
}

/* ── Cards ───────────────────────────────────────────── */
.msc-success-card {
  background: var(--msc-white);
  border: 1px solid var(--msc-border);
  border-radius: var(--msc-r);
  padding: 18px;
  margin-bottom: 16px;
}

.msc-success-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--msc-text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
}

/* ── Delivery date card ──────────────────────────────── */
.msc-delivery-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f5eeff 100%);
  border-color: #c8e6c9;
}

.msc-delivery-card-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msc-delivery-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msc-delivery-label {
  font-size: 12px;
  color: var(--msc-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.msc-delivery-date {
  font-size: 16px;
  color: var(--msc-text);
  font-weight: 700;
}

/* ── Order items ─────────────────────────────────────── */
.msc-success-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.msc-success-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.msc-success-item:first-of-type {
  padding-top: 0;
}

.msc-success-item-thumb {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--msc-border);
  flex-shrink: 0;
}

.msc-success-item-info {
  flex: 1;
  min-width: 0;
}

.msc-success-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--msc-text);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.msc-success-item-meta {
  font-size: 12px;
  color: var(--msc-muted);
  margin-bottom: 6px;
}

.msc-success-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--msc-text);
}

/* ── Address cards ───────────────────────────────────── */
.msc-success-addr-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--msc-text);
  margin-bottom: 6px;
}

.msc-success-addr-line {
  font-size: 13px;
  color: var(--msc-muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

.msc-success-addr-phone {
  font-size: 13px;
  color: var(--msc-text);
  font-weight: 500;
  margin-top: 4px;
}

.msc-billing-same {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #e8f5e9;
  border: 1px dashed #81c784;
  border-radius: 6px;
}

.msc-billing-same-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msc-billing-same-text {
  font-size: 13px;
  font-weight: 600;
  color: #2e7d32;
}

/* ── Price card ──────────────────────────────────────── */
.msc-price-card .msc-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--msc-text);
  padding: 6px 0;
}

.msc-price-discount {
  color: var(--msc-green) !important;
}

.msc-price-free {
  color: var(--msc-green) !important;
  font-weight: 600;
}

.msc-price-hr {
  border: none;
  border-top: 1px dashed var(--msc-border);
  margin: 10px 0;
}

.msc-price-card .msc-price-total {
  font-size: 16px !important;
  font-weight: 700;
  color: var(--msc-text);
  padding: 8px 0;
}

/* ── Buttons ─────────────────────────────────────────── */
.msc-success-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msc-btn-primary {
  display: block;
  text-align: center;
  background: var(--msc-purple);
  color: #fff !important;
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.15s;
}

.msc-btn-primary:hover {
  background: var(--msc-purple2);
  color: #fff !important;
}

.msc-btn-secondary {
  display: block;
  text-align: center;
  background: #fff;
  color: var(--msc-purple) !important;
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1.5px solid var(--msc-purple);
  transition: background 0.15s;
}

.msc-btn-secondary:hover {
  background: var(--msc-purple-lt);
}

/* ── Safe box ────────────────────────────────────────── */
.msc-price-card .msc-safe-box {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 6px;
}

.msc-price-card .msc-safe-box strong {
  display: block;
  font-size: 13px;
  color: var(--msc-text);
  margin-bottom: 2px;
}

.msc-price-card .msc-safe-box span {
  font-size: 11px;
  color: var(--msc-muted);
  line-height: 1.4;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 820px) {
  .msc-success-grid {
    flex-direction: column;
  }
  .msc-success-right {
    width: 100%;
    flex: 1 1 auto;
    position: static;
  }
  .msc-success-banner {
    padding: 24px 16px;
  }
  .msc-success-title {
    font-size: 22px;
  }
  .msc-success-meta {
    gap: 12px;
    padding: 12px 14px;
  }
  .msc-success-meta-item {
    min-width: 80px;
  }
}

@media (max-width: 480px) {
  .msc-success-meta-divider {
    display: none;
  }
  .msc-success-meta {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .msc-success-meta-item {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--msc-border);
  }
  .msc-success-meta-item:last-child {
    border-bottom: none;
  }
}
/* ════════════════════════════════════════════════════════
   MY ACCOUNT — ORDERS LIST PAGE
════════════════════════════════════════════════════════ */

/* Hide default WC orders table on orders endpoint */
.msc-myaccount-orders .woocommerce-orders-table,
.msc-myaccount-orders .woocommerce-Message,
.msc-myaccount-orders .woocommerce-pagination {
  display: none !important;
}

.msc-myorders-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.msc-myorders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--msc-purple-lt);
}

.msc-myorders-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--msc-text);
  margin: 0;
}

.msc-myorders-count {
  font-size: 13px;
  color: var(--msc-muted);
  background: var(--msc-purple-lt);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.msc-myorders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card link wrapper */
.msc-order-card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: block;
}

.msc-order-card {
  background: #fff;
  border: 1px solid var(--msc-border);
  border-radius: var(--msc-r);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all 0.15s ease;
  position: relative;
}

.msc-order-card-link:hover .msc-order-card {
  border-color: var(--msc-purple);
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.08);
  transform: translateY(-1px);
}

.msc-order-card-img-wrap {
  position: relative;
  flex-shrink: 0;
  width: 70px;
  height: 90px;
}

.msc-order-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--msc-border);
}

.msc-order-card-more {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: var(--msc-purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  border: 2px solid #fff;
  min-width: 28px;
  text-align: center;
}

.msc-order-card-info {
  flex: 1;
  min-width: 0;
}

.msc-order-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.msc-order-card-id {
  font-size: 14px;
  font-weight: 700;
  color: var(--msc-text);
}

.msc-order-card-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.msc-order-card-names {
  font-size: 13px;
  color: var(--msc-text);
  margin-bottom: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.msc-order-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--msc-muted);
}

.msc-order-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msc-order-meta-item svg {
  flex-shrink: 0;
}

.msc-order-meta-dot {
  color: var(--msc-border);
}

.msc-order-meta-total {
  color: var(--msc-text);
  font-weight: 700;
}

.msc-order-card-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--msc-purple-lt);
  transition: background 0.15s;
}

.msc-order-card-link:hover .msc-order-card-arrow {
  background: var(--msc-purple);
}

.msc-order-card-link:hover .msc-order-card-arrow svg path {
  stroke: #fff;
}

/* Empty state */
.msc-myorders-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 1px dashed var(--msc-border);
  border-radius: var(--msc-r);
}

.msc-myorders-empty-icon {
  margin-bottom: 16px;
  opacity: 0.6;
}

.msc-myorders-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--msc-text);
  margin: 0 0 8px;
}

.msc-myorders-empty-sub {
  font-size: 14px;
  color: var(--msc-muted);
  max-width: 360px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.msc-myorders-empty .msc-btn-primary {
  display: inline-block;
  width: auto;
  padding: 12px 28px;
}

/* Pagination */
.msc-myorders-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--msc-border);
}

.msc-myorders-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--msc-border);
  border-radius: 6px;
  color: var(--msc-purple) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s;
}

.msc-myorders-page:hover {
  background: var(--msc-purple-lt);
  border-color: var(--msc-purple);
}

.msc-myorders-page-info {
  font-size: 13px;
  color: var(--msc-muted);
}

/* ════════════════════════════════════════════════════════
   MY ACCOUNT — VIEW ORDER PAGE
════════════════════════════════════════════════════════ */

/* Hide default WC view-order output */
.msc-myaccount-view-order .woocommerce-order-details,
.msc-myaccount-view-order .woocommerce-customer-details,
.msc-myaccount-view-order .woocommerce-MyAccount-content > p:first-child,
.msc-myaccount-view-order h2:not(.msc-view-order-title):not(.msc-success-card-title) {
  display: none !important;
}

.msc-view-order-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 0;
}

.msc-view-order-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--msc-purple) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  margin-bottom: 16px;
  transition: gap 0.15s;
}

.msc-view-order-back:hover {
  gap: 10px;
}

.msc-view-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #f5eeff 0%, #ffffff 100%);
  border: 1px solid #e8d8f5;
  border-radius: var(--msc-r);
  padding: 20px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.msc-view-order-header-left {
  flex: 1;
  min-width: 0;
}

.msc-view-order-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--msc-text);
  margin: 0 0 4px;
}

.msc-view-order-date {
  font-size: 13px;
  color: var(--msc-muted);
  margin: 0;
}

.msc-view-order-status {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Grid */
.msc-view-order-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.msc-view-order-left {
  flex: 1 1 0;
  min-width: 0;
}

.msc-view-order-right {
  flex: 0 0 320px;
  width: 320px;
  position: sticky;
  top: 20px;
}

/* Payment row */
.msc-view-order-payment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--msc-text);
}

.msc-payment-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.msc-payment-paid {
  background: #e8f5e9;
  color: #2e7d32;
}

.msc-payment-pending {
  background: #fff8e1;
  color: #f57f17;
}

.msc-view-order-note {
  font-size: 13px;
  color: var(--msc-text);
  margin: 0;
  font-style: italic;
  line-height: 1.5;
}

.msc-view-order-item-link {
  flex-shrink: 0;
  text-decoration: none !important;
}

/* Downloads */
.msc-download-link {
  display: block;
  padding: 8px 12px;
  background: var(--msc-purple-lt);
  color: var(--msc-purple) !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  margin-bottom: 6px;
}

.msc-download-link:hover {
  background: var(--msc-purple);
  color: #fff !important;
}

/* Order timeline */
.msc-order-timeline-card {
  margin-top: 16px;
}

.msc-order-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.msc-order-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--msc-border);
}

.msc-order-timeline-item {
  position: relative;
  padding-left: 24px;
  padding-bottom: 16px;
}

.msc-order-timeline-item:last-child {
  padding-bottom: 0;
}

.msc-timeline-dot {
  position: absolute;
  left: 2px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--msc-purple);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--msc-purple-lt);
}

.msc-timeline-content {
  font-size: 13px;
}

.msc-timeline-note {
  color: var(--msc-text);
  line-height: 1.5;
}

.msc-timeline-note p {
  margin: 0 0 4px;
}

.msc-timeline-date {
  font-size: 11px;
  color: var(--msc-muted);
  font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 820px) {
  .msc-view-order-grid {
    flex-direction: column;
  }
  .msc-view-order-right {
    width: 100%;
    flex: 1 1 auto;
    position: static;
  }
}

@media (max-width: 600px) {
  .msc-order-card {
    flex-wrap: wrap;
    gap: 10px;
  }
  .msc-order-card-img-wrap {
    width: 60px;
    height: 75px;
  }
  .msc-order-card-arrow {
    display: none;
  }
  .msc-view-order-header {
    padding: 16px;
  }
  .msc-view-order-title {
    font-size: 18px;
  }
  .msc-myorders-title {
    font-size: 18px;
  }
}

/* ════════════════════════════════════════════════════════
   HIDE THEME PAGE TITLES on our custom pages
   The "Orders", "Order #669", "Thank you!" big titles
   come from the theme's page-hero, not our templates.
   Adjust these selectors if your theme uses different ones.
════════════════════════════════════════════════════════ */
.msc-myaccount-orders .entry-title,
.msc-myaccount-orders .page-title,
.msc-myaccount-orders h1.title,
.msc-myaccount-orders .brxe-post-title,
.msc-myaccount-view-order .entry-title,
.msc-myaccount-view-order .page-title,
.msc-myaccount-view-order h1.title,
.msc-myaccount-view-order .brxe-post-title,
.msc-success-page .entry-title,
.msc-success-page .page-title,
.msc-success-page h1.title,
.msc-success-page .brxe-post-title {
    display: none !important;
}
