/**
 * WooCommerce Thailand Address - Styles v1.1.0
 */

/* ── Select ของ plugin ── */
select.wta-select {
  width: 100% !important;
  height: auto !important;
  min-height: 42px;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  color: #333;
  transition: border-color 0.2s ease;
  display: block !important;
  box-sizing: border-box;
  margin: 0;
}

select.wta-select:focus {
  border-color: #96588a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(150, 88, 138, 0.15);
}

select.wta-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── ซ่อน Select2 container ทุกกรณี (CSS backup) ── */
#billing_state_field  .select2-container,
#shipping_state_field .select2-container {
  display: none !important;
}

/* ── Postcode readonly ── */
#billing_postcode[readonly],
#shipping_postcode[readonly] {
  background-color: #f5f5f5 !important;
  border: 1px solid #d0d0d0 !important;
  cursor: default !important;
  color: #555 !important;
}

/* ── Elementor Pro ── */
.elementor-widget-woocommerce-checkout-page select.wta-select {
  width: 100% !important;
  max-width: 100% !important;
}

/* ── Field wrappers ── */
#billing_subdistrict_field,
#shipping_subdistrict_field {
  width: 100%;
}

/* ── JetForm: select ที่สร้างจาก input (fallback) ── */
.wta-select.wta-jet-select {
  width: 100% !important;
  display: block !important;
  box-sizing: border-box;
}
