/* Additions for the static rebuild, loaded after the old theme's style.css. */

/* FitVids: this used to be injected by jquery.fitvids.js */
.fluid-width-video-wrapper { width: 100%; position: relative; padding: 0; }
.fluid-width-video-wrapper iframe,
.fluid-width-video-wrapper object,
.fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.fluid-width-video-wrapper.ratio-560x315 { padding-top: 56.25%; }
.fluid-width-video-wrapper.ratio-573x303 { padding-top: 52.8796%; }

/* Footer "Data Protection Notice" link: was an inline style attribute */
.coipyright-bar a.mfs-dpn { margin-top: 10px !important; color: #eee !important; }

/* Facebook page box iframe */
.fb-page iframe { max-width: 100%; border: none; overflow: hidden; }

/* BaZi calculator: the fixed-width chart scrolls inside its own box on small screens
   (the old page forced the whole site to 1170px wide instead). */
.bazi-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bazi-notice { padding: 20px 15px; font-size: 15px; }
#bazi-print { display: inline-block; margin: 10px 15px; }

/* Qi Men Dun Jia vendor embed */
.qmdj-embed iframe { display: block; width: 100%; max-width: 800px; margin: 0 auto 30px; border: 0; }

/* Inner pages (rebuilt from the database) */
/* Only original image files are kept, so WordPress's smaller sizes are the original drawn smaller. */
.page-content img, .profilesingle img, .synopsis-section-content img { max-width: 100%; height: auto; }
img.size-thumbnail { object-fit: cover; }
img.size-medium, img.size-post-thumbnail { height: auto; max-width: 100%; }
.page-content iframe { max-width: 100%; }
.mfs-enquiry { margin: 15px 0; padding: 12px 15px; background: #f5f5f5; border-left: 3px solid #e2b500; }

/* BaZi form: the old grid gave the date and time dropdowns only ~56px below desktop width (26px on
   phones), clipping "Nov" and "2024". From 992px the halves sit side by side as on the old site; the
   halves stack below 992px, the labels sit above the fields on phones, CALCULATE gets its own
   full-width line on phones, and the dropdowns use less side padding. */
#bazi-form select.form-control { padding-left: 6px; padding-right: 2px; }
#bazi-form .now-btn-t { width: 100%; padding-left: 0; padding-right: 0; white-space: nowrap; }
/* 992-1199px: side by side, CALCULATE got only 66px for ~76px of text. Narrower gaps give it ~90px. */
@media (min-width: 992px) and (max-width: 1199px) {
  #bazi-form .row { margin-left: -5px; margin-right: -5px; }
  #bazi-form .row > [class*="col-"] { padding-left: 5px; padding-right: 5px; }
}
@media (max-width: 767px) {
  #bazi-form label.form-bottom-margin { margin-bottom: 4px; }
  .bg-image { margin-left: 0; margin-right: 0; padding-left: 12px; padding-right: 12px; }
  #bazi-form .row { margin-left: -4px; margin-right: -4px; }
  #bazi-form .row > [class*="col-"] { padding-left: 4px; padding-right: 4px; }
}

/* Flying Star calculator (/flyingstar/): the old palace box image with the 3x3 chart laid over its inner
   grid (30px in from each edge of the 480x360 image), scaled with the column so it fits phones too.
   Font sizes follow the old page (20pt and 30pt at full width). */
.flyingstar-page .callactionstar { margin-bottom: 15px; }
#fs-print { display: inline-block; margin: 0 0 10px; }
.fs-chart { position: relative; max-width: 480px; margin: 0 auto 10px; container-type: inline-size; }
.fs-chart > img { display: block; width: 100%; height: auto; }
.fs-grid { position: absolute; left: 6.25%; top: 8.333%; width: 87.5%; height: 83.333%; margin: 0;
           table-layout: fixed; border-collapse: collapse; background: transparent; }
.fs-grid td { width: 33.333%; padding: 0; border: 0; text-align: center; vertical-align: middle; line-height: 1.15; }
.fs-m, .fs-w { display: inline-block; width: 40%; font-size: 20px; font-size: 5.6cqw; }
.fs-p { display: block; color: blue; font-size: 30px; font-size: 8.3cqw; }
.fs-legend { text-align: center; margin: 0 0 20px; }
.fs-compass { display: block; max-width: 100%; height: auto; margin: 0 auto 20px; }

/* "Temporarily unavailable" pages (my-account) */
.mfs-unavailable { font-size: 18px; font-weight: 600; margin: 10px 0 20px; }
