/* =====================================================
   ROOT

   Brand palette — matches the Bricksfly login / Connect
   handshake pages (accent #055AEA, ink #121212, muted
   #7F7F7F, surface #F2F5F8, hairline #E4E9EF) so the
   confirmation page reads as the same product.
===================================================== */
.wcs-receipt {
  --brand-accent: #055AEA;
  --brand-accent-dark: #0448bd;
  --brand-ink: #121212;

  --bg-card: #fff;
  --border: #E4E9EF;
  --text: #121212;
  --muted: #7F7F7F;
  --blue: var(--brand-accent);
  --success-bg: rgba(16, 185, 129, 0.10);
  --success-text: #10b981;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =====================================================
   MAIN LAYOUT
===================================================== */
.wcs-receipt .wcf-table-responsive {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Left & Right cards */
.wcs-receipt .aae-store-receipt-product-left,
.wcs-receipt .aae-store-receipt-product-right {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(18, 18, 18, 0.05);
}

/* Width ratio */
.wcs-receipt .aae-store-receipt-product-left {
  flex: 1.6;
}

.wcs-receipt .aae-store-receipt-product-right {
  flex: 1;
}

/* =====================================================
   HEADINGS
===================================================== */
.wcs-receipt h3 {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

/* =====================================================
   TABLE BASE
===================================================== */
.wcs-receipt table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto; /* auto grow column */
}

.wcs-receipt th,
.wcs-receipt td {
  padding: 8px 0;
  font-size: 16px;
  color: var(--text);
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

/* First column (label) */
.wcs-receipt th,
.wcs-receipt td:first-child {
  font-weight: 500;
}

/* Last column (value) */
.wcs-receipt td:last-child {
  text-align: right;
  color: var(--text);
}

/* =====================================================
   REMOVE UNWANTED BORDERS (EDD FIX)
===================================================== */
.wcs-receipt table tbody tr:last-child td {
  border-bottom: 0;
}

/* =====================================================
   STATUS BADGE
===================================================== */
.wcs-receipt .edd_receipt_payment_status.complete {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 14px;
  font-weight: 600;
  @media (max-width: 767px) {
    display: inline;
  }
}
.edd_receipt_payment_status{
    @media (max-width: 767px) {
      margin-bottom: 7px;
  }
}

/* =====================================================
   LICENSE KEY
===================================================== */
.wcs-receipt .edd_sl_license_key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  color: var(--muted);
  word-break: break-all;
}

/* =====================================================
   PRODUCTS TABLE
===================================================== */
.wcs-receipt #edd_purchase_receipt_products th {
  font-weight: 500;
  color: var(--muted);
}

.wcs-receipt #edd_purchase_receipt_products td:last-child {
  text-align: right;
  white-space: nowrap;
}

.wcs-receipt .edd_purchase_receipt_product_name {
  font-weight: 600;
  margin-bottom: 12px;
}

/* Download list */
.wcs-receipt .edd_purchase_receipt_files {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wcs-receipt .edd_purchase_receipt_files li {
  margin-bottom: 10px;
}

.wcs-receipt .edd_download_file_link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
  text-decoration: none;
  text-transform: capitalize;
}
/* =====================================================
   LINKS
===================================================== */
.wcs-receipt a {
  color: var(--brand-accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.wcs-receipt a:hover,
.wcs-receipt a:focus {
  color: var(--brand-accent-dark);
  text-decoration: underline;
}

.wcs-receipt .edd_download_file_link:hover,
.wcs-receipt .edd_download_file_link:focus {
  color: var(--brand-accent-dark);
  text-decoration: none;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 991px) {
  .wcs-receipt .wcf-table-responsive {
    flex-direction: column;
  }

  .wcs-receipt .aae-store-receipt-product-left,
  .wcs-receipt .aae-store-receipt-product-right {
    width: 100%;
    padding: 22px;
  }

  .wcs-receipt td:last-child {
    text-align: left;
  }
}

table#edd_purchase_receipt_products li{
    margin: 0;
}

tr.wcs-receipt-form-divider {
    border-bottom: 1px solid var(--border, #E4E9EF);
}

tr.wcs-receipt-form-divider > td {
    padding-bottom: 20px;
}

tr.wcs-receipt-form-divider + tr > td {
    padding-top: 20px;
}

ul.edd_purchase_receipt_files {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px !important;
}

table thead {
    background: transparent;
}
@media (max-width:767px){
  .wcs-receipt .aae-store-receipt-product-left, .wcs-receipt .aae-store-receipt-product-right{
    background: unset;
  }
  .wcf-table-responsive{
    display: block;
  }
  .aae-store-receipt-product-left{
    background: transparent;
    padding: 0 !important;
  }
  #edd_purchase_receipt{
    background-color: unset;
    border-radius: 0;
    tbody{
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 15px;
      padding-bottom: 15px;
      tr{
          border-bottom: 0;
          box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
          background-color: #fff;
          padding: 15px;
          border-radius: 10px;
          td{
            padding-top: 0;
            padding-bottom: 10px;
          }
      }
    }
  }
  .aae-store-receipt-product-right{
    padding: 0 !important;
    table{
      tbody{
        tr{
          td{
            &:first-child{
              flex-wrap: wrap;
            }
          }
        }
      }
    }
    .edd_purchase_receipt_product_name{
      margin-bottom: 0;
    }
  }
    ul.edd_purchase_receipt_files{
      margin-top: 0 !important;
    }

}
.wcs-receipt .edd_receipt_footer {
    padding-top: 45px;
    @media (max-width:767px){
        padding-top: 25px;
    }
}
.wcs-receipt table#edd_subscription_receipt thead {
    background: #f5f5f5;
}
.wcs-receipt table#edd_subscription_receipt thead th {
    background: #f5f5f5;
    padding: 10px;
}

/* ============================================================
   BricksFly — Confirmation / Receipt
   ============================================================ */
:root{
  --bf-text:#121212; --bf-muted:#525866; --bf-hint:#7F7F7F;
  --bf-accent:#055AEA; --bf-accent-hover:#0448bd;
  --bf-yellow:#FFD53E; --bf-yellow-hover:#f5c716;
  --bf-line:#E4E9EF; --bf-card:#FFFFFF; --bf-bg:#F2F5F8;

  /* spacing scale — overridden per breakpoint at the bottom */
  --bf-col:760px; --bf-card-pad:26px; --bf-row-pad:18px; --bf-gap:24px;
}

/* Background + gutters are scoped to the SUCCESS page only (body.edd-success),
   NOT the whole site or body.edd-page — the checkout page is also edd-page, and
   these global body{}/main padding rules were overriding its own layout. The
   confirmation page is the only one with body.edd-success, so this cleanly
   excludes checkout. */
body.edd-success{
  background-color:var(--bf-bg);
  background-image:linear-gradient(180deg,#eef3fb 0%,var(--bf-bg) 100%);
  background-repeat:no-repeat;
  background-attachment:fixed; /* spreads the ramp so the 2 close hexes don't band */
}

/* ---------- page gutters (theme hard-codes 170px, no breakpoints) ---------- */
body.edd-success main#primary.site-main{
  padding-left:clamp(18px,5vw,120px);
  padding-right:clamp(18px,5vw,120px);
  padding-top:clamp(40px,7vw,88px);
  padding-bottom:clamp(56px,8vw,104px);
}

/* ---------- content column ---------- */
body.edd-success .entry-header,
body.edd-success .entry-content{ max-width:none; }
body.edd-success .entry-header .entry-title,
body.edd-success .entry-content > *{
  max-width:var(--bf-col); margin-left:auto!important; margin-right:auto!important;
}
body.edd-success .entry-header .entry-title{
  color:var(--bf-text); font-size:clamp(26px,5.2vw,34px); line-height:1.2;
  letter-spacing:-.02em; margin-bottom:10px!important;
}
body.edd-success .entry-content > p.wp-block-paragraph:first-of-type{
  color:var(--bf-muted)!important; font-size:16px; line-height:1.6; margin-bottom:36px!important;
}

/* ---------- section eyebrow ---------- */
.edd-blocks__confirmation h3{
  color:var(--bf-text); font-size:12px; font-weight:700; line-height:1;
  letter-spacing:.09em; text-transform:uppercase; margin:0 0 12px;
}

/* ---------- cards ---------- */
.edd-blocks__confirmation .edd-blocks-receipt__items,
.edd-blocks__confirmation .edd-blocks-receipt__totals{
  background:var(--bf-card); border:1px solid var(--bf-line); border-radius:14px;
  padding:5px var(--bf-card-pad); margin:0 auto var(--bf-gap);
  box-shadow:0 1px 2px rgba(18,18,18,.04),0 10px 28px -14px rgba(18,18,18,.12);
}

/* ---------- rows ---------- */
.edd-blocks__confirmation .edd-blocks__row{
  display:flex; align-items:center; justify-content:space-between; gap:28px;
  padding:var(--bf-row-pad) 0; margin:0;
  border-bottom:1px solid var(--bf-line); color:var(--bf-text);
}
.edd-blocks__confirmation .edd-blocks__row:last-child{ border-bottom:0; }
/* even optical inset on all four sides of a card */
.edd-blocks__confirmation .edd-blocks__row:first-child{ padding-top:20px; }
.edd-blocks__confirmation .edd-blocks__row:last-child{ padding-bottom:20px; }

.edd-blocks__confirmation .edd-blocks__row-label{
  flex:0 1 auto; margin:0; color:var(--bf-muted);
  font-size:14px; font-weight:500; line-height:24px;
}
.edd-blocks__confirmation .edd-blocks__row-value{
  flex:1 1 auto; margin:0; text-align:right; color:var(--bf-text);
  font-size:15px; font-weight:600; line-height:24px; font-variant-numeric:tabular-nums;
}
.edd-blocks__confirmation .edd-blocks__row-sublabel{
  color:var(--bf-hint); font-size:12.5px; font-weight:400; line-height:20px;
}

/* order number row */
.edd-blocks__confirmation .edd-blocks-receipt__row-header{ padding:20px 0; }
.edd-blocks__confirmation .edd-blocks-receipt__row-header .edd-blocks__row-label{ font-size:15px; font-weight:600; }
.edd-blocks__confirmation .edd-blocks-receipt__row-header .edd-blocks__row-value{ font-size:19px; font-weight:700; letter-spacing:-.01em; }

/* ---------- product line ---------- */
.edd-blocks__confirmation .edd-blocks-receipt__item{ align-items:flex-start; padding:20px 0; }
.edd-blocks__confirmation .edd-blocks-receipt__item-details{ flex:1 1 auto; min-width:0; }
.edd-blocks__confirmation .edd-blocks-receipt__item .edd-blocks__row-label{
  color:var(--bf-text); font-size:16px; font-weight:600; line-height:24px; margin:0;
}
.edd-blocks__confirmation .edd-blocks-receipt__item-price{
  flex:0 0 auto; text-align:right; color:var(--bf-text);
  font-size:17px; font-weight:700; line-height:24px; white-space:nowrap; font-variant-numeric:tabular-nums;
}

/* ---------- download pills ---------- */
ul.edd_purchase_receipt_files{
  list-style:none; margin:12px 0 0; padding:0;
  display:flex; flex-direction:row!important; flex-wrap:wrap; gap:8px;
}
ul.edd_purchase_receipt_files li.edd_download_file{ list-style:none; margin:0; width:auto!important; flex:0 0 auto; }
a.edd_download_file_link{
  display:inline-block; padding:7px 14px; border:1px solid var(--bf-line); border-radius:999px;
  background:#fff; color:var(--bf-accent); font-size:13px; font-weight:600; line-height:18px;
  text-decoration:none; transition:background .15s ease,border-color .15s ease,color .15s ease;
}
a.edd_download_file_link:hover{ color:var(--bf-accent-hover); border-color:#c9d9f8; background:#f5f8ff; }

/* ---------- links ---------- */
.edd-blocks__confirmation a:not(.edd_download_file_link){
  color:var(--bf-accent); text-decoration:none; font-weight:600;
}
.edd-blocks__confirmation a:not(.edd_download_file_link):hover{ color:var(--bf-accent-hover); text-decoration:underline; }
.edd-blocks__confirmation a:focus-visible,
.edd-blocks__confirmation-details a:focus-visible{ outline:2px solid var(--bf-accent); outline-offset:2px; border-radius:6px; }

/* ---------- status badge ---------- */
.edd-blocks__confirmation .edd_receipt_payment_status{
  flex:0 0 auto; display:inline-block; padding:4px 12px; border-radius:999px;
  font-size:13px; font-weight:600; line-height:18px;
}
.edd-blocks__confirmation .edd_receipt_payment_status.complete{ color:#10b981; background:rgba(16,185,129,.10); }

/* ---------- "License Keys:" becomes a group heading ---------- */
.edd-blocks__confirmation .edd-blocks-receipt__totals .edd-blocks__row:not(:has(.edd-blocks__row-value)){
  padding:22px 0 8px; border-bottom:0;
}
.edd-blocks__confirmation .edd-blocks-receipt__totals .edd-blocks__row:not(:has(.edd-blocks__row-value)) .edd-blocks__row-label{
  color:var(--bf-text); font-size:13.5px; font-weight:700; line-height:20px;
}
.edd-blocks__confirmation .edd-blocks-receipt__row-item--license-key{ align-items:center; padding-top:12px; }
.edd-blocks__confirmation .edd-blocks-receipt__row-item--license-key .edd-blocks__row-value{
  background:none; border:0; padding:0;
}
.edd-blocks__confirmation .edd_sl_license_key{
  display:inline-block;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13.5px; font-weight:500; line-height:20px; color:var(--bf-text);
  background:var(--bf-bg); border:1px solid var(--bf-line); border-radius:8px;
  padding:7px 11px; word-break:break-all; text-align:right;
}

/* ---------- primary button ---------- */
.edd-blocks__confirmation-details{ max-width:var(--bf-col); margin:4px auto 0; text-align:center; }
.edd-blocks__confirmation-details a{
  display:inline-block; min-width:220px; background:var(--bf-yellow); color:var(--bf-muted)!important;
  font-size:15px; font-weight:700; line-height:20px; padding:14px 28px; border-radius:10px;
  text-decoration:none!important; box-shadow:0 1px 2px rgba(18,18,18,.06);
  transition:background .15s ease,transform .15s ease;
}
.edd-blocks__confirmation-details a:hover{ background:var(--bf-yellow-hover); transform:translateY(-1px); }

/* ---------- error notice ---------- */
.edd-blocks__confirmation .edd_errors,
.edd-blocks__confirmation .edd-alert-error{
  color:#b42318; background:#fff5f5; border:1px solid #f3d3d0; border-left:3px solid #dc2626;
  border-radius:8px; padding:14px 16px; margin:0 auto var(--bf-gap); font-size:14px; line-height:1.55;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width:900px){ :root{ --bf-card-pad:22px; --bf-row-pad:17px; --bf-gap:22px; } }

@media (max-width:782px){
  :root{ --bf-card-pad:20px; --bf-row-pad:16px; --bf-gap:20px; }
  body.edd-success .entry-content > p.wp-block-paragraph:first-of-type{ font-size:15px; margin-bottom:28px!important; }
  .edd-blocks__confirmation .edd-blocks-receipt__items,
  .edd-blocks__confirmation .edd-blocks-receipt__totals{ border-radius:12px; }
  /* the key needs its own line before the other rows do */
  .edd-blocks__confirmation .edd-blocks-receipt__row-item--license-key{
    flex-direction:column; align-items:stretch; gap:8px; padding-top:10px;
  }
  .edd-blocks__confirmation .edd_sl_license_key{
    display:block; width:100%; text-align:left;
  }
}

@media (max-width:600px){
  :root{ --bf-card-pad:16px; --bf-row-pad:15px; --bf-gap:18px; }
  .edd-blocks__confirmation .edd-blocks__row{ flex-direction:column; align-items:stretch; gap:5px; }
  .edd-blocks__confirmation .edd-blocks__row-label{ font-size:13px; line-height:20px; }
  .edd-blocks__confirmation .edd-blocks__row-value{ text-align:left; font-size:15px; line-height:22px; }
  .edd-blocks__confirmation .edd-blocks-receipt__row-header{ padding:18px 0; }
  .edd-blocks__confirmation .edd-blocks-receipt__row-header .edd-blocks__row-value{ font-size:18px; }
  .edd-blocks__confirmation .edd_receipt_payment_status{ align-self:flex-start; margin-top:1px; }

  /* name + price stay on one line; downloads span the full card below */
  .edd-blocks__confirmation .edd-blocks-receipt__item{ flex-direction:row; flex-wrap:wrap; gap:0 16px; align-items:flex-start; padding:18px 0; }
  .edd-blocks__confirmation .edd-blocks-receipt__item-details{ display:contents; }
  .edd-blocks__confirmation .edd-blocks-receipt__item .edd-blocks__row-label{ order:1; flex:1 1 55%; font-size:15px; line-height:22px; }
  .edd-blocks__confirmation .edd-blocks-receipt__item-price{ order:2; flex:0 0 auto; font-size:16px; line-height:22px; }
  ul.edd_purchase_receipt_files{
    order:3; flex:0 0 100%; width:100%; margin-top:14px;
    flex-direction:column!important; align-items:stretch; gap:8px;
  }
  ul.edd_purchase_receipt_files li.edd_download_file{ width:100%!important; }
  a.edd_download_file_link{ display:block; width:100%; text-align:center; padding:10px 14px; }

  .edd-blocks__confirmation .edd_sl_license_key{ font-size:12.5px; padding:9px 11px; }
  .edd-blocks__confirmation-details{ margin-top:2px; }
  .edd-blocks__confirmation-details a{ display:block; width:100%; min-width:0; padding:15px 20px; }
}

@media (max-width:380px){
  :root{ --bf-card-pad:14px; }
  .edd-blocks__confirmation .edd_sl_license_key{ font-size:11.5px; }
}
