/* table-fullheight.css — v11.2 (patched for Google Maps 4:3) */

/* Keep wrappers in normal flow */
.fFW7wc-OEVmcd,
.YMEQtf,
.WIdY2d.M1aSXe,
.M1aSXe,
.table-fullheight,
.table-wrapper,
.table-container {
  display: block !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  float: none !important;
}

/* Iframes: DO NOT set height here (let inline/JS decide on desktop) */
.pxjVId,
iframe.table-embed,
.table-fullheight iframe {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
  position: static !important;
  /* no height/min-height here */
}

/* Tablet/Phone: square (height = width) */
@media (max-width: 1024px) {
  .fFW7wc-OEVmcd,
  .YMEQtf,
  .WIdY2d.M1aSXe,
  .M1aSXe,
  .table-fullheight,
  .table-wrapper,
  .table-container {
    position: relative !important;
    overflow: hidden !important;
  }
  .pxjVId,
  iframe.table-embed,
  .table-fullheight iframe {
    width: 100% !important;
    height: auto !important;          /* neutralize any inline px height from embed on mobile */
    aspect-ratio: 1 / 1 !important;   /* square for tables */
  }
}

/* === Map Embed Responsive (4:3) === */
iframe[src*="google.com/maps"],
iframe[src*="google.com/maps/embed"] {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;  /* สูง 3/4 ของกว้าง */
  display: block;
  border: 0;
}

/* For mobile/tablet: keep 4:3 ratio (prevent from being forced to 1:1) */
@media (max-width: 1024px) {
  iframe[src*="google.com/maps"],
  iframe[src*="google.com/maps/embed"] {
    aspect-ratio: 4 / 3 !important;
  }
}
