/*
 * Halecare — core block styles. Loaded on the front end and in the block editor.
 * Every core block is styled to match the theme; colours come from the Customizer variables.
 */

/* Text */
.wp-block-heading { overflow-wrap: anywhere; }
.has-drop-cap:not(:focus)::first-letter {
	float: left;
	margin: 0.08em 0.12em 0 0;
	font-family: var(--hl-font-head);
	font-size: 4.2em;
	font-weight: 800;
	line-height: 0.82;
	color: var(--hl-accent);
}
p.is-style-halecare-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 0.6em;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hl-link);
}
p.is-style-halecare-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.wp-block-list.is-style-halecare-check { list-style: none; padding-inline-start: 0; }
.wp-block-list.is-style-halecare-check li { position: relative; padding-inline-start: 34px; margin-bottom: 0.6em; }
.wp-block-list.is-style-halecare-check li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.2em;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--hl-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Quote and pull quote */
.wp-block-quote {
	position: relative;
	margin-block: 2em;
	padding: 28px 30px 26px;
	padding-inline-start: 34px;
	background: var(--hl-surface);
	border: 1px solid var(--hl-line);
	border-inline-start: 5px solid var(--hl-accent);
	border-radius: var(--hl-radius);
	font-size: 1.15em;
}
.wp-block-quote p:last-of-type { margin-bottom: 0; }
.wp-block-quote cite,
.wp-block-quote .wp-block-quote__citation { display: block; margin-top: 14px; font-size: 0.8em; font-weight: 700; font-style: normal; color: var(--hl-muted); }
.wp-block-quote.is-style-plain { background: none; border: 0; padding: 0; }
.wp-block-quote.is-style-large,
.wp-block-quote.is-large { font-size: 1.45em; font-family: var(--hl-font-head); }
.wp-block-quote.has-text-align-right { border-inline-start-width: 1px; border-inline-end: 5px solid var(--hl-accent); }
.wp-block-quote.has-text-align-center { border-inline-start-width: 1px; border-top: 5px solid var(--hl-accent); }

.wp-block-pullquote {
	margin-block: 2.4em;
	padding: 2.4em 1.5em;
	border-block: 4px solid var(--hl-accent);
	text-align: center;
	color: var(--hl-ink);
}
.wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; background: none; }
.wp-block-pullquote p { font-family: var(--hl-font-head); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 700; line-height: 1.3; }
.wp-block-pullquote cite { color: var(--hl-muted); font-style: normal; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }
.wp-block-pullquote.has-background { border: 0; border-radius: var(--hl-radius); }

.wp-block-verse { font-family: inherit; padding: 1.25em 1.5em; background: var(--hl-surface); border: 1px solid var(--hl-line); border-radius: var(--hl-radius); color: var(--hl-ink); white-space: pre-wrap; }
.wp-block-preformatted { white-space: pre-wrap; }
.wp-block-code { padding: 1.25em 1.4em; background: var(--hl-ink-2); color: #f2f5f7; border: 0; border-radius: var(--hl-radius); }
.wp-block-code code { background: none; color: inherit; padding: 0; }

/* Buttons */
.wp-block-button__link,
.wp-element-button {
	padding: 0.85em 1.5em;
	border-radius: var(--hl-radius);
	background-color: var(--hl-accent);
	color: var(--hl-on-accent);
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wp-block-button__link:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px var(--hl-accent); color: var(--hl-on-accent); }
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline { background: transparent; border: 2px solid currentColor; color: var(--hl-ink); padding: calc(0.85em - 2px) calc(1.5em - 2px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { color: var(--hl-accent); box-shadow: none; }
.wp-block-buttons { gap: 12px; }

/* Separators and spacers */
.wp-block-separator { border: 0; border-top: 2px solid var(--hl-line); margin-block: 2.5em; opacity: 1; }
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) { width: 96px; border-top: 4px solid var(--hl-accent); }
.wp-block-separator.is-style-wide { width: 100%; }
.wp-block-separator.is-style-dots { border: 0; }
.wp-block-separator.is-style-dots::before { color: var(--hl-accent); font-size: 1.6em; letter-spacing: 1.4em; padding-inline-start: 1.4em; }
.wp-block-separator.has-background:not(.is-style-dots) { border-top-color: currentColor; }

/* Media */
.wp-block-image { margin-bottom: 1.5em; }
.wp-block-image img { border-radius: calc(var(--hl-radius) * 0.7); }
.wp-block-image.is-style-rounded img { border-radius: 9999px; }
.wp-block-image.is-style-halecare-framed img { padding: 10px; background: var(--hl-surface); border: 1px solid var(--hl-line); box-shadow: 14px 14px 0 var(--hl-accent); }
.wp-block-image figcaption,
.wp-block-embed figcaption,
.wp-block-video figcaption,
.wp-block-audio figcaption,
.wp-block-gallery figcaption,
.wp-block-table figcaption { font-size: 0.85rem; color: var(--hl-muted); text-align: center; }

.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 8px; }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption { border-radius: 0 0 8px 8px; font-size: 0.8rem; color: #fff; }

.wp-block-cover,
.wp-block-cover-image { border-radius: var(--hl-radius); overflow: hidden; padding: 3em 2em; }
.wp-block-cover.alignfull { border-radius: 0; }
.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3 { color: inherit; }
.wp-block-cover .wp-block-cover__inner-container > :first-child { margin-top: 0; }

.wp-block-media-text { gap: 0; background: var(--hl-surface); border: 1px solid var(--hl-line); border-radius: var(--hl-radius); overflow: hidden; }
.wp-block-media-text .wp-block-media-text__content { padding: 2em 2.4em; }
.wp-block-media-text.has-background { border: 0; }

.wp-block-video video,
.wp-block-embed iframe { border-radius: var(--hl-radius); }
.wp-block-audio audio { width: 100%; }
.wp-block-embed { margin-block: 1.75em; }

.wp-block-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	background: var(--hl-surface);
	border: 1px solid var(--hl-line);
	border-radius: var(--hl-radius);
}
.wp-block-file a:not(.wp-block-file__button) { font-weight: 700; color: var(--hl-ink); }
.wp-block-file .wp-block-file__button { margin-inline-start: auto; padding: 0.6em 1.1em; border-radius: calc(var(--hl-radius) * 0.6); background: var(--hl-accent); color: var(--hl-on-accent); font-size: 0.9rem; font-weight: 700; text-decoration: none; }

/* Tables */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { background: var(--hl-surface); border: 1px solid var(--hl-line); border-radius: var(--hl-radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.wp-block-table th,
.wp-block-table td { border: 0; border-bottom: 1px solid var(--hl-line); padding: 0.8em 1em; }
.wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-table thead th { background: var(--hl-ink-2); color: #fff; border: 0; }
.wp-block-table tfoot td { font-weight: 700; background: var(--hl-accent-soft); border-top: 1px solid var(--hl-line); }
.wp-block-table.is-style-stripes { border-bottom: 0; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--hl-accent-soft); }
.wp-block-table.is-style-stripes td { border-bottom: 0; }

/* Layout */
.wp-block-group.has-background { padding: 2em 2.2em; border-radius: var(--hl-radius); }
.wp-block-group.alignfull.has-background { border-radius: 0; }
.wp-block-group.is-style-halecare-card {
	padding: 2em 2.2em;
	background: var(--hl-surface);
	border: 1px solid var(--hl-line);
	border-radius: var(--hl-radius);
	box-shadow: 0 24px 40px -32px rgba(5, 15, 25, 0.45);
}
.wp-block-columns { gap: 2em; margin-bottom: 1.75em; }
.wp-block-column > :first-child { margin-top: 0; }
.wp-block-details { padding: 16px 20px; margin-bottom: 12px; background: var(--hl-surface); border: 1px solid var(--hl-line); border-radius: var(--hl-radius); }
.wp-block-details summary { font-weight: 700; cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: 10px; color: var(--hl-link); }

/* Widgets as blocks */
.wp-block-search__label { font-weight: 700; }
.wp-block-search__inside-wrapper { gap: 8px; }
.wp-block-search__input { min-width: 0; }
.wp-block-search__input { border: 1px solid var(--hl-line); border-radius: calc(var(--hl-radius) * 0.6); background: var(--hl-surface); color: var(--hl-ink); padding: 0.7em 0.9em; }
.wp-block-search__button { flex-shrink: 0; white-space: nowrap; margin-inline-start: 0; padding: 0.7em 1.1em; border: 0; border-radius: calc(var(--hl-radius) * 0.6); background: var(--hl-accent); color: var(--hl-on-accent); font-weight: 700; }
.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { padding: 4px; border: 1px solid var(--hl-line); border-radius: calc(var(--hl-radius) * 0.6); background: var(--hl-surface); }
.wp-block-search.wp-block-search__button-inside .wp-block-search__input { border: 0; }

.wp-block-latest-posts,
.wp-block-archives,
.wp-block-categories,
.wp-block-page-list,
.wp-block-rss,
.wp-block-latest-comments { padding-inline-start: 0; list-style: none; }
.wp-block-latest-posts li,
.wp-block-archives li,
.wp-block-categories li,
.wp-block-rss li,
.wp-block-latest-comments li { padding-block: 8px; border-bottom: 1px solid var(--hl-line); }
.wp-block-latest-posts li:last-child,
.wp-block-archives li:last-child,
.wp-block-categories li:last-child,
.wp-block-rss li:last-child,
.wp-block-latest-comments li:last-child { border-bottom: 0; }
.wp-block-latest-posts__post-title,
.wp-block-rss__item-title a { font-weight: 700; color: var(--hl-ink); text-decoration: none; }
.wp-block-latest-posts__post-date,
.wp-block-latest-posts__post-author,
.wp-block-rss__item-publish-date,
.wp-block-latest-comments__comment-date { display: block; font-size: 0.82rem; color: var(--hl-muted); }
.wp-block-latest-posts.is-grid { gap: 20px; }
.wp-block-latest-posts.is-grid li { border: 0; padding: 0; }
.wp-block-latest-posts__featured-image img { border-radius: calc(var(--hl-radius) * 0.6); }
.wp-block-latest-comments__comment { margin-bottom: 0; }
.wp-block-latest-comments .avatar { border-radius: 50%; }

.wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-block-tag-cloud a,
.tagcloud a {
	display: inline-block;
	padding: 5px 12px;
	border: 1px solid var(--hl-line);
	border-radius: 99px;
	background: var(--hl-surface);
	color: var(--hl-ink);
	font-size: 0.85rem !important;
	text-decoration: none;
}
.wp-block-tag-cloud a:hover,
.tagcloud a:hover { background: var(--hl-accent); border-color: var(--hl-accent); color: var(--hl-on-accent); }
.wp-block-tag-cloud.is-style-outline a { background: transparent; }

.wp-block-calendar table,
#wp-calendar { width: 100%; background: var(--hl-surface); border: 1px solid var(--hl-line); border-radius: calc(var(--hl-radius) * 0.6); border-collapse: separate; border-spacing: 0; }
.wp-block-calendar th,
.wp-block-calendar td,
#wp-calendar th,
#wp-calendar td { padding: 6px; text-align: center; border: 0; }
.wp-block-calendar th { background: var(--hl-accent-soft); color: var(--hl-ink); }
.wp-block-calendar caption,
#wp-calendar caption { margin-bottom: 8px; font-weight: 700; }
.wp-block-calendar a,
#wp-calendar a { font-weight: 700; color: var(--hl-link); }
.wp-calendar-nav { display: flex; justify-content: space-between; margin-top: 8px; }

.wp-block-social-links { gap: 10px; }
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link { background: var(--hl-ink-2); color: #fff; }
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link:hover { background: var(--hl-accent); color: var(--hl-on-accent); }

.wp-block-navigation a { text-decoration: none; }
.wp-block-site-logo img { border-radius: 0; }
.wp-block-post-author,
.wp-block-post-author-biography { font-size: 0.95rem; }
.wp-block-avatar img { border-radius: 50%; }

.wp-block-footnotes { font-size: 0.9rem; color: var(--hl-muted); padding-top: 1em; border-top: 1px solid var(--hl-line); }
.wp-block-more,
.more-link { font-weight: 700; }
.wp-block-read-more { font-weight: 700; color: var(--hl-link); }

/* Colour helpers so palette classes follow the Customizer colours. */
.has-accent-color { color: var(--hl-accent) !important; }
.has-accent-background-color { background-color: var(--hl-accent) !important; color: var(--hl-on-accent); }
.has-ink-background-color { background-color: var(--hl-ink-2) !important; color: #fff; }
.has-ink-background-color :where(h1, h2, h3, h4, h5, h6, a:not(.wp-block-button__link)) { color: inherit; }
.has-accent-soft-background-color { background-color: var(--hl-accent-soft) !important; }
.has-paper-background-color { background-color: var(--hl-paper) !important; }
.has-white-background-color { background-color: var(--hl-surface) !important; }
