/* =====================================================
   ROOT
===================================================== */
.wcs-receipt {
  --bg-card: #fff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --blue: #2563eb;
  --success-bg: #ecfdf5;
  --success-text: #16a34a;

  font-family: Inter, system-ui, -apple-system, 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-radius: 24px;
  padding: 28px;
}

/* 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: #374151;
}

/* =====================================================
   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(--blue);
  font-weight: 500;
  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 #E4E4E7;
}

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;
}
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;
}