/*
Theme Name: Island Seeker
Description: Front-end styles for the block editor's blocks.

All colours, fonts and widths come from the design tokens declared on :root in
style.css, which is enqueued before this file. Pure white is expressed as
var(--iseeker-color-bg) so that re-tuning the palette keeps button/overlay text
legible without editing this file.

NOTE: this file deliberately does NOT set `overflow-x: hidden` on #page. The
production child theme forces `#page.site { overflow-x: visible }` because the
hidden value breaks the `position: sticky` sidebar. Full-bleed blocks are kept
inside the viewport with the calc() maths below instead.
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Block Alignments
2.0 General Block Styles
3.0 Blocks - Common Blocks
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
7.0 Blocks - Embeds
8.0 Blocks - Colors
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Block Alignments
--------------------------------------------------------------*/

.alignfull,
.alignwide {
	clear: both;
}

body:not(.has-sidebar) .alignfull,
body:not(.has-sidebar) .wp-block-group.alignfull .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 1000%;
	width: auto;
}

@media (min-width: 1140px) {

	body:not(.has-sidebar) .alignwide,
	body:not(.has-sidebar) .wp-block-group.alignfull .alignwide {
		margin-left: -25%;
		margin-right: -25%;
		max-width: 1000%;
		width: auto;
	}
}

/* Make non image-based blocks a bit narrower, so they don't get cut off. */
body:not(.has-sidebar) .wp-block-columns.alignfull,
body:not(.has-sidebar) .wp-block-audio.alignfull,
body:not(.has-sidebar) .wp-block-table.alignfull,
body:not(.has-sidebar) .wp-block-latest-comments.alignfull,
body:not(.has-sidebar) .wp-block-categories.alignfull,
body:not(.has-sidebar) .wp-block-latest-posts.alignfull {
	margin-left: calc(50% - 48vw);
	margin-right: calc(50% - 48vw);
}

/* Nested alignments inherit from their container instead of escaping it. */
body:not(.has-sidebar) *[class^="wp-block"] .alignwide,
body:not(.has-sidebar) *[class^="wp-block"] .alignfull {
	max-width: inherit;
	margin-left: inherit;
	margin-right: inherit;
}

/*--------------------------------------------------------------
2.0 General Block Styles
--------------------------------------------------------------*/

/* Captions — colour is inherited so captions stay readable on any background. */
[class^="wp-block-"] figcaption,
.wp-element-caption {
	font-family: var(--iseeker-font-serif);
	font-size: 14.25px;
	font-weight: 400;
	font-style: italic;
	color: inherit;
}

/*--------------------------------------------------------------
3.0 Blocks - Common Blocks
--------------------------------------------------------------*/

/* Paragraph */

p.has-drop-cap:not(:focus)::first-letter {
	font-size: 5em;
	margin-top: 0.15em;
}

/* Image */

.wp-block-image {
	margin: 0 0 1em;
}

.wp-block-image.is-style-default img[class*="wp-image-"] {
	border-radius: 3px;
}

.wp-block-image.is-style-rounded img[class*="wp-image-"] {
	border-radius: 9999px;
}

.wp-block-image .alignleft,
.wp-block-image .alignright {
	margin-top: 30px;
}

.wp-block-image figcaption {
	text-align: center;
}

/* Gallery */

.wp-block-gallery {
	margin: 0 0 0.875em;
}

.wp-block-gallery figcaption {
	text-align: center;
}

.wp-block-gallery.is-style-rounded .wp-block-image img {
	border-radius: 9999px;
}

/* Quote */

.wp-block-quote.is-large cite,
.wp-block-quote.is-style-large cite {
	text-align: inherit;
}

.wp-block-quote,
.wp-block-quote p {
	font-family: var(--iseeker-font-serif);
	font-style: italic;
}

.wp-block-quote:not(.is-large):not(.is-style-large) {
	border-color: var(--iseeker-color-secondary);
}

.wp-block-quote cite,
.wp-block-quote .wp-block-quote__citation {
	color: inherit;
	font-size: .875em;
	font-style: italic;
	font-weight: 700;
}

.rtl .wp-block-quote,
.wp-block-quote[style*="text-align:right"] {
	margin-left: .875em;
	margin-right: -1.9em;
	padding-left: 0;
	padding-right: 1.75em;
	border-width: 0 3px 0 0;
}

.rtl .wp-block-quote[style*="text-align:left"] {
	margin-left: -1.9em;
	margin-right: .875em;
	padding-left: 1.75em;
	padding-right: 0;
	border-width: 0 0 0 3px;
}

.wp-block-quote.is-large,
.wp-block-quote.is-style-large,
.wp-block-quote[style*="text-align:center"] {
	border: 0;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
}

/* Audio */

.wp-block-audio {
	margin-bottom: 0.875em;
}

.wp-block-audio audio {
	display: block;
	width: 100%;
}

/* Cover */

.wp-block-cover.aligncenter,
.wp-block-cover-image.aligncenter,
.wp-block-cover.alignleft,
.wp-block-cover-image.alignleft,
.wp-block-cover-image.alignright {
	display: flex;
}

.wp-block-cover-image .wp-block-cover-image-text,
.wp-block-cover-image .wp-block-cover-text,
.wp-block-cover-image h2,
.wp-block-cover .wp-block-cover-image-text,
.wp-block-cover .wp-block-cover-text,
.wp-block-cover h2 {
	font-family: var(--iseeker-font-sans);
	font-size: 1.5em;
	margin-bottom: inherit;
}

.wp-block-cover.alignfull .wp-block-cover__inner-container {
	max-width: var(--iseeker-content-width);
	margin: 0 auto;
}

.wp-block-cover.has-white-background-color .wp-block-cover__inner-container {
	color: var(--iseeker-color-text);
}

/* File */

.wp-block-file .wp-block-file__button {
	background: var(--iseeker-color-secondary);
	border: solid 1px transparent;
	border-radius: 3px;
	box-sizing: border-box;
	color: var(--iseeker-color-bg);
	cursor: pointer;
	transition: background 120ms ease-in-out, box-shadow 120ms ease-in-out;
	font-family: var(--iseeker-font-sans);
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	padding: .4375em 1.25em;
	text-decoration: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wp-block-file .wp-block-file__button:focus,
.wp-block-file .wp-block-file__button:active {
	outline: 0;
	background: var(--iseeker-color-secondary-hover);
	box-shadow: inset 0 2px 2px rgba(0, 0, 0, .25), 0 0 0 6px rgba(0, 0, 0, .08);
}

.wp-block-file .wp-block-file__button:hover {
	text-decoration: none;
	color: var(--iseeker-color-bg);
	background: var(--iseeker-color-secondary-hover);
}

.rtl .wp-block-file * + .wp-block-file__button {
	margin-left: .75em;
	margin-right: 0;
}

/*--------------------------------------------------------------
4.0 Blocks - Formatting
--------------------------------------------------------------*/

/* Verse */

.wp-block-verse {
	background: none;
	font-family: inherit;
	font-style: italic;
	padding: 0;
}

/* Code */

.wp-block-code {
	background: var(--iseeker-color-bg-subtle);
	border: 0;
	border-radius: 0;
	font-family: var(--iseeker-font-mono);
	line-height: 1.75;
	padding: 1.75em;
	overflow: auto;
	max-width: 100%;
}

.wp-block-code code {
	background: transparent;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
}

/* Preformatted */

.wp-block-preformatted {
	background: var(--iseeker-color-bg-subtle);
	font-family: var(--iseeker-font-mono);
	line-height: 1.75;
	padding: 1.75em;
	overflow: auto;
	max-width: 100%;
}

/* Pullquote */

.wp-block-pullquote {
	border: var(--iseeker-color-secondary) solid;
	border-width: 3px 0;
	padding: 0.5em;
	font-family: var(--iseeker-font-serif);
}

.wp-block-pullquote blockquote {
	border: 0;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
}

.wp-block-pullquote.alignleft,
.wp-block-pullquote.alignright {
	margin-top: 0.5em;
	margin-bottom: 1.0em;
}

.wp-block-pullquote cite,
.wp-block-pullquote .wp-block-pullquote__citation {
	font-size: inherit;
	font-style: italic;
	text-transform: none;
}

/* Table */

.wp-block-table td,
.wp-block-table th {
	border-color: var(--iseeker-color-border);
	word-break: break-word;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--iseeker-color-bg-subtle);
}

@media (min-width: 1140px) {

	body:not(.has-sidebar) .wp-block-table.alignwide {
		width: var(--iseeker-wide-width);
	}
}

body:not(.has-sidebar) .wp-block-table.alignfull {
	width: 96vw;
}

/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/

/* Buttons */

.wp-block-button .wp-block-button__link {
	box-sizing: border-box;
	cursor: pointer;
	transition: background 120ms ease-in-out, box-shadow 120ms ease-in-out;
	font-family: var(--iseeker-font-sans);
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	padding: .4375em 1.25em;
	text-decoration: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wp-block-button__link,
.wp-block-button__link:visited {
	background: var(--iseeker-color-accent);
	color: var(--iseeker-color-bg);
}

.is-style-outline .wp-block-button__link {
	border-color: currentColor;
}

.is-style-outline .wp-block-button__link:not(.has-text-color),
.is-style-outline .wp-block-button__link:not(.has-text-color):visited {
	color: var(--iseeker-color-accent);
}

.entry-content .wp-block-button .wp-block-button__link:focus,
.entry-content .wp-block-button .wp-block-button__link:active {
	background: var(--iseeker-color-accent-hover);
	box-shadow: inset 0 2px 2px rgba(0, 0, 0, .25), 0 0 0 6px rgba(0, 0, 0, .08);
}

.entry-content .wp-block-button .wp-block-button__link:hover {
	text-decoration: none;
	color: var(--iseeker-color-bg);
	background: var(--iseeker-color-accent-hover);
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover,
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:focus,
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:active {
	background: var(--iseeker-color-bg);
	color: var(--iseeker-color-accent);
}

/* Columns */

.wp-block-columns {
	margin-bottom: 16px;
}

/* Group */

.wp-block-group.alignfull .wp-block-group__inner-container {
	max-width: var(--iseeker-content-width);
	margin: 0 auto;
}

/* Separator */

.wp-block-separator {
	border: 0;
}

.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
	margin-left: auto;
	margin-right: auto;
	max-width: 100px;
}

.wp-block-separator.is-style-dots {
	background: none;
	height: auto;
}

/* Media & Text */

.wp-block-media-text {
	margin-bottom: 0.875em;
}

.wp-block-media-text .wp-block-media-text__content {
	padding: 0 8%;
}

/*--------------------------------------------------------------
6.0 Blocks - Widgets
--------------------------------------------------------------*/

/* General Widget styles */

.wp-block-categories.aligncenter,
.wp-block-categories.aligncenter ul,
.wp-block-archives.aligncenter,
.wp-block-latest-posts.aligncenter,
.wp-block-latest-comments.aligncenter {
	list-style-position: inside;
	text-align: center;
}

.wp-block-archives,
.wp-block-categories,
.wp-block-latest-posts {
	margin-left: 0;
	margin-right: 0;
}

.wp-block-archives li,
.wp-block-categories li,
.wp-block-latest-posts li {
	margin-top: .2em;
}

/* Latest Comments */

.wp-block-latest-comments {
	margin-left: 0;
	margin-right: 0;
}

.wp-block-latest-comments__comment,
.wp-block-latest-comments__comment-date,
.wp-block-latest-comments__comment-excerpt p {
	font-size: 17px;
}

.wp-block-latest-comments__comment-meta a {
	color: var(--iseeker-color-text);
	font-weight: 700;
}

.wp-block-latest-comments__comment-date {
	color: var(--iseeker-color-meta);
	font-family: var(--iseeker-font-sans);
	font-size: 14px;
}

/* Latest Posts */

.wp-block-latest-posts.is-grid {
	margin-left: 0;
	margin-right: 0;
}

.wp-block-latest-posts__post-date {
	color: var(--iseeker-color-meta);
	font-family: var(--iseeker-font-sans);
	font-size: 14px;
}

.wp-block-latest-posts__post-excerpt {
	font-size: 17px;
}

/*--------------------------------------------------------------
7.0 Blocks - Embeds
--------------------------------------------------------------*/

.wp-block-embed {
	margin-bottom: 1.75em;
}

.wp-block-embed.is-type-video iframe {
	max-height: 100%;
}

.wp-block-embed.is-type-video.alignfull iframe {
	width: 100% !important;
	height: 100% !important;
}

.wp-block-embed embed,
.wp-block-embed iframe,
.wp-block-embed object {
	max-width: 100%;
}

/*--------------------------------------------------------------
8.0 Blocks - Colors

Every slug declared in theme.json gets an explicit colour class so that content
written under Independent Publisher 2 keeps rendering exactly as it did.
--------------------------------------------------------------*/

.has-primary-color,
.has-primary-color:hover,
.has-primary-color:focus,
.has-primary-color:active,
.has-primary-color:visited {
	color: var(--iseeker-color-primary);
}

.has-primary-background-color,
.has-primary-background-color:hover,
.has-primary-background-color:focus,
.has-primary-background-color:active,
.has-primary-background-color:visited {
	background-color: var(--iseeker-color-primary);
}

.has-accent-color,
.has-accent-color:hover,
.has-accent-color:focus,
.has-accent-color:active,
.has-accent-color:visited {
	color: var(--iseeker-color-accent);
}

.has-accent-background-color,
.has-accent-background-color:hover,
.has-accent-background-color:focus,
.has-accent-background-color:active,
.has-accent-background-color:visited {
	background-color: var(--iseeker-color-accent);
}

.has-secondary-color,
.has-secondary-color:hover,
.has-secondary-color:focus,
.has-secondary-color:active,
.has-secondary-color:visited {
	color: var(--iseeker-color-secondary);
}

.has-secondary-background-color,
.has-secondary-background-color:hover,
.has-secondary-background-color:focus,
.has-secondary-background-color:active,
.has-secondary-background-color:visited {
	background-color: var(--iseeker-color-secondary);
}

.has-medium-blue-color,
.has-medium-blue-color:hover,
.has-medium-blue-color:active,
.has-medium-blue-color:focus,
.has-medium-blue-color:visited {
	color: var(--iseeker-color-secondary);
}

.has-medium-blue-background-color,
.has-medium-blue-background-color:hover,
.has-medium-blue-background-color:active,
.has-medium-blue-background-color:focus,
.has-medium-blue-background-color:visited {
	background-color: var(--iseeker-color-secondary);
}

.has-bright-blue-color,
.has-bright-blue-color:hover,
.has-bright-blue-color:focus,
.has-bright-blue-color:active,
.has-bright-blue-color:visited {
	color: var(--wp--preset--color--bright-blue, #00aadc);
}

.has-bright-blue-background-color,
.has-bright-blue-background-color:hover,
.has-bright-blue-background-color:focus,
.has-bright-blue-background-color:active,
.has-bright-blue-background-color:visited {
	background-color: var(--wp--preset--color--bright-blue, #00aadc);
}

.has-dark-gray-color,
.has-dark-gray-color:hover,
.has-dark-gray-color:focus,
.has-dark-gray-color:active,
.has-dark-gray-color:visited {
	color: var(--iseeker-color-sticky-bg);
}

.has-dark-gray-background-color,
.has-dark-gray-background-color:hover,
.has-dark-gray-background-color:focus,
.has-dark-gray-background-color:active,
.has-dark-gray-background-color:visited {
	background-color: var(--iseeker-color-sticky-bg);
}

.has-light-gray-color,
.has-light-gray-color:hover,
.has-light-gray-color:focus,
.has-light-gray-color:active,
.has-light-gray-color:visited {
	color: var(--iseeker-color-meta);
}

.has-light-gray-background-color,
.has-light-gray-background-color:hover,
.has-light-gray-background-color:focus,
.has-light-gray-background-color:active,
.has-light-gray-background-color:visited {
	background-color: var(--iseeker-color-meta);
}

.has-white-color,
.has-white-color:hover,
.has-white-color:focus,
.has-white-color:active,
.has-white-color:visited {
	color: var(--iseeker-color-bg);
}

.has-white-background-color,
.has-white-background-color:hover,
.has-white-background-color:focus,
.has-white-background-color:active,
.has-white-background-color:visited {
	background-color: var(--iseeker-color-bg);
}
