/*
 * Pawdena — 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.
 */

/* The paw print used as a mask by headings, quotes and separators */
body,
.editor-styles-wrapper {
	--pd-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='6.5' cy='10' r='2.1'/%3E%3Ccircle cx='10' cy='5.8' r='2.1'/%3E%3Ccircle cx='14' cy='5.8' r='2.1'/%3E%3Ccircle cx='17.5' cy='10' r='2.1'/%3E%3Cpath d='M12 11.3c-3 0-5.8 3.8-5.8 6.4 0 1.8 1.3 2.6 2.8 2.6 1.3 0 2-.7 3-.7s1.7.7 3 .7c1.5 0 2.8-.8 2.8-2.6 0-2.6-2.8-6.4-5.8-6.4z'/%3E%3C/svg%3E");
}

/* 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(--pd-font-head);
	font-size: 4.4em;
	font-weight: 600;
	line-height: 0.82;
	color: var(--pd-accent);
}
p.is-style-pawdena-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 0.8em;
	padding: 6px 16px 6px 10px;
	border-radius: 999px;
	background: var(--pd-mint);
	color: var(--pd-mint-ink);
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.2;
}
p.is-style-pawdena-eyebrow::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--pd-paw) center / contain no-repeat; mask: var(--pd-paw) center / contain no-repeat; }
.has-text-align-center.is-style-pawdena-eyebrow { display: flex; width: max-content; max-width: 100%; margin-inline: auto; }

.wp-block-list.is-style-pawdena-check { list-style: none; padding-inline-start: 0; }
.wp-block-list.is-style-pawdena-check li { position: relative; padding-inline-start: 34px; margin-bottom: 0.6em; }
.wp-block-list.is-style-pawdena-check li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.2em;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--pd-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;
}

/* Quotes and pull quotes */
.wp-block-quote {
	position: relative;
	margin-block: 2em;
	padding: 26px 30px 26px 4.2rem;
	background: var(--pd-mint);
	border: 0;
	border-radius: var(--pd-radius);
	font-size: 1.15em;
}
.wp-block-quote::before { content: ""; position: absolute; top: 1.3em; inset-inline-start: 1.4rem; width: 28px; height: 28px; background: var(--pd-mint-ink); -webkit-mask: var(--pd-paw) center / contain no-repeat; mask: var(--pd-paw) center / contain no-repeat; }
.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-family: var(--pd-font-body); font-size: 0.8em; font-weight: 700; font-style: normal; color: var(--pd-mint-ink); }
.wp-block-quote.is-style-plain { background: none; padding: 0 0 0 3rem; }
.wp-block-quote.is-style-plain::before { top: 0.2em; inset-inline-start: 0; }
.wp-block-quote.is-style-large,
.wp-block-quote.is-large { font-size: 1.4em; }
.wp-block-quote.has-text-align-center { padding: 4rem 30px 28px; }
.wp-block-quote.has-text-align-center::before { inset-inline-start: calc(50% - 14px); }

.wp-block-pullquote {
	position: relative;
	margin-block: 2.4em;
	padding: 2.6em 1.8em 2.2em;
	border: 0;
	border-radius: var(--pd-radius);
	background: var(--pd-accent-soft);
	text-align: center;
	color: var(--pd-ink);
}
.wp-block-pullquote::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 0.6em; background: var(--pd-accent); -webkit-mask: var(--pd-paw) center / contain no-repeat; mask: var(--pd-paw) center / contain no-repeat; }
.wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.wp-block-pullquote blockquote::before { display: none; }
.wp-block-pullquote p { font-family: var(--pd-font-head); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 600; line-height: 1.3; }
.wp-block-pullquote cite { color: var(--pd-ink); font-style: normal; font-size: 0.9rem; font-weight: 700; }

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

/* Buttons */
.wp-block-button__link,
.wp-element-button {
	padding: 0.95em 1.9em;
	border-radius: 999px;
	background-color: var(--pd-accent);
	color: var(--pd-on-accent);
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wp-block-button__link { box-shadow: 0 4px 0 rgba(43, 35, 66, 0.22); }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(43, 35, 66, 0.22); color: var(--pd-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(--pd-ink); padding: calc(0.95em - 2px) calc(1.9em - 2px); box-shadow: none; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { color: var(--pd-accent); box-shadow: none; }
.wp-block-buttons { gap: 12px; }

/* Separators and spacers */
.wp-block-separator { height: 0; border: 0; border-top: 2px dotted var(--pd-line); margin-block: 2.5em; opacity: 1; background: none; -webkit-mask: none; mask: none; }
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) { width: 120px; height: 20px; border: 0; background: var(--pd-accent); -webkit-mask: var(--pd-paw) left center / 20px 20px space no-repeat; mask: var(--pd-paw) left center / 20px 20px space no-repeat; }
.wp-block-separator.is-style-wide { width: 100%; }
.wp-block-separator.is-style-dots { height: auto; border: 0; }
.wp-block-separator.is-style-dots::before { color: var(--pd-accent); font-size: 1.6em; letter-spacing: 1.4em; padding-inline-start: 1.4em; }
.wp-block-separator.has-background:not(.is-style-dots):not(.is-style-wide) { background-color: currentColor !important; }

/* Media */
.wp-block-image { margin-bottom: 1.5em; }
.wp-block-image img { border-radius: calc(var(--pd-radius) * 0.7); }
.wp-block-image.is-style-rounded img { border-radius: 9999px; }
.wp-block-image.is-style-pawdena-framed img { border: 8px solid var(--pd-surface); border-radius: 40% 60% 42% 58% / 52% 44% 56% 48%; box-shadow: 0 0 0 10px var(--pd-accent-soft); }
.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(--pd-muted); text-align: center; }

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

.wp-block-cover,
.wp-block-cover-image { border-radius: var(--pd-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(--pd-surface); border-radius: var(--pd-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(--pd-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(--pd-surface);
	border-radius: 22px;
}
.wp-block-file a:not(.wp-block-file__button) { font-weight: 700; color: var(--pd-ink); }
.wp-block-file .wp-block-file__button { margin-inline-start: auto; padding: 0.6em 1.1em; border-radius: 999px; background: var(--pd-accent); color: var(--pd-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(--pd-surface); border: 0; border-radius: 22px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.wp-block-table th,
.wp-block-table td { border: 0; border-bottom: 2px dotted var(--pd-line); padding: 0.8em 1.1em; }
.wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-table thead th { background: var(--pd-ink-2); color: #fff; border: 0; }
.wp-block-table tfoot td { font-weight: 700; background: var(--pd-accent-soft); border-top: 2px solid var(--pd-line); }
.wp-block-table.is-style-stripes { border-bottom: 0; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--pd-mint); }
.wp-block-table.is-style-stripes td { border-bottom: 0; }

/* Layout */
.wp-block-group.has-background { padding: 2em 2.2em; border-radius: var(--pd-radius); }
.wp-block-group.alignfull.has-background { border-radius: 0; }
.wp-block-group.is-style-pawdena-card {
	padding: 2em 2.2em;
	background: var(--pd-surface);
	border-radius: var(--pd-radius);
	box-shadow: 0 22px 44px -32px rgba(43, 35, 66, 0.5);
}
.wp-block-columns { gap: 2em; margin-bottom: 1.75em; }
.wp-block-column > :first-child { margin-top: 0; }
.wp-block-details { padding: 16px 22px; margin-bottom: 12px; background: var(--pd-surface); border-radius: 20px; }
.wp-block-details summary { font-weight: 700; cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: 10px; color: var(--pd-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: 2px solid var(--pd-line); border-radius: 999px; background: var(--pd-surface); color: var(--pd-ink); padding: 0.7em 0.9em; }
.wp-block-search__button { flex-shrink: 0; white-space: nowrap; margin-inline-start: 0; padding: 0.7em 1.3em; border: 0; border-radius: 999px; background: var(--pd-accent); color: var(--pd-on-accent); font-weight: 700; }
.wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { padding: 4px; border: 2px solid var(--pd-line); border-radius: 999px; background: var(--pd-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: 2px dotted var(--pd-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(--pd-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(--pd-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(--pd-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: 0;
	border-radius: 99px;
	background: var(--pd-mint);
	color: var(--pd-mint-ink);
	font-size: 0.85rem !important;
	font-weight: 600;
	text-decoration: none;
}
.wp-block-tag-cloud a:hover,
.tagcloud a:hover { background: var(--pd-accent); color: var(--pd-on-accent); }
.wp-block-tag-cloud.is-style-outline a { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }

.wp-block-calendar table,
#wp-calendar { width: 100%; background: var(--pd-surface); border: 0; border-radius: 18px; overflow: hidden; 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(--pd-mint); color: var(--pd-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(--pd-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(--pd-ink-2); color: #fff; }
.wp-block-social-links:not(.is-style-logos-only) .wp-social-link:hover { background: var(--pd-accent); color: var(--pd-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(--pd-muted); padding-top: 1em; border-top: 2px dotted var(--pd-line); }
.wp-block-more,
.more-link { font-weight: 700; }
.wp-block-read-more { font-weight: 700; color: var(--pd-link); }

/* Colour helpers so palette classes follow the Customizer colours. */
.has-accent-color { color: var(--pd-accent) !important; }
.has-accent-background-color { background-color: var(--pd-accent) !important; color: var(--pd-on-accent); }
.has-ink-background-color { background-color: var(--pd-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(--pd-accent-soft) !important; }
.has-paper-background-color { background-color: var(--pd-paper) !important; }
.has-white-background-color { background-color: var(--pd-surface) !important; }
.has-mint-background-color { background-color: var(--pd-mint) !important; }
