/* Mobile checkout styling based on Figma */
@media (max-width: 768px) {
  /* Billing details box */
  .woocommerce-checkout .col2-set#customer_details {
    background-color: #E6D6FA;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
  }
  
  .woocommerce-checkout .col2-set#customer_details h3 {
    color: #2F1865;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    border: none;
    text-transform: none;
  }

  /* Hide labels, we use placeholders instead */
  .woocommerce-checkout .woocommerce-billing-fields .form-row label {
    display: none !important;
  }

  /* Keep the checkbox label visible */
  .woocommerce-checkout .woocommerce-billing-fields .form-row:has(input[type="checkbox"]) label,
  .woocommerce-checkout .woocommerce-billing-fields .form-row label:has(input[type="checkbox"]),
  .woocommerce-checkout label[for="billing_brak_pesel"],
  .woocommerce-checkout label.checkbox {
    display: inline-flex !important;
    align-items: center;
    color: #361777;
    font-weight: 600;
    font-size: 16px;
  }

  .woocommerce-checkout input[type="checkbox"] {
    width: 24px;
    height: 24px;
    border: 2px solid #361777;
    border-radius: 6px;
    margin-right: 10px;
    accent-color: #361777;
  }

  /* Text inputs */
  .woocommerce-checkout .woocommerce-billing-fields .form-row input.input-text,
  .woocommerce-checkout .woocommerce-billing-fields .form-row select {
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 14px 25px !important;
    color: #361777 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    box-shadow: none !important;
    margin-bottom: 0px !important;
    height: 56px !important;
  }

  .woocommerce-checkout .woocommerce-billing-fields .form-row input[type="date"] {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding-right: 50px !important;
  }

  .woocommerce-checkout .woocommerce-billing-fields .form-row input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute !important;
    top: 50% !important;
    right: 18px !important;
    width: 24px !important;
    height: 24px !important;
    transform: translateY(-50%) !important;
    opacity: 1 !important;
    background: transparent !important;
  }
  
  /* Select fields adjustment */
  .woocommerce-checkout .woocommerce-billing-fields .form-row select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%238C8C8C" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
  }

  .woocommerce-checkout .woocommerce-billing-fields .form-row {
    margin-bottom: 15px;
    padding: 0;
  }

  /* Phone field with country code styling - approximating for standard layout */
  .woocommerce-checkout .woocommerce-billing-fields #billing_phone_field {
    position: relative;
  }

  /* Order Summary box */
  .woocommerce-checkout h3#order_review_heading {
    color: #2F1865;
    font-size: 24px;
    font-weight: 700;
    text-align: left;
    margin: 0 0 20px;
    border: none;
  }
  
  #order_review.woocommerce-checkout-review-order {
    background-color: #FAF8FE;
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
  }
  
  .woocommerce-checkout .order-summary-box {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 20px;
  }

  /* Remove default border from table */
  .woocommerce-checkout .order-summary-box .woocommerce-checkout-review-order-table {
    border: none;
  }
  
  .woocommerce-checkout .order-summary-box .woocommerce-checkout-review-order-table th {
    color: #2F1865 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: left !important;
    border: none !important;
    padding: 10px 0 !important;
  }
  
  .woocommerce-checkout .order-summary-box .woocommerce-checkout-review-order-table tbody td {
    color: #2F1865 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 20px 0 !important;
    border-bottom: 1px solid #E6D6FA !important;
    border-top: 1px solid #E6D6FA !important;
  }

  .woocommerce-checkout .order-summary-box .woocommerce-checkout-review-order-table tbody td.product-total {
    text-align: right !important;
    font-weight: 600 !important;
  }
  
  .woocommerce-checkout .order-summary-box .woocommerce-checkout-review-order-table tfoot th {
    color: #2F1865 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    padding: 25px 0 0 0 !important;
    text-align: left !important;
  }
  
  .woocommerce-checkout .order-summary-box .woocommerce-checkout-review-order-table tfoot td {
    color: #2F1865 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    padding: 25px 0 0 0 !important;
    text-align: right !important;
    white-space: nowrap;
  }

  .order-summary-box .woocommerce-checkout-review-order-table tr.order-total td bdi {
    font-size: 20px !important;
    font-weight: 600 !important;
  }



  .woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
      margin-bottom: 15px;
  }
  
  .woocommerce-checkout .woocommerce-privacy-policy-text {
      font-size: 14px;
      color: #361777;
      line-height: 1.5;
  }
  
  .woocommerce-checkout .woocommerce-privacy-policy-text a {
      text-decoration: underline;
      color: #361777;
  }

  
}

/* Global styles for coupon and buttons (Desktop + Mobile) */
/* Coupon code link */
#show-coupon-form {
  color: #2F1865 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
}

/* Style the remove coupon icon */
.woocommerce-checkout .woocommerce-remove-coupon {
  text-decoration: none !important;
  color: #2F1865 !important;
  font-weight: 700 !important;
  margin-left: 8px !important;
  font-size: 18px !important;
}

/* Inline Coupon form */
.t24-inline-coupon input.input-text {
  background-color: #ffffff !important;
  border: 1px solid transparent !important;
  border-radius: 30px !important;
  padding: 15px 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  height: 56px !important;
  font-size: 16px !important;
  color: #8C8C8C !important;
  box-shadow: none !important;
  transition: border 0.3s ease;
}

.t24-inline-coupon input.input-text.has-error {
  border: 1px solid #FF4D4F !important; /* Red border on error */
}

.t24-inline-coupon button.button {
  background-color: #E6D6FA !important;
  color: #2F1865 !important;
  border-radius: 30px !important;
  padding: 0 25px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  border: none !important;
  height: 56px !important;
  line-height: 56px !important;
  cursor: pointer;
}



/* Place order button */
.woocommerce-checkout #payment {
  background: transparent !important;
  border-radius: 0 !important;
}

.woocommerce-checkout #payment div.payment_box {
  background-color: #E6D6FA;
  color: #2F1865;
}

.woocommerce-checkout .place-order {
  padding: 0 !important;
}

.woocommerce-checkout .place-order button#place_order {
  background-color: #2F1865 !important;
  color: #ffffff !important;
  border-radius: 30px !important;
  padding: 15px !important;
  width: 100% !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border: none !important;
  margin-top: 20px;
  height: 56px;
}
