/* 
 * Xi Woo Cart Checkout Steps
 * 
 * Styles for:
 * - Checkout steps progress
 * - Step transitions
 * - Mobile adjustments
 */

/* ==========================================================================
   Checkout Steps Progress
   ========================================================================== */

   .xi-steps-progress {
    display: flex;
    justify-content: space-between; /* Keep space-between for single row */
    align-items: center;
    margin: 32px 0;
    position: relative;
    padding: 8px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    background-color: transparent; /* Modern clean background */
    flex-wrap: nowrap; /* Prevent wrapping */
  }
  
  .xi-steps-progress::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    right: 12px;
    height: 3px;
    background: rgba(12, 38, 51, 0.15); /* base line in #0C2633 with low opacity */
    z-index: 1;
    transform: translateY(-50%);
  }
  
  .xi-steps-progress .step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex-basis: 15%; /* Adjust flex-basis */
    min-width: 90px; /* Adjust min-width */
  }
  
  .xi-steps-progress .step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #0C2633; /* brand primary */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: #0C2633;
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
  }
  
  .xi-steps-progress .step.active .step-circle {
    background: #0C2633; /* brand primary */
    border-color: #0C2633;
    color: #fff;
    font-weight: 700;
  }
  
  .xi-steps-progress .step.completed .step-circle {
    background: #fe6b01; /* brand accent */
    border-color: #fe6b01;
    color: transparent; /* hide number, show checkmark */
  }
  
  .xi-steps-progress .step.completed .step-circle::after {
    content: "\2713"; /* checkmark */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
  }
  
  .xi-steps-progress .step-text {
    color: #0C2633;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 600;
    white-space: nowrap; /* Prevent text wrapping */
    text-align: center; /* Center the text */
  }
  
  .xi-steps-progress .step.active .step-text {
    color: #0C2633;
    font-weight: 700;
  }
  
  .xi-steps-progress .step.completed .step-text {
    color: #fe6b01;
  }
  
  /* ==========================================================================
       Thank You Step
       ========================================================================== */
  
  .xi-cart-wrapper.thank-you-step .xi-cart-container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .xi-cart-wrapper.thank-you-step .xi-cart-totals,
  .xi-cart-wrapper.thank-you-step .xi-cart-navigation {
    display: none;
  }
  
  /* Hide cart elements when on thank you step */
  body.xi-cart-thank-you-step .wc-empty-cart-message,
  body.xi-cart-thank-you-step .return-to-shop {
    display: none !important;
  }
  
  /* ==========================================================================
       Payment Transition Styles
       ========================================================================== */
  
  .xi-payment-simple {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
  }
  
  .xi-simple-status {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
  }
  
  .xi-simple-status p {
    margin: 8px 0;
    padding: 5px;
    color: #666;
  }
  
  .xi-simple-status .status-complete {
    color: #4caf50;
    font-weight: bold;
  }
  
  .xi-simple-status .status-active {
    color: #0066cc;
    font-weight: bold;
  }
  
  .xi-simple-status .status-pending {
    color: #888;
  }
  
  .xi-small {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
  }
  
  .xi-simple-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
  }
  
  /* ==========================================================================
       Responsive Adjustments
       ========================================================================== */
  
  @media (max-width: 768px) {
    .xi-steps-progress {
      margin: 20px 0;
    }
  
    .xi-steps-progress .step-text {
      font-size: 12px; /* Reduce font size */
      max-width: 100%;
      line-height: 1;
      white-space: normal;
    }
  
    .xi-steps-progress .step {
      flex-basis: 18%; /* Adjust flex-basis for smaller screens */
      min-width: 70px; /* Adjust min-width for smaller screens */
    }
  }
  
  @media (max-width: 480px) {
    .xi-steps-progress {
      justify-content: space-between; 
      align-items: flex-start;
      /* Adjusted for even smaller screens */
    }
  
    .xi-steps-progress .step {
      flex-basis: 20%; /* adjusted flex-basis */
      width: calc(100% / 5 - 10px);
      min-width: auto;
    }
    .xi-steps-progress .step-circle
    {
      width: 28px;
      height: 28px;
      font-size: 1rem;
    }

  }
  