/* File: render-post-core.css
   Description: Shared post layout primitives + shared gallery/carousel + shared map container helpers.
*/

/* Hide THEME-rendered title + featured image on CPT singles (EXCEPT poll)
   - Do NOT hide .entry-header itself (poll template uses it)
   - Cover classic themes (entry-title, post-thumbnail, wp-post-image)
   - Cover block/FSE themes (wp-block-post-title, wp-block-post-featured-image)
*/

/* ----------------------------
   TITLE (non-poll CPT singles)
   ---------------------------- */
.single-business .entry-header .entry-title,
.single-business .entry-header .wp-block-post-title,
.single-business .page-header .entry-title,
.single-business .page-header .wp-block-post-title,

.single-news .entry-header .entry-title,
.single-news .entry-header .wp-block-post-title,
.single-news .page-header .entry-title,
.single-news .page-header .wp-block-post-title,

.single-giveaway .entry-header .entry-title,
.single-giveaway .entry-header .wp-block-post-title,
.single-giveaway .page-header .entry-title,
.single-giveaway .page-header .wp-block-post-title,

.single-offer .entry-header .entry-title,
.single-offer .entry-header .wp-block-post-title,
.single-offer .page-header .entry-title,
.single-offer .page-header .wp-block-post-title,

.single-voucher .entry-header .entry-title,
.single-voucher .entry-header .wp-block-post-title,
.single-voucher .page-header .entry-title,
.single-voucher .page-header .wp-block-post-title {
  display: none !important;
}

/* ----------------------------
   FEATURED IMAGE (non-poll CPT singles)
   ---------------------------- */
.single-business .entry-header img.wp-post-image,
.single-business .entry-header .post-thumbnail,
.single-business .entry-header figure.wp-block-post-featured-image,
.single-business .entry-header .wp-block-post-featured-image,

.single-news .entry-header img.wp-post-image,
.single-news .entry-header .post-thumbnail,
.single-news .entry-header figure.wp-block-post-featured-image,
.single-news .entry-header .wp-block-post-featured-image,

.single-giveaway .entry-header img.wp-post-image,
.single-giveaway .entry-header .post-thumbnail,
.single-giveaway .entry-header figure.wp-block-post-featured-image,
.single-giveaway .entry-header .wp-block-post-featured-image,

.single-offer .entry-header img.wp-post-image,
.single-offer .entry-header .post-thumbnail,
.single-offer .entry-header figure.wp-block-post-featured-image,
.single-offer .entry-header .wp-block-post-featured-image,

.single-voucher .entry-header img.wp-post-image,
.single-voucher .entry-header .post-thumbnail,
.single-voucher .entry-header figure.wp-block-post-featured-image,
.single-voucher .entry-header .wp-block-post-featured-image {
  display: none !important;
}

/* ----------------------------
   POLL: allow entry-header (your poll template uses it)
   If the theme still outputs a title above your poll content, hide only the title.
   ---------------------------- */
.single-poll .entry-header .entry-title,
.single-poll .entry-header .wp-block-post-title,
.single-poll .page-header .entry-title,
.single-poll .page-header .wp-block-post-title {
  display: none !important;
}

/* Ensure poll featured image is not hidden by theme rules */
.single-poll .entry-header,
.single-poll .entry-header .pvs-featured,
.single-poll .entry-header .pvs-featured img {
  display: block !important;
}

/* =========================
   CORE SURFACE + TYPOGRAPHY
   Public single-post width policy lives here.
   ========================= */

.ll-post-surface {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
  box-sizing: border-box;
}

/* =========================
   CORE GRID PRIMITIVES
   ========================= */

.ll-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin: 24px 0;
}

.ll-left-column,
.ll-right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Responsive core grid */
@media (max-width: 900px) {
  .ll-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ll-post-surface {
    margin: 1.25rem auto;
    padding: 1.5rem 1.25rem;
  }

  .ll-section-grid {
    gap: 24px;
  }
}

/* =========================
   SHARED "CARD" BLOCKS
   ========================= */

.info-section,
.company-facts {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.address-map-container {
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 1rem 1.25rem;
}

.info-section p {
  margin: 0 0 0.6rem;
  line-height: 1.4;
}

.info-section strong {
  font-weight: 700;
}

.map-address,
.address-map-container .map-address {
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

/* NOTE: no global "margin: 60px 0" here — spacing is controlled by grid gaps. */

.google-map,
.ll-map-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.google-map iframe,
.ll-map-embed iframe,
.ll-microsite-map-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

/* Important: embedded maps inside the address block should stay in normal flow */
.address-map-container iframe {
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  min-height: 260px;
  height: 260px;
  border: 0;
  border-radius: 8px;
}

/* Company facts (if used) */
.company-facts {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.company-facts h3,
.company-facts h4 {
  margin: 10px 0 6px;
}

.company-facts p {
  margin: 0 0 12px;
  white-space: pre-wrap;
}

/* =========================
   SHARED PUBLIC POST CARD
   Used by news, event, offer, giveaway, voucher
   ========================= */

.ll-event-page {
  width: 100%;
  padding: 0;
}

.ll-event-card {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.ll-event-titleblock--full {
  display: block;
  width: 100%;
  margin: 0 0 24px;
}

.ll-event-titleblock--full .ll-event-title {
  margin: 0;
}

.ll-event-titleblock--full .ll-event-datetime {
  margin-top: 12px;
}

.ll-event-titleblock--datetime {
  margin: 0 0 20px;
}

.ll-event-title {
  margin: 0;
  line-height: 1.5;
}

.ll-event-datetime__primary {
  font-weight: 600;
}

.ll-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
}

.ll-event-left,
.ll-event-right {
  min-width: 0;
  width: 100%;
}

.ll-event-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 380px;
}

.ll-event-hero__lightbox-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ll-event-hero__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

.ll-event-hero__placeholder {
  width: 100%;
  min-height: 240px;
  border-radius: 12px;
  background: #f1f5f9;
}

.ll-event-related-business {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e3e7ee;
  clear: both;
}

.ll-event-related-business__title {
  margin: 0 0 18px;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
}

.ll-event-related-business .ll-post-surface,
.ll-event-related-business .ll-basic-business-card,
.ll-event-related-business .ll-premium,
.ll-event-related-business .ll-business-card {
  width: 100%;
}

.ll-event-location-map {
  margin-top: 14px;
}

.ll-event-location-map iframe {
  display: block;
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 12px;
}

/* =========================
   ADMIN BOX (shared)
   ========================= */

.admin-controls {
  background: #fff;
  border: 1px dashed #ccc;
  padding: 15px;
  margin-bottom: 20px;
}

.admin-controls__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.admin-controls__note {
  margin: 0;
  font-style: italic;
}

.admin-controls__actions {
  display: flex;
  gap: 10px;
}

/* =========================
   SHARED OWNER/AUTHOR SHELL
   Used by news, event, offer, giveaway, voucher
   ========================= */

.ll-post-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 12px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  box-sizing: border-box;
}

.ll-post-shell__sidebar,
.ll-post-shell__main {
  min-width: 0;
}

.ll-post-shell__sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

/* Let the main card use the shell width instead of centering itself again */
.ll-post-shell .ll-event-page {
  padding: 0;
}

.ll-post-shell .ll-event-card {
  max-width: none;
  margin: 0;
}

@media (max-width: 1080px) {
  .ll-post-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ll-post-shell__sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 900px) {
  .ll-event-titleblock--full {
    margin-bottom: 18px;
  }

  .ll-event-grid {
    grid-template-columns: 1fr;
  }

  .ll-event-titleblock--datetime {
    margin-bottom: 18px;
  }

  .ll-event-hero {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .ll-event-card {
    padding: 18px;
  }
}