/*
Theme Name: Dr. Mihail
Description: A WordPress block theme built with Shader and VX Framework, with block templates and theme.json.
Author: Shader
Author URI: https://vxframework.com
Text Domain: dr-mihail
Version: 0.1.0
Requires at least: 7.1
Requires PHP: 8.1
Update URI: false
*/

/*
 * Plumbing only. The look lives in theme.json; this file holds what theme.json
 * can't express. It loads on the site and in the editor, so its rules must hold
 * in both.
 */

/* WordPress puts a block gap between the template's top-level blocks: the
   header part, main and the footer part. Sections own their spacing instead.
   The editor's canvas root is .wp-site-blocks too while it shows a template,
   but there WordPress prints that gap after this file, so :root makes this win. */
:root .wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main keeps its distance from the header and footer. A
   template whose main starts or ends with a full-bleed section adds the
   is-flush class to main. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--50);
}

.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* Keyboard focus stays visible on every control, and only there: in the
   editor, the text being typed in has focus too. */
:where(a, button, input, select, textarea, summary, [tabindex]:not([contenteditable])):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ---- Dr. Mihail: site chrome ------------------------------------------------------------------------------ */

/* Sections own their spacing, so main adds none of its own. */
.wp-site-blocks main { padding-block: 0; }
.wp-site-blocks main > * + * { margin-block-start: var(--wp--preset--spacing--60); }
.wp-site-blocks main > .alignwide:first-child { margin-top: 0; }

/* The header: a floating, sticky white pill with the logo, the navigation and the appointment button. */
.drm-sticky { position: sticky; top: 0; z-index: 50; }
.drm-header { padding-top: 0.75rem; padding-bottom: 0.25rem; }
/* The frosted bar is a background layer: a filter on the bar itself would make it the container of the phone menu
   overlay, which then opens inside the bar instead of over the page. */
.drm-header__pill { position: relative; isolation: isolate; align-items: center; min-height: 4rem; padding: 0.5rem 0.5rem 0.5rem 1.5rem; }
.drm-header__pill::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 1px solid rgb(255 255 255 / 0.7); border-radius: 999px; background: rgb(255 255 255 / 0.88); box-shadow: var(--wp--preset--shadow--card); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.drm-header__pill .wp-block-dr-mihail-contact-buttons { margin: 0; }
.drm-nav { margin-left: auto; }
.drm-nav .wp-block-navigation-item__content { display: flex; min-height: 2.75rem; align-items: center; padding: 0 0.875rem; border-radius: 999px; color: var(--wp--preset--color--ink); text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.drm-nav .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--paper-deep); }
.drm-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.drm-nav .wp-block-navigation-item__content[aria-current="page"] { background: var(--wp--preset--color--sage); color: var(--wp--preset--color--forest); }
.drm-nav .wp-block-navigation__responsive-container-open { min-width: 2.75rem; min-height: 2.75rem; border-radius: 999px; }
.drm-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper); padding: 1.5rem; }
.drm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.25rem; }

/* The footer: a rounded forest panel. */
.drm-footer { padding: var(--wp--preset--spacing--40) 0 1rem; margin-top: var(--wp--preset--spacing--40); }
.drm-footer__panel { position: relative; isolation: isolate; overflow: hidden; background: var(--wp--preset--color--forest-deep); color: var(--wp--preset--color--white); border-radius: var(--wp--custom--radius--panel); padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 4rem) 2rem; }
.drm-footer__panel::before { content: ""; position: absolute; z-index: -1; top: -14rem; right: -10rem; width: 44rem; height: 44rem; border-radius: 999px; background: radial-gradient(circle, rgb(220 232 223 / 0.12), transparent 65%); }
.drm-footer__panel a { color: rgb(255 255 255 / 0.75); text-decoration: none; transition: color 0.2s; }
.drm-footer__panel a:hover { color: var(--wp--preset--color--white); }
.drm-footer__cols { gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1.4fr 1fr 1fr 0.8fr; }
.drm-footer__cols > * > * + * { margin-top: 1rem; }
.drm-footer__label { margin: 0 0 1.25rem; font-family: var(--wp--preset--font-family--body); font-size: var(--wp--preset--font-size--label); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.6); }
.drm-footer__text { max-width: 38ch; color: rgb(255 255 255 / 0.75); font-size: 0.9375rem; }
.drm-footer__emergency { padding-left: 1rem; border-left: 2px solid var(--wp--preset--color--signal); font-size: 0.9375rem; color: rgb(255 255 255 / 0.8); }
.drm-footer__brand .wp-block-dr-mihail-logo { color: var(--wp--preset--color--white); }
.drm-footer__brand .wp-block-dr-mihail-logo .drm-logo__descriptor { color: rgb(255 255 255 / 0.6); }
.drm-footer__links, .drm-footer__links .wp-block-post-template, .drm-footer__links ul { margin: 0; padding: 0; list-style: none; }
.drm-footer__links .wp-block-post-template > li, .drm-footer__links .wp-block-navigation-item { margin: 0; }
.drm-footer__links .wp-block-post-title, .drm-footer__links .wp-block-navigation-item__content { margin: 0; padding: 0.25rem 0; font-size: 0.9375rem; }
.drm-footer__links .wp-block-navigation__container { gap: 0.25rem; }
.drm-footer__bottom { margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 2rem; border-top: 1px solid rgb(255 255 255 / 0.15); align-items: center; gap: 1.5rem; font-size: 0.875rem; color: rgb(255 255 255 / 0.6); }
.drm-footer__bottom p { margin: 0; }
.drm-footer__bottom a { display: inline-flex; min-height: 2rem; align-items: center; }
.drm-footer__bottom .wp-block-navigation .wp-block-navigation-item__content { padding: 0; }
.drm-footer__profile { margin: 0; }

/* The closing call to action. */
.drm-cta { margin-top: var(--wp--preset--spacing--60); }

/* Running text of pages and posts. */
.entry > .wp-block-post-content > * + * { margin-top: 1.25rem; }
.entry h2 { margin-top: 2.5rem; }

@media (max-width: 1024px) { .drm-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 782px) {
	.drm-header__pill { padding-left: 1.25rem; }
	.drm-header__pill .wp-block-dr-mihail-contact-buttons { display: none; }
	.drm-footer__cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Pages built from VX data: treatment, team member ------------------------------------------------------- */

.drm-split { gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.drm-split .drm-hero-copy > * { margin-block: 0; }
.drm-split .drm-hero-copy > * + * { margin-top: 1.5rem; }
.drm-split h1 { max-width: 20ch; text-wrap: balance; }
.drm-split .drm-hero-side > * + * { margin-top: 1rem; }
.drm-split .wp-block-post-featured-image { margin: 0; }
.drm-split .wp-block-post-featured-image img { width: 100%; border-radius: var(--wp--custom--radius--card); }
.drm-facts .drm-fact { gap: 1rem; padding-block: 0.875rem; border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 10%, transparent); }
.drm-facts .drm-fact:last-child { border-bottom: 0; }
.drm-facts .drm-fact > * { margin: 0; }
.drm-facts .drm-fact__label { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.drm-facts .drm-fact__value { font-weight: 500; text-align: right; }

.drm-article { gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; }
.drm-article__main > * + * { margin-top: var(--wp--preset--spacing--50); }
.drm-article__section { padding-top: var(--wp--preset--spacing--40); border-top: 1px solid var(--wp--preset--color--line); }
.drm-article__section > * + * { margin-top: 1.5rem; }
.drm-article__section > h2 { margin-top: 0; font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem); }
.drm-aside { position: sticky; top: 8rem; }
.drm-aside > * + * { margin-top: 1rem; }
.drm-aside .drm-aside__title { font-family: var(--wp--preset--font-family--display); font-weight: 600; }
.drm-aside .wp-block-dr-mihail-contact-buttons { flex-direction: column; align-items: stretch; }
.drm-aside .wp-block-button, .drm-aside .wp-block-button__link { width: 100%; }

.drm-checks { gap: 1rem 2rem; }
.drm-check { position: relative; padding-left: 2.25rem; }
.drm-check > p { margin: 0; }
.drm-check::before { content: ""; position: absolute; left: 0; top: 0.15rem; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--wp--preset--color--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324483f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 0.9rem no-repeat; }
.drm-steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drm-person { gap: 1.25rem; align-items: center; }
.drm-person > .wp-block-image { margin: 0; flex: none; width: 6rem; }
.drm-person > .wp-block-image img { width: 6rem; height: 6rem; border-radius: 1.25rem; object-fit: cover; }
.drm-person > .wp-block-group > * { margin: 0; }
.drm-person .drm-person__name { font-family: var(--wp--preset--font-family--display); font-weight: 600; }
.drm-person .drm-person__role { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.drm-edu-list > * + * { margin-top: 0.75rem; }
.drm-edu { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; padding-block: 0.75rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.drm-edu > * { margin: 0; }
.drm-edu__period { font-weight: 600; font-variant-numeric: tabular-nums; }
.drm-portrait__role { font-size: 0.8125rem; }

.drm-header__pill .wp-block-button__link { white-space: nowrap; }

@media (max-width: 782px) {
	.drm-split, .drm-article { grid-template-columns: minmax(0, 1fr); }
	.drm-aside { position: static; }
	.drm-steps-list { grid-template-columns: minmax(0, 1fr); }
	.drm-edu { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* Footer details. */
.drm-footer__panel .wp-block-navigation a, .drm-footer__panel .wp-block-navigation .wp-block-navigation-item__content { color: rgb(255 255 255 / 0.75); font-weight: 400; text-decoration: none; }
.drm-footer__panel .wp-block-navigation a:hover { color: var(--wp--preset--color--white); }
.drm-footer__panel .wp-block-dr-mihail-hours-table dd { text-align: right; }
.drm-footer__bottom .wp-block-navigation { margin-left: auto; }
.drm-footer__bottom .wp-block-navigation .wp-block-navigation__container { gap: 1.5rem; }

/* Grids of groups keep their column count on a phone unless told otherwise: one column, with a few that stay two. */
@media (max-width: 782px) {
	.wp-block-group.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
	.wp-block-group.is-layout-grid.is-style-facts,
	.wp-block-group.is-layout-grid.drm-gallery,
	.wp-block-group.is-layout-grid.drm-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wp-block-group.is-layout-grid.drm-checks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
	.wp-block-group.is-layout-grid.is-style-facts { grid-template-columns: minmax(0, 1fr); }
}

/* The phone menu: an overlay with the items left-aligned and large. */
.drm-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem 1.5rem 2rem; }
.drm-nav .is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start; padding-top: 3.5rem; }
.drm-nav .is-menu-open .wp-block-navigation__container { align-items: flex-start; gap: 0.25rem; }
.drm-nav .is-menu-open .wp-block-navigation-item__content { min-height: 3.25rem; font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }

/* The phone's call-to-action bar: always within reach below the tablet width. */
.drm-mobilebar { display: none; }
@media (max-width: 782px) {
	.drm-mobilebar { display: block; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--wp--preset--color--line); background: rgb(255 255 255 / 0.96); box-shadow: 0 -8px 24px -12px rgb(32 39 37 / 0.2); }
	.drm-mobilebar .wp-block-buttons { flex-wrap: nowrap; gap: 0.5rem; }
	.drm-mobilebar .wp-block-button { flex: 1 1 0; }
	.drm-mobilebar .wp-block-button__link { width: 100%; padding-inline: 0.75rem; white-space: nowrap; }
	body { padding-bottom: 5.25rem; }
}

/* An accordion's answers are closed from the first paint: WordPress hides them with its script, so until that loads they
   would all be open and the page would jump when they close. The editor keeps showing them. */
body:not(.editor-styles-wrapper) .wp-block-accordion-item:not(.is-open) > .wp-block-accordion-panel { display: none; }

/* The call bar slides in once the visitor has scrolled past the first screen (assets/js/theme.js); without the script it
   stays out of the way. */
.drm-mobilebar { transition: transform 0.25s ease-out; }
.drm-mobilebar.is-armed:not(.is-visible) { transform: translateY(110%); }
@media (prefers-reduced-motion: reduce) { .drm-mobilebar { transition: none; } }

/* Page details. */
.drm-narrow { max-width: 56rem; margin-inline: auto; }
.drm-split-content { gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.drm-split-content > .wp-block-group > * + * { margin-top: 1.25rem; }
.drm-history { margin-bottom: var(--wp--preset--spacing--40); }
.drm-history > * + * { margin-top: 1.25rem; }
.drm-history p { max-width: 68ch; }
.drm-lead-in { font-weight: 500; color: var(--wp--preset--color--ink); }
.drm-bring { margin-top: var(--wp--preset--spacing--40); }
.drm-faq-list .wp-block-post-template { gap: 0; }
.drm-faq-list .wp-block-post-template > li { margin: 0; }
.drm-gallery .wp-block-image { margin: 0; }
.drm-gallery .wp-block-image img { width: 100%; border-radius: var(--wp--custom--radius--card); }
.drm-team-grid .wp-block-post-template { gap: var(--wp--preset--spacing--20); }
@media (max-width: 782px) { .drm-split-content { grid-template-columns: minmax(0, 1fr); } }

.drm-aside .wp-block-dr-mihail-contact-buttons.wp-block-buttons { flex-direction: column; align-items: stretch; gap: 0.75rem; }
.drm-aside .wp-block-dr-mihail-contact-buttons .wp-block-button { width: 100%; margin: 0; }
.drm-aside .wp-block-dr-mihail-contact-buttons .wp-block-button__link { width: 100%; }

/* The team photo: the retouched cut-out on white, in a rounded panel, cropped from the top like a wide banner. */
.wp-block-image.drm-team-photo { overflow: hidden; border-radius: var(--wp--custom--radius--panel); background: var(--wp--preset--color--white); }
.wp-block-image.drm-team-photo img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center top; border-radius: 0; }
@media (max-width: 1024px) { .wp-block-image.drm-team-photo img { aspect-ratio: 16 / 9; } }
@media (max-width: 782px) { .wp-block-image.drm-team-photo img { aspect-ratio: 4 / 3; } }

/* The wide picture under a page header (the practice page). */
.wp-block-image.drm-banner { margin: 0; }
.wp-block-image.drm-banner img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--wp--custom--radius--card); }
.drm-banner-wrap { margin-top: var(--wp--preset--spacing--30); }
.drm-prose > * + * { margin-top: 1.25rem; }
.drm-prose p { max-width: 68ch; font-size: var(--wp--preset--font-size--lead); }
@media (max-width: 782px) { .wp-block-image.drm-banner img { aspect-ratio: 4 / 3; } }
