:root {
  color-scheme: light;
  --mirror-accent: #657f08;
  --mirror-text: #272513;
}

html {
  background: #f7f5ed;
  scroll-behavior: smooth;
  overflow-x: hidden !important;
}

body {
  margin: 0;
  color: var(--mirror-text);
  overflow-x: hidden !important;
}

body.siteScrollingBlockedIOSFix {
  position: static !important;
  height: auto !important;
  overflow-y: auto !important;
}

#POPUPS_ROOT,
#pinnedBottomRight {
  display: none !important;
}

#SITE_HEADER {
  box-shadow: 0 2px 14px rgb(42 48 18 / 12%);
}

img {
  display: block;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #f0b429 !important;
  outline-offset: 3px !important;
}

#SITE_HEADER nav > ul > li:has(> button[aria-label^="More "]) > a {
  right: 30px !important;
  width: calc(100% - 30px) !important;
  padding-right: 34px !important;
}

#SITE_HEADER nav > ul > li > button[aria-label^="More "] {
  top: 3px !important;
  right: 3px !important;
  left: auto !important;
  z-index: 5 !important;
}

.mirror-lightbox-open {
  overflow: hidden !important;
}

.mirror-lightbox[hidden] {
  display: none !important;
}

.mirror-gallery-trigger {
  cursor: zoom-in;
}

.mirror-interactions-ready button[aria-label="Expand image"] {
  display: none !important;
}

.mirror-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  grid-template-columns: minmax(48px, 1fr) minmax(0, 1100px) minmax(48px, 1fr);
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgb(0 0 0 / 92%);
}

.mirror-lightbox figure {
  grid-column: 2;
  display: grid;
  place-items: center;
  max-height: calc(100vh - 48px);
  margin: 0;
}

.mirror-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 88px);
  object-fit: contain;
}

.mirror-lightbox figcaption {
  margin-top: 8px;
  color: #fff;
  font: 500 14px/1.4 system-ui, sans-serif;
  text-align: center;
}

.mirror-lightbox button {
  z-index: 1;
  border: 0;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  color: #fff;
  background: rgb(255 255 255 / 16%);
  font: 400 34px/1 system-ui, sans-serif;
  cursor: pointer;
}

.mirror-lightbox button:hover {
  background: rgb(255 255 255 / 28%);
}

.mirror-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.mirror-lightbox__previous {
  grid-column: 1;
  justify-self: start;
}

.mirror-lightbox__next {
  grid-column: 3;
  justify-self: end;
}

@media (min-width: 701px) {
  html body main section:first-of-type .QG9w8P,
  html body main section:first-of-type .ROWgFb,
  html body main section:first-of-type wow-image.bgImage,
  html body main section:first-of-type wow-image.bgImage img {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
  }

  html body main section:first-of-type wow-image.bgImage img {
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html body #SITE_HEADER nav {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }

  html body #SITE_HEADER nav::-webkit-scrollbar {
    display: none;
  }

  html body #SITE_HEADER nav > ul {
    display: flex !important;
    justify-content: center !important;
    width: max-content !important;
    min-width: 100% !important;
  }

  html body #SITE_HEADER nav > ul > li {
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;
  }

  html body #SITE_HEADER nav > ul > li > a {
    box-sizing: border-box !important;
    width: auto !important;
    min-width: max-content !important;
    padding-inline: 11px !important;
  }

  html body #SITE_HEADER nav > ul > li > a p {
    white-space: nowrap !important;
  }
}

@media (max-width: 700px) {
  .mirror-lightbox {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 12px;
  }

  .mirror-lightbox button {
    width: 40px;
    height: 40px;
  }

  html body,
  html body #masterPage,
  html body #SITE_HEADER,
  html body #SITE_HEADER > div,
  html body #SITE_HEADER > div > div {
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
  }

  html body #masterPage {
    grid-template-columns: minmax(0, 100vw) !important;
  }

  html body #SITE_HEADER {
    position: relative !important;
    height: 148px !important;
  }

  html body #SITE_HEADER #comp-m0kmo1a8 {
    display: none !important;
  }

  html body #SITE_HEADER::before {
    content: "วัดถ้ำคีรีธรรม";
    position: absolute;
    inset: 16px 16px auto;
    z-index: 10;
    color: #272513;
    font: 700 28px/1.25 system-ui, sans-serif;
    text-align: center;
  }

  html body #SITE_HEADER::after {
    content: "ตำบลหนองหญ้า อำเภอเมืองกาญจนบุรี จังหวัดกาญจนบุรี";
    position: absolute;
    inset: 54px 12px auto;
    z-index: 10;
    color: #55513a;
    font: 400 13px/1.4 system-ui, sans-serif;
    text-align: center;
  }

  html body #SITE_HEADER #comp-kx4rbjsu {
    position: absolute !important;
    inset: 88px 0 auto !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: 60px !important;
    transform: none !important;
  }

  html body #SITE_HEADER #comp-kx4rbjt2 {
    position: relative !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: 60px !important;
    transform: none !important;
  }

  html body #SITE_HEADER #comp-kx4rbk3m {
    position: absolute !important;
    inset: 14px 0 auto !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin: 0 !important;
    justify-self: start !important;
    transform: none !important;
    overflow: hidden !important;
  }

  html body #SITE_HEADER nav {
    position: relative !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin: 0 !important;
    transform: none !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html body #SITE_HEADER nav::-webkit-scrollbar {
    display: none;
  }

  html body #SITE_HEADER nav > ul {
    position: relative !important;
    left: 0 !important;
    display: flex !important;
    width: max-content !important;
    min-width: 100% !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }

  html body #SITE_HEADER nav li {
    flex: 0 0 auto !important;
  }

  html body #PAGES_CONTAINER,
  html body #SITE_PAGES,
  html body #SITE_PAGES_TRANSITION_GROUP,
  html body #SITE_PAGES_TRANSITION_GROUP > div,
  html body #SITE_FOOTER {
    width: 980px !important;
    min-width: 980px !important;
    max-width: 980px !important;
  }

  html body #PAGES_CONTAINER,
  html body #SITE_FOOTER {
    zoom: calc(100vw / 980px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html body #SITE_HEADER nav > ul > li:has(> button[aria-label^="More "]) > a {
  right: 30px !important;
  width: calc(100% - 30px) !important;
  padding-right: 10px !important;
  clip-path: inset(0 30px 0 0) !important;
  pointer-events: none !important;
}

html body #SITE_HEADER nav > ul > li > button[aria-label^="More "] {
  top: 3px !important;
  right: 3px !important;
  left: auto !important;
  z-index: 20 !important;
  pointer-events: auto !important;
}

html body .gallery-item-container {
  position: relative !important;
}

html body .gallery-item-container .item-action.mirror-gallery-trigger {
  position: absolute !important;
  inset: 0 !important;
  z-index: 20 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  cursor: zoom-in;
  pointer-events: auto !important;
}

html body #SITE_HEADER nav > ul > li > button[aria-label^="More "] {
  display: none !important;
}

html body #SITE_HEADER nav > ul > li:has(> button[aria-label^="More "]) > a {
  right: auto !important;
  width: auto !important;
  padding-inline: 11px !important;
  clip-path: none !important;
  pointer-events: auto !important;
}

.mirror-mobile-submenu-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: max-content;
  height: 30px;
}

.mirror-mobile-submenu-item a {
  display: flex;
  align-items: center;
  height: 30px;
  padding-inline: 12px;
  color: inherit;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
}