/*
 * TB Modern Lightbox — caption panel styling for GLightbox.
 * Dark panel to match the Thai Bloom site, brand red #d22630 accents.
 * No prices are styled or shown here (site policy: prices live only in
 * online ordering).
 */

.glightbox-container .gslide-description {
  background: #111111;
}

.glightbox-container .gdesc-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 18px 18px;
  text-align: left;
}

.glightbox-container .gslide-title {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.glightbox-container .gslide-desc {
  color: #dddddd;
  font-size: 15px;
  line-height: 1.55;
  max-height: 34vh;
  overflow-y: auto;
}

.tbml-desc p {
  margin: 0 0 8px;
}

.tbml-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.tbml-share-label {
  color: #999999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 2px;
}

.tbml-share-btn {
  display: inline-block;
  border: 1px solid #d22630;
  color: #ffffff !important;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none !important;
  cursor: pointer;
}

.tbml-share-btn:hover,
.tbml-share-btn:focus {
  background: #d22630;
  color: #ffffff !important;
}

/*
 * Mobile polish (2026-11-04, v1.1.0), scoped to small screens only;
 * desktop presentation is unchanged. Fixes from Walter's phone test:
 * (1) the photo sat vertically centered with a large empty band above
 *     it - the slide is now anchored to the top of the screen;
 * (2) the caption panel (title + description, then the share row) now
 *     sits in flow directly under the photo instead of floating as
 *     GLightbox's absolute bottom overlay, with tight spacing;
 * (3) the share pills wrapped raggedly (4 + 2) - they are now an even
 *     3 x 2 grid of equal-size pills under a SHARE label on its own line.
 */
@media (max-width: 768px) {
  /* (1) Top-anchor the slide instead of vertically centering it. */
  .glightbox-container .gslide {
    align-items: flex-start;
  }

  .glightbox-container .ginner-container {
    justify-content: flex-start;
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
    padding-top: 10px;
  }

  /* Keep very tall (portrait) photos from crowding out the caption. */
  .glightbox-container .gslide-image img {
    max-height: 52vh;
  }

  /* (2) Caption panel in flow, directly under the photo. The second
     rule out-specifies GLightbox's .glightbox-mobile overlay rule
     (same selector; this stylesheet loads after GLightbox's). */
  .glightbox-container .gslide-description {
    flex: 0 1 auto;
  }

  .glightbox-mobile .glightbox-container .gslide-description {
    position: relative;
    bottom: auto;
    flex: 0 1 auto;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: #111111;
  }

  .glightbox-container .gdesc-inner {
    padding: 10px 14px 14px;
  }

  .glightbox-container .gslide-title,
  .glightbox-mobile .glightbox-container .gslide-title {
    font-size: 18px;
    margin: 0 0 4px;
  }

  .glightbox-container .gslide-desc {
    max-height: 30vh;
  }

  /* (3) Share block: label on its own line, then an even 3 x 2 grid
     of equal-size, centered pills. */
  .tbml-share {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
  }

  .tbml-share-label {
    grid-column: 1 / -1;
    margin: 0 0 2px;
  }

  .tbml-share-btn {
    text-align: center;
    padding: 7px 6px;
    white-space: nowrap;
  }
}
