/* ===== DWR Inquiry — Contact Page Layout ===== */

@import url("https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* ── Hero Banner (plugin-managed) ── */
.dwr-contact-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 3.4375rem 1.25rem 2.8125rem;
  text-align: center;
}

.dwr-contact-hero-title {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 2.375rem !important;
  font-weight: 400 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
  font-family: "Prompt", sans-serif;
}

/* ── Divider ── */
.dwr-divider {
  width: 100%;
  max-width: 100rem;
  margin: 0rem auto 0 auto;
  border-top: 0.125rem solid #dfe8ef;
}

/* ขยาย layout ให้กว้างเต็มหน้า (break ออกจาก WP content width) */
.dwr-contact-layout {
  display: grid;
  grid-template-columns: minmax(764px, 1fr) 1fr;
  gap: 2.5rem;
  /* WD-528: สองฝั่งจบที่บรรทัดเดียวกัน — เดิม start = ต่างฝ่ายต่างสูงตามเนื้อหา
     ไม่ได้ไปหดฝั่งซ้าย เพราะความสูงของมันคือความยาวของฟอร์มจริง ๆ (มี/ไม่มี reCAPTCHA,
     ข้อความ error ตอน validate ก็ยืดได้) — กำหนดตายตัวเมื่อไหร่ก็เพี้ยนอีกเมื่อนั้น
     ใช้ stretch แล้วให้ "แผนที่" ฝั่งขวายืดลงมาปิดส่วนต่างแทน */
  align-items: stretch;
  padding: 1.25rem 0;
  padding-bottom: 8rem;
  /* width: 100vw; */
  max-width: 100rem;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ===== Left: Form ===== */
.dwr-contact-form-section {
  background: rgba(223, 232, 239, 0.85);
  border-radius: 1rem;
  padding: 2rem 3rem;
  padding-bottom: 2.35rem;
}
.dwr-contact-form-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9375rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}
.dwr-contact-form-title .dwr-icon-circle {
  width: 3.75rem;
  height: 3.75rem;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dwr-contact-form-title .dwr-icon-circle img {
  width: 2.375rem;
  height: 2.375rem;
}
.dwr-contact-form-title h2 {
  font-family: "Prompt", sans-serif;
  font-size: 1rem; /* WD-161: 16px ตาม design */
  font-weight: 400;
  color: #2a5f9e;
  margin: 0;
  line-height: 1.4;
}

/* Override form wrap styles inside this layout */
.dwr-contact-form-section .dwr-inquiry-form-wrap {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  max-width: 100% !important;
  border-radius: 0 !important;
}
.dwr-contact-form-section .dwr-form-header {
  display: none !important;
}

/* ===== Right: Contact Info ===== */
.dwr-contact-info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9375rem;
  /* WD-528: สูงเต็มความสูงของแถว (grid stretch ให้มาแล้ว) — min-height:0 กัน
     flex item ล้นกล่องตัวเองตามค่า min-height:auto ของ flexbox */
  min-height: 0;
}

/* ── [dwr_contact_info] ใช้เดี่ยว ๆ นอกหน้าติดต่อเรา ──
   ตัวเนื้อหาเดิมเป็น flex item ของ .dwr-contact-layout · พอเอามาวางที่อื่น
   ไม่มี flex parent แล้ว จึงต้องกลับเป็นบล็อกปกติ ไหลเต็มพื้นที่ที่ได้รับ
   (direction #1: ไม่กำหนดความกว้างเอง — client ครอบผ่าน Page editor) */
.dwr-contact-standalone {
  width: 100%;
}
.dwr-contact-standalone > .dwr-contact-info-section {
  flex: none;
  width: 100%;
}
/* WD-528: ใช้เดี่ยว ๆ ไม่มีฝั่งซ้ายให้จบเท่ากัน แผนที่จึงกลับไปสูงคงที่ตามเดิม */
.dwr-contact-standalone .dwr-map-container {
  flex: none;
  height: 25rem;
}

.dwr-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9375rem;
  margin-bottom: 0.625rem;
}
.dwr-info-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dwr-info-title-group .dwr-separator {
  width: 0.9375rem;
  height: 3.8125rem;
  object-fit: contain;
}
.dwr-info-title-group h2 {
  font-family: "Prompt", sans-serif;
  font-size: 1rem; /* WD-161: 16px ตาม design */
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
}

.dwr-phone-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #fff;
  padding: 0.5rem 2rem 0.5rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
  height: 4.0625rem;
}
.dwr-phone-badge img {
  width: 2.0625rem;
  height: 2.0625rem;
}
.dwr-phone-badge span {
  font-family: "Prompt", sans-serif;
  font-size: 0.875rem; /* WD-161: 14px ตาม design */
  font-weight: 500;
  color: #1a5276;
  white-space: nowrap;
}

/* Info cards */
.dwr-info-card {
  background: #dfe8ef;
  border-radius: 1rem;
  /* WD-282: 1.5rem → 0.9rem ให้คอลัมน์ข้อมูลสูงเท่าฟอร์มพอดี (ค่าที่ tester วัดมา) */
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  /* gap: 0.5rem; */
}
.dwr-info-card.dwr-card-with-logo {
  padding-top: 1rem;
}
.dwr-info-card-logo img {
  height: 4.375rem;
  width: auto;
  padding-bottom: 1rem;
}
.dwr-info-card-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-left: 0.5rem;
}

.dwr-info-icon-circle {
  width: 3.125rem;
  height: 3.125rem;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dwr-info-icon-circle img {
  width: 1.75rem;
  height: 1.75rem;
}
.dwr-info-card-text {
  font-family: "Prompt", sans-serif;
  font-size: 0.875rem; /* WD-161: 14px ตาม design */
  font-weight: 400;
  color: #2a5f9e;
  line-height: 1.5;
  /* padding-top: 0.5rem; */
}

/* Google Maps */
.dwr-map-container {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 0.0625rem solid #e1e8f0;
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.05);
  /* WD-528: 25rem กลายเป็น "อย่างน้อย" แล้วยืดรับส่วนต่างจากฝั่งซ้าย
     (ฝั่งขวายาวกว่าเมื่อไหร่ การ์ดฟอร์มฝั่งซ้ายจะยืดลงมาเองจาก align-items:stretch) */
  min-height: 25rem;
  flex: 1 1 auto;
  display: flex;
}
.dwr-map-container iframe {
  width: 100%;
  /* เป็น flex item แล้ว — สูงเต็มกล่องด้วย flex:1 ไม่ใช่ height:100%
     (height:100% ต้องการพ่อที่มีความสูงแน่นอน ซึ่งตอนนี้ไม่มีแล้ว) */
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
}
.g-recaptcha {
  display: flex !important;
  justify-content: center !important; /* จัดให้อยู่กลางหน้าฟอร์ม */
  background-color: #ffffff !important; /* พื้นหลังสีขาวตามรูป */
  padding: 12px !important; /* ระยะห่างระหว่างขอบกับตัวเลือก */
  border-radius: 15px !important; /* ขอบโค้งมนตาม Design */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important; /* เงาบางๆ ให้ดูมีมิติ */
  margin: 20px auto !important; /* ระยะห่างบน-ล่าง */
  margin-top: 0 !important;
  width: fit-content !important; /* ให้ขนาดกล่องพอดีกับตัว reCAPTCHA */
}

/* ===== Responsive ===== */
@media (max-width: 60rem) {
  .dwr-contact-layout {
    grid-template-columns: 1fr;
    gap: 1.875rem;
    padding: 0.625rem;
  }
  .dwr-contact-form-section {
    padding: 1.5rem 1.5rem;
  }
  .dwr-info-header {
    flex-direction: column;
    align-items: flex-start;
  }
  /* WD-161: เดิม override 1.6rem บนจอเล็ก = ใหญ่กว่า desktop → เอาออก ใช้ 16px เท่ากันทุกจอ */
}
