/* ---------------------------------------------------------
   Order Received / Thank You Page Styles
   --------------------------------------------------------- */

.wpfc-order-received-wrap {
  
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
}

/* Header bar with title + print button */
.wpfc-order-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.wpfc-order-received-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a3fff;
    margin: 0;
}

/* Print button */
.wpfc-order-print-btn {
    border: 1px solid #c3c9ff;
    background: #f3f4ff;
    color: #1a3fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.wpfc-order-print-btn:hover {
    background: #e3e6ff;
    border-color: #9aa5ff;
}

.wpfc-order-print-btn:active {
    transform: scale(0.98);
}

/* --- ORDER META --- */
.wpfc-order-received-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    margin-bottom: 35px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.wpfc-order-meta-item {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.wpfc-order-meta-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.wpfc-order-meta-value {
    font-size: 16px;
    font-weight: 600;
}

/* --- BILLING / SHIPPING SECTION --- */
.wpfc-order-addresses{
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.wpfc-order-address-box{
  flex: 1 1 0;
  min-width: 0;
}

/* Optional: make store column slightly narrower */
.wpfc-order-store-box{
  flex: 0.9 1 0;
}

@media (max-width: 768px){
  .wpfc-order-addresses{
    flex-direction: column;
    gap: 20px;
  }
}


.wpfc-order-item-name{
  font-weight: 600;
  text-align:left;
}

.wpfc-order-item-meta{
  margin-top: 8px;
  text-align:left;
}

.wpfc-order-item-meta-table{
  border-collapse: collapse;
  width: auto;
}

.wpfc-order-item-meta-label{
  padding: 2px 10px 2px 0;
  color: #666;
  font-size: 13px;
  white-space: nowrap;
  vertical-align: top;
}

.wpfc-order-item-meta-value{
  padding: 2px 0;
  font-size: 13px;
  color: #222;
}

.wpfc-order-upload-link{
  display: inline-block;
  margin-right: 10px;
  text-decoration: underline;
}




.wpfc-order-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.wpfc-order-address {
    line-height: 1.6;
    font-size: 15px;
}

.wpfc-order-address div {
    margin-bottom: 4px;
}

/* --- ORDER ITEMS --- */
.wpfc-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 35px;
    font-size: 15px;
}

.wpfc-order-table th {
    background: #eaeaea;
    text-align: left;
    padding: 12px;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
}

.wpfc-order-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.wpfc-order-table-product {
    width: 60%;
}

.wpfc-order-table-qty {
    width: 15%;
    text-align: center;
}

.wpfc-order-table-total {
    width: 25%;
    text-align: right;
}

/* --- LAYOUT FOR ITEMS + TOTALS --- */
.wpfc-order-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.wpfc-order-items {
    flex: 2;
}

.wpfc-order-totals {
    flex: 1;
    padding: 20px;
    background: #f7f8ff;
    border: 1px solid #ccd4ff;
    border-radius: 6px;
}

.wpfc-order-totals-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.wpfc-order-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.wpfc-order-total-row-grand {
    font-size: 18px;
    font-weight: 700;
    border-top: 1px solid #ccc;
    padding-top: 12px;
    margin-top: 12px;
}

.wpfc-order-thankyou-note {
    margin-top: 30px;
    font-size: 14px;
    color: #666;
}


/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .wpfc-order-layout,
    .wpfc-order-addresses {
        flex-direction: column;
    }

    .wpfc-order-received-meta {
        flex-direction: column;
    }

    .wpfc-order-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .wpfc-order-print-btn {
        align-self: flex-start;
    }
}





@media print {

  @page { margin: 10mm; }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  /* Only when our print button triggered print */
  body.wpfc-print-mode {

    /* kill theme/layout that causes the huge top gap */
    #wpadminbar,
    header, nav, footer,
    .site-header, .site-footer,
    .wp-site-blocks,#footer-bottom,#blank-theme-r-search,.page-header,.wpfirefly-a11y-btn,.wpfc-sidecart-toggle,
    .entry-header,
    .wpfc-account-tabs,
    .wpfc-account-wrap > style {
      display: none !important;
    }

    /* most themes wrap content in one of these */
    #page, #content, #primary, main, .site, .site-content {
      margin: 0 !important;
      padding: 0 !important;
    }

    /* invoice should paginate normally */
    .wpfc-order-received-wrap {
      position: static !important;
      margin: 0 !important;
      padding: 0 !important;
      max-width: 100% !important;
    }

    /* don’t print the button + optional invoice-only hides */
    .wpfc-order-print-btn { display: none !important; }
    .wpfc-order-received-title,
    .wpfc-order-upload-link { display: none !important; }

    /* table pagination rules */
    .wpfc-order-table { page-break-inside: auto !important; }
    .wpfc-order-table tr { page-break-inside: avoid !important; }

    /* don’t forbid breaks on giant wrappers */
    .wpfc-order-received-meta,
    .wpfc-order-addresses,
    .wpfc-order-layout,
    .wpfc-order-totals {
      page-break-inside: auto !important;
    }
  }
}



.wpfc-order-history { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.wpfc-order-history-list { margin: 10px 0 0; padding: 0; list-style: none; }
.wpfc-order-history-item { padding: 10px 0; border-top: 1px solid #f1f5f9; }
.wpfc-order-history-item:first-child { border-top: 0; }
.wpfc-order-history-date { font-size: 12px; opacity: .7; margin-bottom: 4px; }
.wpfc-order-history-note { font-size: 13px; line-height: 1.4; }


.wpfc-order-history-meta { display:flex; gap:10px; align-items:center; margin-bottom:4px; }
.wpfc-order-history-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
