/* ==========================================================================
   SSM Pharmacy — what it takes to make WordPress's block markup render
   exactly like the approved v5 build (site.css, carried over unchanged).

   Every rule here answers one difference between the hand-written v5 HTML and
   the markup core blocks save. Nothing here is new design.
   ========================================================================== */

/* A paragraph that only exists to hold a row of links or spans for the block
   editor. It generates no box, so the links stay the flex/grid items the v5
   CSS was written for. */
.is-contents { display: contents; }
/* ...and passes nothing on. v5 rules such as ".revs__grid p" set fonts and
   line-heights that the wrapped content never received in v5, because it was
   never inside a <p>. Doubled class to outrank them. */
p.is-contents.is-contents { all: inherit; display: contents; }

/* The tap-target padding on inline links must not reach the link rows that
   sit in an .is-contents paragraph (store pickers, CTA rows). */
p.is-contents > a:not(.btn) { padding-block: 0; }
.callpick__menu p.is-contents > a { padding: .75rem .9rem; }

/* ── store picker (core/details) ───────────────────────────────────────────
   core/details cannot put a class on <summary>, so the button is a span
   inside it and the caret moves onto that span. */
.callpick > summary { display: inline-flex; }
/* v5's margin on summary.btn collapsed into <details>; on a span inside the
   summary it would not, and the row grows by that margin. */
.callpick > summary > .btn { margin: 0; }
.callpick > summary::after { content: none; }
.callpick > summary > .btn::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15em) rotate(45deg); transition: transform .2s cubic-bezier(.2,.7,.3,1); }
.callpick[open] > summary > .btn::after { transform: translateY(.05em) rotate(-135deg); }
.callpick > summary:focus-visible { outline: none; }
.callpick > summary:focus-visible > .btn { outline: 3px solid var(--ida-red); outline-offset: 3px; }
.switch__form .is-contents + .callpick { margin-top: .8rem; }
@media (max-width: 560px) {
	.callpick > summary { display: flex; width: 100%; }
	.callpick > summary > .btn { width: 100%; }
}

/* WC3 form: core/shortcode wraps its output in a paragraph. */
.wc3form > p { display: contents; }

/* ── header: core/navigation drawn as the v5 bar ──────────────────────────── */
.hdr__phones a::before {
	content: ""; width: 18px; height: 18px; flex: none; background: var(--red-lift);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.24 11.4 11.4 0 0 0 3.6.58 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .58 3.6 1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.24 11.4 11.4 0 0 0 3.6.58 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .58 3.6 1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hdr__phones a:where(:hover, :focus-visible)::before { background: #fff; }

.hdr .hdr__logo { flex: none; margin: 0; }
.hdr .hdr__logo img { width: 138px; height: auto; }
.hdr .hdr__menu { margin-left: auto; position: static; }
.hdr .hdr__menu .wp-block-navigation__container { display: flex; flex-wrap: nowrap; gap: clamp(.7rem, 1vw, 1rem); }
.hdr .hdr__menu .wp-block-navigation-item__content {
	color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9375rem;
	padding: .35rem 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.hdr .hdr__menu .wp-block-navigation-item__content:where(:hover, :focus-visible),
.hdr .hdr__menu .wp-block-navigation-item__content[aria-current="page"] { color: var(--ida-blue); border-bottom-color: var(--ida-red); }
.hdr .hdr__menu .wp-block-navigation__responsive-container-open { padding: .7rem; color: var(--ink); }
.hdr .hdr__menu .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }

@media (min-width: 1241px) {
	.hdr .hdr__menu .wp-block-navigation__responsive-container-open,
	.hdr .hdr__menu .wp-block-navigation__responsive-container-close { display: none; }
	.hdr .hdr__menu .wp-block-navigation__responsive-container,
	.hdr .hdr__menu .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: block; position: static; inset: auto; background: none; padding: 0; z-index: auto;
	}
	.hdr .hdr__menu .wp-block-navigation__responsive-close,
	.hdr .hdr__menu .wp-block-navigation__responsive-dialog,
	.hdr .hdr__menu .wp-block-navigation__responsive-container-content { display: contents; }
}

@media (max-width: 1240px) {
	.hdr .hdr__bar { position: relative; }
	/* The open menu drops down under the bar, as in v5, rather than core's
	   full-screen overlay. */
	.hdr .hdr__menu .wp-block-navigation__responsive-container.is-menu-open {
		position: absolute; inset: 100% 0 auto 0; height: auto; overflow: visible; z-index: 40;
		background: var(--navy); color: #fff; padding: .5rem var(--gut) 1.25rem; animation: none;
	}
	.hdr .hdr__menu .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 0; align-items: stretch; }
	.hdr .hdr__menu .is-menu-open .wp-block-navigation__responsive-container-close { position: static; display: flex; margin-left: auto; color: #fff; padding: .6rem 0; }
	.hdr .hdr__menu .is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container { flex-direction: column; gap: 0; align-items: stretch; width: 100%; }
	.hdr .hdr__menu .is-menu-open .wp-block-navigation-item { width: 100%; }
	.hdr .hdr__menu .is-menu-open .wp-block-navigation-item__content {
		display: block; width: 100%; color: #fff; font-size: 1.125rem; padding: .9rem 0;
		border-bottom: 1px solid rgba(255,255,255,.12);
	}
	.hdr .hdr__menu .is-menu-open .wp-block-navigation-item__content:where(:hover, :focus-visible),
	.hdr .hdr__menu .is-menu-open .wp-block-navigation-item__content[aria-current="page"] { color: #BBD4F5; border-bottom-color: var(--ida-red); }
	html.has-modal-open { overflow: visible; }
}
@media (max-width: 620px) {
	.hdr .hdr__logo img { width: 112px; }
}

/* A card that was one big link in v5 (health library): the heading carries
   the link and stretches it over the card. */
.is-card { position: relative; }
.is-card :where(h1, h2, h3) a { color: inherit; text-decoration: none; padding: 0; }
.is-card :where(h1, h2, h3) a::after { content: ""; position: absolute; inset: 0; }
.lib__cat:has(a:where(:hover, :focus-visible)) { background: var(--sky); }

/* Health library search (core/search) in the v5 field style. */
.lib__search .wp-block-search__label { display: block; font-size: .8125rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-70); margin: 0 0 .5rem; }
.lib__search .wp-block-search__inside-wrapper { padding: 0; border: 0; }
.lib__search .wp-block-search__input {
	width: 100%; font: inherit; font-size: 1.0625rem; color: var(--ink); margin: 0;
	padding: .8rem 1rem; border: 2px solid var(--rule); border-radius: 4px; background: #fff;
}
.lib__search .wp-block-search__input:focus-visible { outline: 3px solid var(--ida-blue); outline-offset: 1px; border-color: var(--ida-blue); }
.is-card :where(h1, h2, h3) a { display: inline-block; padding-block: .35em; margin-block: -.35em; }

/* WordPress adds its own skip link; draw it the way v5 drew .skip — off-screen
   at full size until focused, rather than a 1px clipped box. */
a.skip-link.screen-reader-text {
	clip-path: none; width: auto; height: auto; margin: 0; overflow: visible;
	left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff;
	padding: 1rem 1.5rem; text-decoration: none; font-size: 1rem;
}
a.skip-link.screen-reader-text:focus { left: 0; }

/* Health-library article (templates/single.html). Reference furniture, like
   the library index: readable measure, modest headings. */
.article { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.article__wrap { max-width: 46rem; }
.article__wrap .wp-block-post-title { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin: .6rem 0 1.4rem; }
.article__body h2 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); margin: 2.2rem 0 .6rem; }
.article__body h3 { font-size: 1.2rem; margin: 1.6rem 0 .4rem; }
.article__body ul, .article__body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.article__body li { margin-bottom: .35em; }
.article .lib__foot { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.article .crumb { color: var(--ink-70); }
.article .crumb a { color: var(--deep); }
