/* ======================== */
/* STRUCTUUR DESKTOP        */
/* ======================== */
.woocommerce .checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.woocommerce .checkout-form,
.woocommerce .checkout-summary {
  background: var(--white-color);
  border: 1px solid var(--beige-color);
  border-radius: 8px;
  padding: 2rem;
}

.woocommerce .checkout-form { order: 1; }
.woocommerce .checkout-summary { order: 2; }

.woocommerce-billing-fields p {
  font-size: 0.75rem;
}

/* ======================== */
/* FORM ELEMENTEN           */
/* ======================== */
.woocommerce form .form-row {
  margin-bottom: 1rem;
  padding: 0;
}

.woocommerce form input.input-text,
.woocommerce form textarea,
.woocommerce form select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--beige-color);
  border-radius: 6px;
  color: #111827;
  font-family: inherit;
  background-color: #f9fafb;
  appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.woocommerce form select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23666' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.woocommerce form input:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
  border-color: var(--primary-color);
  background-color: #fff;
  outline: none;
}

.woocommerce form .form-row[class*="field--"] input,
.woocommerce form .form-row[class*="field--"] select {
  border: 1px solid var(--beige-color);
  background-color: #f9fafb;
  color: #111827;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  appearance: none;
}

.woocommerce form .form-row[class*="field--"] input:focus,
.woocommerce form .form-row[class*="field--"] select:focus {
  border-color: var(--primary-color);
  background-color: var(--white-color);
  outline: none;
}

/* ======================== */
/* FLEX OPBOUW              */
/* ======================== */
.woocommerce .field-row,
.woocommerce .field-row--three,
.woocommerce .field-row--birth {
  display: flex;
  gap: 2%;
}

.woocommerce .field-row > .form-row,
.woocommerce .field-row--three > .form-row,
.woocommerce .field-row--birth > .form-row {
  flex: 1;
}

@media (min-width: 769px) {
  .woocommerce .field-row--three > .form-row:nth-child(1) {
    width: 50%;
  }

  .woocommerce .field-row--three > .form-row:nth-child(2),
  .woocommerce .field-row--three > .form-row:nth-child(3) {
    width: 25%;
  }
}

/* ======================== */
/* RADIO: TYPE KLANT        */
/* ======================== */
.woocommerce .woocommerce-input-wrapper {
  display: flex;
}

/* ======================== */
/* ERROR STYLE              */
/* ======================== */
.woocommerce .woocommerce-error {
  margin-top: 0.5rem;
  color: #dc2626;
  font-size: 0.875rem;
  background: #fef2f2;
  padding: 0.75rem;
  border-left: 4px solid #dc2626;
}

.woocommerce .woocommerce-error.postcode-error {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #dc2626;
}

/* ======================== */
/* ORDER REVIEW SECTIE      */
/* ======================== */

/* Verberg mobiel toggle & inhoud op desktop */
@media (min-width: 769px) {
  .woocommerce .order-review-toggle,
  .woocommerce .order-review-content {
    display: none;
  }

  .woocommerce .order-review-desktop {
    display: block;
  }
}

/* Mobiel: toon toggle en collapsible */
@media (max-width: 768px) {
  .woocommerce .order-review-desktop {
    display: none;
  }

  .woocommerce .order-review-toggle {
    display: block;
    position: relative;
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    background: #f3f4f6;
    border: 1px solid var(--beige-color);
    font-weight: bold;
    border-radius: 6px;
    font-size: 1rem;
    text-align: left;
    margin-bottom: 1rem;
  }

  .woocommerce .order-review-toggle .toggle-icon {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.2rem;
    pointer-events: none;
  }

  .woocommerce .order-review-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .woocommerce .order-review-content.open {
    max-height: 1000px;
    transition: max-height 0.6s ease;
  }
}

/* ======================== */
/* SUBMIT KNOP              */
/* ======================== */
.woocommerce .checkout-submit-button {
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  margin-top: 1rem;
}

.woocommerce .checkout-submit-button:hover {
  background-color: var(--secondary-color);
}

/* ======================== */
/* PAYMENT SECTION          */
/* ======================== */
.woocommerce-checkout #payment {
  border: 1px solid var(--beige-color);
  background-color: #f9fafb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  appearance: none;
}

/* ======================== */
/* VERBERG STANDAARD KNOP   */
/* ======================== */
.woocommerce #payment #place_order {
    width: 100%;
    background: var(--primary-color);
}

/* ======================== */
/* VERZENDADRES TOGGLE      */
/* ======================== */
.woocommerce .shipping-toggle-wrapper {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: all 0.4s ease;
  padding-top: 0;
}

.woocommerce .shipping-toggle-wrapper.visible {
  max-height: 2000px;
  opacity: 1;
  visibility: visible;
  padding-top: 1rem;
}

/* ======================== */
/* NOTIFICATIES             */
/* ======================== */
.woocommerce .woocommerce-NoticeGroup {
  display: none;
}

/* ======================== */
/* HEADINGS                 */
/* ======================== */
.woocommerce h3 {
  line-height: var(--h3-line-height);
}

.woocommerce h4 {
  line-height: var(--h4-line-height);
}

/* ======================== */
/* RESPONSIVE FIELDS        */
/* ======================== */
@media (max-width: 768px) {
  .woocommerce .checkout-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
  }

  .woocommerce .checkout-form,
  .woocommerce .checkout-summary {
    padding: 1rem;
  }

  .woocommerce .field-row,
  .woocommerce .field-row--three,
  .woocommerce .field-row--birth {
    flex-direction: column;
  }

  .woocommerce .field-row > .form-row,
  .woocommerce .field-row--three > .form-row,
  .woocommerce .field-row--birth > .form-row {
    max-width: 100%;
    width: 100%;
    flex: none;
  }

  .woocommerce .field-row > .form-row:not(:last-child),
  .woocommerce .field-row--three > .form-row:not(:last-child),
  .woocommerce .field-row--birth > .form-row:not(:last-child) {
    margin-bottom: 1rem;
  }

  .woocommerce .customer-type-radio.woocommerce-input-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ======================== */
/* GEUNIFORMEERDE SELECT2   */
/* ======================== */
.woocommerce .select2-container--default .select2-selection--single {
  border: 1px solid var(--beige-color);
  border-radius: 6px;
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #111827;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #111827;
  font-size: 1rem;
  line-height: 1.4;
  padding-left: 0;
}

.woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1em;
  position: absolute;
}

.woocommerce .select2-container--default.select2-container--focus .select2-selection--single,
.woocommerce .select2-container--default .select2-selection--single:focus {
  border-color: var(--primary-color);
  background-color: var(--white-color);
  outline: none;
}

.woocommerce .select2-container--default .select2-dropdown {
  border-radius: 6px;
  border: 1px solid var(--beige-color);
  font-size: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.woocommerce .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary-color);
  color: var(--white-color);
}

/* ======================== */
/* TERMS AND CONDITIONS CHECKBOX */
/* ======================== */
.woocommerce-terms-and-conditions-checkbox-text {
  font-size: 0.875rem;
  color: var(--text-color);
}

.woocommerce-checkout-review-order #payment {
  display: none;
}
