/**
 * Astra compatibility.
 *
 * Loaded only when Astra is the active theme, and only after both Astra's
 * stylesheet and ours, so these rules settle the conflicts rather than starting
 * a specificity war. Everything is scoped to .cwlk: the theme is untouched
 * everywhere else on the site.
 */

/* ---------------------------------------------------------------------------
   Width
   ------------------------------------------------------------------------ */

/* Astra's page-builder layout removes the content padding entirely, which
   leaves plugin pages flush against the viewport edge on a phone. Put a gutter
   back, but only on our own blocks. */

.cwlk-astra.ast-page-builder-template .entry-content .cwlk {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	margin-left: auto;
	margin-right: auto;
}

/* The bar and the hero are meant to run edge to edge. */

.cwlk-astra.ast-page-builder-template .entry-content .cwlk-bar,
.cwlk-astra.ast-page-builder-template .entry-content .cwlk-hero {
	padding-left: 0;
	padding-right: 0;
	max-width: none;
}

/* On a boxed or content-boxed Astra layout our panels sit inside Astra's own
   card, which double-frames them. Flatten the outer one. */

.cwlk-astra .ast-separate-container .ast-article-single:has(.cwlk-roster),
.cwlk-astra .ast-separate-container .ast-article-single:has(.cwlk-board),
.cwlk-astra .ast-separate-container .ast-article-single:has(.cwlk-portal),
.cwlk-astra .ast-separate-container .ast-article-single:has(.cwlk-dash) {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

/* ---------------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------------ */

/* Astra sets heading fonts from the Customizer with enough specificity to win
   inside .entry-content. Ours are part of the design rather than a default, so
   they need to hold. */

.cwlk-astra .entry-content .cwlk h1,
.cwlk-astra .entry-content .cwlk h2,
.cwlk-astra .entry-content .cwlk h3,
.cwlk-astra .entry-content .cwlk .cwlk-h1,
.cwlk-astra .entry-content .cwlk-hero__title {
	font-family: var(--cwlk-display);
	letter-spacing: -0.025em;
	line-height: 1.06;
}

.cwlk-astra .entry-content .cwlk .cwlk-eyebrow,
.cwlk-astra .entry-content .cwlk .cwlk-h3,
.cwlk-astra .entry-content .cwlk .cwlk-legend,
.cwlk-astra .entry-content .cwlk code {
	font-family: var(--cwlk-mono);
}

.cwlk-astra .entry-content .cwlk,
.cwlk-astra .entry-content .cwlk p,
.cwlk-astra .entry-content .cwlk li,
.cwlk-astra .entry-content .cwlk label {
	font-family: var(--cwlk-body);
}

/* Astra's paragraph bottom margin is generous; inside dense panels it opens
   gaps the layout did not ask for. */

.cwlk-astra .entry-content .cwlk-panel p:last-child,
.cwlk-astra .entry-content .cwlk-row p:last-child,
.cwlk-astra .entry-content .cwlk-cardlet p {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Links and buttons
   ------------------------------------------------------------------------ */

/* Astra colours every link in the content area and adds its own button
   styling to anything that looks like one. Our buttons carry their own. */

.cwlk-astra .entry-content .cwlk a {
	color: var(--cwlk-sapphire);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.cwlk-astra .entry-content .cwlk .cwlk-btn,
.cwlk-astra .entry-content .cwlk .cwlk-btn:visited {
	text-decoration: none;
	border-radius: 999px;
	line-height: 1.2;
}

.cwlk-astra .entry-content .cwlk .cwlk-btn--solid,
.cwlk-astra .entry-content .cwlk .cwlk-btn--solid:visited {
	background: var(--cwlk-sapphire);
	border-color: var(--cwlk-sapphire);
	color: #fff;
}

.cwlk-astra .entry-content .cwlk .cwlk-btn--solid:hover,
.cwlk-astra .entry-content .cwlk .cwlk-btn--solid:focus {
	background: var(--cwlk-sapphire-deep);
	color: #fff;
}

.cwlk-astra .entry-content .cwlk .cwlk-btn--ghost,
.cwlk-astra .entry-content .cwlk .cwlk-btn--ghost:visited {
	background: var(--cwlk-surface);
	color: var(--cwlk-ink);
	border-color: var(--cwlk-hairline);
}

.cwlk-astra .entry-content .cwlk .cwlk-btn--ondark,
.cwlk-astra .entry-content .cwlk-hero .cwlk-btn--ondark:visited {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.55);
}

.cwlk-astra .entry-content .cwlk-hero a {
	color: #fff;
}

/* Cards are links; they must not pick up link colour or underlines. */

.cwlk-astra .entry-content .cwlk-card,
.cwlk-astra .entry-content .cwlk-portal__card,
.cwlk-astra .entry-content .cwlk-roster__tile,
.cwlk-astra .entry-content .cwlk-tile,
.cwlk-astra .entry-content .cwlk-chip,
.cwlk-astra .entry-content .cwlk-tab,
.cwlk-astra .entry-content .cwlk-bar__mark,
.cwlk-astra .entry-content .cwlk-bar__link {
	text-decoration: none;
}

.cwlk-astra .entry-content .cwlk-card,
.cwlk-astra .entry-content .cwlk-portal__card,
.cwlk-astra .entry-content .cwlk-roster__tile {
	color: inherit;
}

/* ---------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------ */

/* Astra styles inputs from the Customizer, including a border radius and a
   focus colour that will not match. */

.cwlk-astra .cwlk input[type="text"],
.cwlk-astra .cwlk input[type="email"],
.cwlk-astra .cwlk input[type="tel"],
.cwlk-astra .cwlk input[type="url"],
.cwlk-astra .cwlk input[type="number"],
.cwlk-astra .cwlk input[type="date"],
.cwlk-astra .cwlk input[type="password"],
.cwlk-astra .cwlk input[type="search"],
.cwlk-astra .cwlk select,
.cwlk-astra .cwlk textarea {
	border-radius: var(--cwlk-radius-sm);
	border-color: var(--cwlk-hairline);
	background-color: var(--cwlk-surface);
	color: var(--cwlk-ink);
	font-size: 0.98rem;
	padding: 0.65rem 0.8rem;
	box-shadow: none;
}

.cwlk-astra .cwlk input:focus,
.cwlk-astra .cwlk select:focus,
.cwlk-astra .cwlk textarea:focus {
	border-color: var(--cwlk-sapphire);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cwlk-sapphire) 18%, transparent);
}

.cwlk-astra .cwlk button[type="submit"],
.cwlk-astra .cwlk input[type="submit"] {
	font-family: var(--cwlk-body);
}

/* Astra's own login form, used on the photographer portal. */

.cwlk-astra .cwlk .login-submit .button,
.cwlk-astra .cwlk #wp-submit {
	background: var(--cwlk-sapphire);
	border-color: var(--cwlk-sapphire);
	color: #fff;
	border-radius: 999px;
	padding: 0.62rem 1.35rem;
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Sticky headers
   ------------------------------------------------------------------------ */

/* Astra Pro can pin its own header. Two sticky bars stacked is one too many,
   so ours sits below Astra's rather than under it. */

.cwlk-astra.ast-sticky-active .cwlk-bar,
.cwlk-astra .ast-main-header-wrap.ast-header-sticked ~ * .cwlk-bar {
	top: var(--cwlk-astra-offset, 60px);
}

.cwlk-astra .cwlk-toolbar {
	top: var(--cwlk-astra-offset, 0px);
}

/* ---------------------------------------------------------------------------
   Small screens
   ------------------------------------------------------------------------ */

@media (max-width: 921px) {

	.cwlk-astra.ast-page-builder-template .entry-content .cwlk {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/* Astra's mobile menu sits above everything; our sticky toolbar should
	   not compete with it. */
	.cwlk-astra .cwlk-toolbar {
		position: static;
		box-shadow: none;
	}
}
