/* 
 * Xi Woo Cart Order Complete Styles
 * 
 * Styles for:
 * - Thank you page
 * - Order details
 * - Order summary
 */

/* ==========================================================================
   Thank You Page Layout
   ========================================================================== */

   .cart-thanks {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
  }
  
  .text-center {
    text-align: center;
  }
  
  .thanks-header {
    margin-bottom: 30px;
  }
  
  .thanks-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
  }
  
  /* ==========================================================================
       Order Details Row
       ========================================================================== */
  
  .order-details-row {
    margin-bottom: 30px;
  }
  
  .order-details {
    /* padding: 15px 20px;
    border-radius: 10px; */
  }
  
  .order-detail-items {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
  }
  
  .order-number,
  .order-date,
  .order-total-sum {
    padding: 5px 0;
    font-size: 1rem;
  }
  
  .order-total-sum {
    font-weight: bold;
    font-size: 1rem;
  }
  
  /* ==========================================================================
       Two Column Layout
       ========================================================================== */
  
  .two-column-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .column-order-summary {
    flex: 0 0 100%;
    border-radius: 10px;
  }
  
  .column-addresses {
    flex: 0 0 calc(100%);
    display: flex;
    flex-direction: row;
    gap: 0;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .shipping-column {
    margin-bottom: 20px;
    background-color: #e8e7e7;
    border-radius: 10px;
  }
  
  .billing-column {
    background-color: #e8e7e7;
    border-radius: 10px;
  }
  
  /* ==========================================================================
       Content Boxes
       ========================================================================== */
  
  .order-summary,
  .shipping-details,
  .billing-details {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    height: 100%;
    box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
  }
  
  .order-summary h3,
  .shipping-details h3,
  .billing-details h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #f7f7f7;
    padding-bottom: 10px;
  }
  
  /* ==========================================================================
       Order Items Table
       ========================================================================== */
  
  .order-items {
    width: 100%;
    border-collapse: collapse;
  }
  
  .order-items th,
  .order-items td {
    padding: 10px;
    text-align: right;
    border-bottom: 1px solid #f7f7f7;
    font-size: 1rem;
    font-weight: 500;
  }
  
  .order-items thead th {
    background-color: #f0f0f0;
    font-size: 1rem;
  }
  
  .order-items .order-total {
    font-weight: bold;
    font-size: 1.1em;
  }
  
  .order-items .no-items {
    text-align: center;
    padding: 20px;
    color: #777;
  }
  
  /* ==========================================================================
       Address Styling
       ========================================================================== */
  
  address {
    font-weight: 600;
    font-size: 1rem;
    font-style: normal;
    line-height: 1.6;
  }
  
  /* ==========================================================================
       Continue Shopping Button
       ========================================================================== */
  
  .thank-you-actions {
    text-align: center;
    margin-top: 30px;
  }
  
  .continue-shopping {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4a4a4a;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
  }
  
  .continue-shopping:hover {
    background-color: #333;
    color: white;
  }
  
  /* ==========================================================================
       Error Messages
       ========================================================================== */
  
  .error-message {
    background-color: #fff5f5;
    border: 1px solid #ffbdbd;
    color: #d63939;
    padding: 5px;
    text-align: right;
    border-radius: 10px;
    text-align: center;
  }
  
  /* ==========================================================================
       Sidebar Thank You Content - Enhanced Container Rules with Desktop Fixes
       ========================================================================== */
  
  /* Parent container fix for desktop */
  .xi-cart-totals {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Thank You Sidebar Content - Main Container */
  .xi-cart-thanks-content {
    padding: 15px;
    max-width: 100% !important; /* Force max-width */
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden !important; /* Force hidden overflow */
  }
  
  /* Ensure all direct children stay within bounds */
  .xi-cart-thanks-content > * {
    max-width: 100% !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Handle images to be responsive with stronger rules */
  .xi-cart-thanks-content img,
  .xi-cart-thanks-content figure,
  .xi-cart-thanks-content iframe,
  .xi-cart-thanks-content .wp-block-image img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
  }
  
  /* Ensure tables don't overflow */
  .xi-cart-thanks-content table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    margin-bottom: 1em;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    box-sizing: border-box;
  }
  
  /* Force table cells to behave on larger screens */
  .xi-cart-thanks-content table td,
  .xi-cart-thanks-content table th {
    word-break: break-word;
    white-space: normal;
  }
  
  /* Ensure embedded content stays contained */
  .xi-cart-thanks-content iframe,
  .xi-cart-thanks-content embed,
  .xi-cart-thanks-content object,
  .xi-cart-thanks-content video {
    max-width: 100% !important;
    border: none;
    display: block;
    margin: 0 auto;
  }
  
  /* Shortcode container */
  .xi-cart-thanks-content .thank-you-shortcode {
    max-width: 100% !important;
    overflow-x: auto;
    box-sizing: border-box;
  }
  
  /* Additional stronger rules for shortcode output */
  .xi-cart-thanks-content .thank-you-shortcode > * {
    max-width: 100% !important;
  }
  
  /* Force WordPress content to stay contained */
  .xi-cart-thanks-content .wp-block-image,
  .xi-cart-thanks-content .wp-block-embed,
  .xi-cart-thanks-content .wp-block-gallery,
  .xi-cart-thanks-content .wp-block-media-text {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }
  
  /* Specific fix for WordPress captions that can exceed width */
  .xi-cart-thanks-content .wp-caption {
    max-width: 100% !important;
    width: auto !important;
    box-sizing: border-box;
  }
  
  /* Specific handling for desktop view */
  @media (min-width: 768px) {
    .xi-cart-thanks-content {
      width: 100%;
      box-sizing: border-box;
    }
  
    /* Stronger containment for desktop */
    .xi-cart-thanks-content img {
      max-width: 100% !important;
      width: auto;
      height: auto;
    }
  
    /* Handle large tables better on desktop */
    .xi-cart-thanks-content table {
      display: block;
      overflow-x: auto;
    }
  }
  
  /* Title and subtitle styling with desktop fixes */
  .thank-you-title {
    margin-top: 0;
    font-size: 3rem;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100% !important;
  }
  
  .thank-you-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100% !important;
  }
  
  /* Continue shopping button */
  .xi-cart-thanks-content .continue-shopping-btn {
    display: block;
    background-color: #29648a;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    margin-top: 15px;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    max-width: 100% !important;
  }
  
  .xi-cart-thanks-content .continue-shopping-btn:hover {
    background-color: #194461;
    color: white;
  }
  
  /* ==========================================================================
       Responsive Adjustments
       ========================================================================== */
  
  @media screen and (max-width: 768px) {
    .cart-thanks {
      padding: 0px 10px;
    }
  
    .two-column-layout {
      flex-direction: column;
    }
  
    .column-order-summary,
    .column-addresses {
      width: 100%;
      flex: 0 0 100%;
    }
  
    .order-detail-items {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .order-number,
    .order-date,
    .order-total-sum {
      text-align: center;
      margin-bottom: 10px;
      width: 100%;
      font-size: 1rem;
    }
    address {
      text-align: center;
      font-weight: 600;
      font-size: 1rem;
      font-style: normal;
      line-height: 1.6;
    }
  
    .order-summary,
    .shipping-details,
    .billing-details {
      padding: 20px 2px;
      border-radius: 5px;
      height: 100%;
      background-color: white;
    }
  
    .order-details-row,
    .column-order-summary {
      margin: 10px 0px;
    }
  }
  