/* Checkout Page Custom Styles */
/* Remove default WooCommerce styles and apply custom Tailwind-compatible styles */

.woocommerce {
  width: 100% !important;
}

.entry-header{
	display:none;
}

.entry-title, .entry-footer{
	display : none !important;
}
#cart-destination-field {
  margin-top: 1rem;
}

.cart-destination-example {
  margin-top: 0.5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #dbeafe;
  background-color: #eff6ff;
  color: #1f2937;
  font-size: 0.875rem;
  line-height: 1.4;
  border-radius: 0.5rem;
}

.cart-destination-example strong {
  color: #1d4ed8;
}

/* Custom coupon button style */
.form-row button {
  background-color: #fff;
  color: #4f46e5;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 1.5rem;
  margin-top: 0.7rem;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
}

.form-row button:hover,
.form-row button:focus {
  background-color: #6366f1;
  color: #fff;
  border-color: #6366f1;
  outline: none;
}

.woocommerce-info,
.checkout_coupon {
  margin: 0 auto;
  max-width: 1280px !important;
}
/* Main checkout form container */
.checkout.woocommerce-checkout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Customer details grid layout */
.col2-set {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .col2-set {
    grid-template-columns: 2fr 1fr;
  }
}

.col-1,
.col-2 {
  width: 100%;
}

/* Billing and Shipping Fields */
.woocommerce-billing-fields,
.woocommerce-shipping-fields {
  margin-bottom: 2rem;
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Field wrapper */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Form rows */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.form-row-first {
  grid-column: span 1;
}

.form-row-last {
  grid-column: span 1;
}

.form-row-wide {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .form-row-first {
    grid-column: span 1;
  }

  .form-row-last {
    grid-column: span 1;
  }
}

/* Labels */
.form-row label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin: 0;
}

.form-row .required {
  color: #ef4444;
}

.form-row .optional {
  color: #6b7280;
  font-weight: normal;
}

/* Input fields */
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #111827;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus,
.form-row input[type="tel"]:focus,
.form-row input[type="password"]:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row textarea {
  min-height: 80px;
  resize: vertical;
}

/* Select2 dropdown styling */
.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 42px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  padding: 0.625rem 0.75rem !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease-in-out !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus
  .select2-selection--single {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
  outline: none !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 42px !important;
  padding: 0 !important;
  color: #111827 !important;
  font-size: 0.875rem !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 40px !important;
  right: 10px !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow
  b {
  border-color: #6b7280 transparent transparent transparent !important;
  border-width: 5px 5px 0 5px !important;
  margin-top: -2.5px !important;
}

.select2-container--default.select2-container--open
  .select2-selection--single
  .select2-selection__arrow
  b {
  border-color: transparent transparent #6b7280 transparent !important;
  border-width: 0 5px 5px 5px !important;
  margin-top: -2.5px !important;
}

.select2-dropdown {
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  margin-top: 4px !important;
}

.select2-results__option {
  padding: 0.625rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: #111827 !important;
}

.select2-results__option--highlighted {
  background-color: #6366f1 !important;
  color: #ffffff !important;
}

/* Checkbox styling */
.woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
}

.woocommerce-form__input-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  cursor: pointer;
  accent-color: #6366f1;
}

.woocommerce-form__input-checkbox:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Ship to different address section */
#ship-to-different-address {
  margin: 2rem 0;
  padding: 1rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.shipping_address {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Additional fields (Order notes) */
.woocommerce-additional-fields {
  margin-top: 2rem;
}

.woocommerce-additional-fields__field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Error messages */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.375rem;
  border-left: 4px solid;
}

.woocommerce-error {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.woocommerce-info {
  background-color: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

.woocommerce-message {
  background-color: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

/* Validation errors */
.form-row.woocommerce-invalid label {
  color: #ef4444;
}

.form-row.woocommerce-invalid input,
.form-row.woocommerce-invalid select,
.form-row.woocommerce-invalid textarea {
  border-color: #ef4444;
}

.form-row.woocommerce-invalid .select2-selection--single {
  border-color: #ef4444 !important;
}

/* Input wrapper */
.woocommerce-input-wrapper {
  width: 100%;
}

/* Hidden inputs */
input[type="hidden"] {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .checkout.woocommerce-checkout {
    padding: 1rem 0.5rem;
  }

  .woocommerce-billing-fields h3,
  .woocommerce-shipping-fields h3 {
    font-size: 1.25rem;
  }

  .form-row-first,
  .form-row-last {
    grid-column: 1 / -1;
  }
}

/* Remove default WooCommerce spacing */
.woocommerce-billing-fields__field-wrapper p,
.woocommerce-shipping-fields__field-wrapper p {
  margin-bottom: 0;
}

/* Clear fix */
.clear {
  clear: both;
}

/* ============================================
   ORDER REVIEW SECTION
   ============================================ */

/* Order review container */
#order_review.woocommerce-checkout-review-order {
  background-color: #ffffff;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}

/* Order review table */
.shop_table.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.875rem;
}

.shop_table.woocommerce-checkout-review-order-table thead {
  border-bottom: 2px solid #e5e7eb;
}

.shop_table.woocommerce-checkout-review-order-table th {
  padding: 0.75rem 0;
  text-align: left;
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
}

.shop_table.woocommerce-checkout-review-order-table th.product-name {
  width: 60%;
}

.shop_table.woocommerce-checkout-review-order-table th.product-total {
  width: 40%;
  text-align: right;
}

/* Table body */
.shop_table.woocommerce-checkout-review-order-table tbody {
  border-bottom: 1px solid #e5e7eb;
}

.shop_table.woocommerce-checkout-review-order-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
}

.shop_table.woocommerce-checkout-review-order-table tbody tr:last-child {
  border-bottom: none;
}

.shop_table.woocommerce-checkout-review-order-table tbody td {
  padding: 1rem 0;
  vertical-align: top;
}

.shop_table.woocommerce-checkout-review-order-table tbody td.product-name {
  color: #374151;
  line-height: 1.5;
}

.shop_table.woocommerce-checkout-review-order-table
  tbody
  td.product-name
  .product-quantity {
  color: #6b7280;
  font-weight: normal;
  margin-left: 0.5rem;
}

.shop_table.woocommerce-checkout-review-order-table tbody td.product-total {
  text-align: right;
  color: #111827;
  font-weight: 500;
}

/* Table footer */
.shop_table.woocommerce-checkout-review-order-table tfoot {
  border-top: 2px solid #e5e7eb;
}

.shop_table.woocommerce-checkout-review-order-table tfoot tr {
  border-bottom: 1px solid #f3f4f6;
}

.shop_table.woocommerce-checkout-review-order-table tfoot tr:last-child {
  border-bottom: none;
}

.shop_table.woocommerce-checkout-review-order-table tfoot th {
  padding: 0.75rem 0;
  font-weight: 500;
  color: #374151;
  text-align: left;
}

.shop_table.woocommerce-checkout-review-order-table tfoot td {
  padding: 0.75rem 0;
  text-align: right;
  color: #111827;
}

/* Cart subtotal */
.shop_table.woocommerce-checkout-review-order-table tfoot tr.cart-subtotal th,
.shop_table.woocommerce-checkout-review-order-table tfoot tr.cart-subtotal td {
  padding-top: 1rem;
}

/* Shipping row */
.shop_table.woocommerce-checkout-review-order-table
  tfoot
  tr.woocommerce-shipping-totals
  th {
  vertical-align: top;
  padding-top: 1rem;
}

.shop_table.woocommerce-checkout-review-order-table
  tfoot
  tr.woocommerce-shipping-totals
  td {
  padding-top: 1rem;
  vertical-align: top;
}

.shop_table.woocommerce-checkout-review-order-table
  tfoot
  tr.woocommerce-shipping-totals
  td
  ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop_table.woocommerce-checkout-review-order-table
  tfoot
  tr.woocommerce-shipping-totals
  td
  li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Shipping methods list */
.woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-shipping-methods li {
  margin: 0;
  padding: 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.woocommerce-shipping-methods li:last-child {
  margin-bottom: 0;
}

/* Shipping method radio button */
.woocommerce-shipping-methods li input[type="radio"].shipping_method {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  margin-right: 0.75rem;
  cursor: pointer;
  accent-color: #6366f1;
  flex-shrink: 0;
}

/* Shipping method label */
.woocommerce-shipping-methods li label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin: 0;
  padding: 0.625rem 0.875rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
  width: 100%;
}

.woocommerce-shipping-methods li input[type="radio"]:checked + label,
.woocommerce-shipping-methods li label:has(input[type="radio"]:checked) {
  background-color: #eff6ff;
  border-color: #6366f1;
  color: #1e40af;
  font-weight: 600;
}

.woocommerce-shipping-methods li label:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
}

/* Shipping method price */
.woocommerce-shipping-methods li label .woocommerce-Price-amount {
  margin-left: auto;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

.woocommerce-shipping-methods
  li
  input[type="radio"]:checked
  + label
  .woocommerce-Price-amount,
.woocommerce-shipping-methods
  li
  label:has(input[type="radio"]:checked)
  .woocommerce-Price-amount {
  color: #1e40af;
}

.woocommerce-shipping-methods li label .woocommerce-Price-currencySymbol {
  margin-right: 0.25rem;
}

/* Order total */
.shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total {
  border-top: 2px solid #e5e7eb;
  border-bottom: none;
}

.shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total th {
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

/* Price amount styling */
.woocommerce-Price-amount {
  color: inherit;
  font-weight: inherit;
}

.woocommerce-Price-currencySymbol {
  margin-right: 0.25rem;
}

/* ============================================
   PAYMENT METHODS SECTION
   ============================================ */

#payment.woocommerce-checkout-payment {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

/* Payment methods list */
.wc_payment_methods.payment_methods.methods {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wc_payment_methods.payment_methods.methods li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f3f4f6;
}

.wc_payment_methods.payment_methods.methods li:last-child {
  border-bottom: none;
}

.wc_payment_methods.payment_methods.methods li.wc_payment_method {
  padding: 1rem 0;
}

/* Payment method radio button */
.wc_payment_methods.payment_methods.methods li input[type="radio"].input-radio {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  margin-right: 0.75rem;
  cursor: pointer;
  accent-color: #6366f1;
  flex-shrink: 0;
}

/* Payment method label */
.wc_payment_methods.payment_methods.methods li label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin: 0;
  padding: 0;
  width: 100%;
}

.wc_payment_methods.payment_methods.methods li label img {
  max-height: 2em;
  max-width: 4em;
  background-color: rgba(255, 255, 255, 0.87);
  padding: 0.2em 0.3em;
  border-radius: 0.3em;
  border: 0.5px solid rgba(204, 204, 204, 0.87);
  object-fit: contain;
}

/* Payment box (description) */
.payment_box.payment_method_midtrans,
.payment_box.payment_method_midtrans_sub_card,
.payment_box.payment_method_midtrans_sub_gopay {
  margin-top: 0.75rem;
  margin-left: 2rem;
  padding: 0.75rem 1rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.payment_box p {
  margin: 0;
  padding: 0;
}

/* ============================================
   PLACE ORDER SECTION
   ============================================ */

.form-row.place-order {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

/* Terms and conditions wrapper */
.woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.woocommerce-privacy-policy-text {
  margin: 0;
}

.woocommerce-privacy-policy-text p {
  margin: 0;
}

.woocommerce-privacy-policy-link {
  color: #6366f1;
  text-decoration: underline;
  transition: color 0.15s ease-in-out;
}

.woocommerce-privacy-policy-link:hover {
  color: #4f46e5;
}

/* Place order button */
#place_order.button.alt,
button.button.alt[name="woocommerce_checkout_place_order"] {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #111827;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

#place_order.button.alt:hover,
button.button.alt[name="woocommerce_checkout_place_order"]:hover {
  background-color: #000000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

#place_order.button.alt:active,
button.button.alt[name="woocommerce_checkout_place_order"]:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

#place_order.button.alt:focus,
button.button.alt[name="woocommerce_checkout_place_order"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

/* Update totals button (noscript) */
noscript button.button.alt[name="woocommerce_checkout_update_totals"] {
  width: auto;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Responsive adjustments for order review */
@media (max-width: 767px) {
  #order_review.woocommerce-checkout-review-order {
    padding: 1rem;
  }

  .shop_table.woocommerce-checkout-review-order-table {
    font-size: 0.8125rem;
  }

  .shop_table.woocommerce-checkout-review-order-table th.product-name {
    width: 55%;
  }

  .shop_table.woocommerce-checkout-review-order-table th.product-total {
    width: 45%;
  }

  .shop_table.woocommerce-checkout-review-order-table tbody td,
  .shop_table.woocommerce-checkout-review-order-table tfoot th,
  .shop_table.woocommerce-checkout-review-order-table tfoot td {
    padding: 0.75rem 0;
  }

  .shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total th,
  .shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total td {
    font-size: 1rem;
  }

  .payment_box.payment_method_midtrans,
  .payment_box.payment_method_midtrans_sub_card,
  .payment_box.payment_method_midtrans_sub_gopay {
    margin-left: 1.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
  }

  .wc_payment_methods.payment_methods.methods li label img {
    max-height: 1.5em;
    max-width: 3em;
  }

  /* Shipping methods responsive */
  .woocommerce-shipping-methods li {
    gap: 0.5rem;
  }

  .woocommerce-shipping-methods li label {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    flex-wrap: wrap;
  }

  .woocommerce-shipping-methods li label .woocommerce-Price-amount {
    margin-left: 0;
    width: 100%;
    text-align: right;
    margin-top: 0.25rem;
  }
}
