/* ==========================================================================
   Paradise Palms — WordPress compatibility layer
   The v3 design system has no core-block, alignment, caption, or admin-bar
   styles. Everything here exists only to make WordPress-generated markup sit
   correctly inside that design. Nothing here restyles the design itself.
   ========================================================================== */

/* --- Admin bar ------------------------------------------------------------
   The design's overlay header is position:absolute;top:0 and the mobile drawer
   hangs off var(--header-h). Neither accounts for the admin bar, so both need
   pushing down by its height. WP uses 32px desktop / 46px at <=782px.        */
body.admin-bar .site-header--overlay { top: 32px; }
body.admin-bar .mobile-menu { top: calc(var(--header-h) + 32px); }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header--overlay { top: 46px; }
  body.admin-bar .mobile-menu { top: calc(var(--header-h) + 46px); }
}

/* --- Image sizing --------------------------------------------------------
   WordPress adds width/height attributes to attachment images. Those map to
   presentational hints, and because the design's reset declares only
   `max-width` and never `height`, the attribute wins and forces the image to
   its full intrinsic height -- visibly stretching any slot that sizes itself
   with `aspect-ratio` (.feature-item__photos img, .kids-band__photo img).

   This rule is deliberately at specificity 0,0,1: it beats the presentational
   attribute, but loses to every `.class img` rule in the design that sets a
   height of its own, so nothing else changes.                                */
img { height: auto; }

/* --- Accessibility --------------------------------------------------------
   WordPress emits .screen-reader-text in menus, search forms and comments.   */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
}
.screen-reader-text:focus {
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  padding: var(--space-3) var(--space-5);
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100000;
  background: var(--stone);
  color: var(--teal);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
}

/* --- Editor alignment classes --------------------------------------------
   Scoped to .entry-content so they can never leak into the design's own
   layouts, several of which are position-sensitive.                         */
.entry-content .alignleft  { float: left;  margin: 0 var(--space-5) var(--space-4) 0; }
.entry-content .alignright { float: right; margin: 0 0 var(--space-4) var(--space-5); }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .alignwide { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; }
.entry-content .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.entry-content::after { content: ""; display: table; clear: both; }

/* --- Captions and figures ------------------------------------------------- */
.entry-content figure { margin: 0 0 var(--space-5); }
.entry-content figcaption,
.entry-content .wp-caption-text {
  margin-top: var(--space-2);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-style: italic;
}
.entry-content .wp-caption { max-width: 100%; }

/* --- Core blocks ----------------------------------------------------------
   Minimal, design-consistent defaults for blocks an editor might insert into
   a page's free-text area.                                                   */
.entry-content > * + * { margin-top: var(--space-4); }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2 { font-family: var(--font-headings); font-weight: 400; font-size: var(--fs-heading-2); line-height: var(--lh-heading-2); }
.entry-content h3 { font-family: var(--font-headings); font-weight: 400; font-size: var(--fs-heading-3); line-height: var(--lh-heading-3); }
.entry-content h4 { font-family: var(--font-headings); font-weight: 400; font-size: var(--fs-heading-4); line-height: var(--lh-heading-4); }
.entry-content ul:not(.checks) { list-style: disc; padding-left: var(--space-5); }
.entry-content ol { list-style: decimal; padding-left: var(--space-5); }
.entry-content li + li { margin-top: var(--space-2); }
.entry-content blockquote {
  margin: var(--space-6) 0;
  padding-left: var(--space-5);
  border-left: 2px solid var(--zen);
  font-family: var(--font-headings);
  font-size: var(--fs-heading-4);
  line-height: var(--lh-heading-4);
  font-style: italic;
}
.entry-content code, .entry-content pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.entry-content pre { overflow-x: auto; padding: var(--space-4); background: var(--stone-50); border-radius: var(--radius-sm); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: var(--space-2) var(--space-3); border-bottom: var(--hairline) solid var(--slate-40); text-align: left; }
.entry-content .wp-block-image img { height: auto; }

/* --- Search / 404 / index fallback ---------------------------------------- */
.pp-basic { padding: var(--section-pad) var(--page-margin); max-width: 860px; margin: 0 auto; }
.pp-basic .pp-result + .pp-result { margin-top: var(--space-6); padding-top: var(--space-6); border-top: var(--hairline) solid var(--slate-40); }
.pp-basic .pp-result h2 { font-family: var(--font-headings); font-weight: 400; font-size: var(--fs-heading-3); line-height: var(--lh-heading-3); }
.pp-searchform { display: flex; gap: var(--space-2); margin-top: var(--space-5); }
.pp-searchform input[type="search"] {
  flex: 1 0 0; min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--hairline) solid var(--slate);
  border-radius: var(--radius-sm);
  background: transparent;
}
.pp-pagination { display: flex; gap: var(--space-3); margin-top: var(--space-8); }
