/*
Theme Name:   Claremorris Drama Festival
Description:  Festival colours from the 2027 poster (stage green, red and gold), fonts, header, footer and home page on top of Twenty Twenty-Five.
Template:     twentytwentyfive
Version:      1.5.6
Requires at least: 6.7
Requires PHP: 7.4
Text Domain:  claremorris-drama
*/

/* Poster look (2027 poster): green stage with a spotlight, bold red capitals
   outlined in white, a red ribbon, gold masks, white serif lettering. */
:root {
	--cdf-stage: radial-gradient(ellipse 60% 55% at 50% -8%, rgba(31,211,188,.95) 0%, rgba(31,211,188,.35) 38%, transparent 70%),
		radial-gradient(ellipse 70% 30% at 50% 100%, rgba(35,208,178,.45), transparent 75%),
		linear-gradient(180deg, #00923D 0%, #018A35 55%, #00780A 100%);
	--cdf-poster-caps: 0 0 0 transparent, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff,
		0 3px 0 #fff, 3px 0 0 #fff, -3px 0 0 #fff, 0 -3px 0 #fff, 4px 7px 10px rgba(0,30,10,.55);
}

/* Header: stays at the top of the screen while scrolling */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar header.wp-block-template-part { top: 0; } }
.cdf-site-header { border-bottom: 6px solid var(--wp--preset--color--poster-red); box-shadow: inset 0 -3px 0 var(--wp--preset--color--stage); }
.cdf-site-header .wp-block-site-title a { text-decoration: none; }
.cdf-site-header .wp-block-navigation { font-weight: 600; }
.cdf-site-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent-2); }
.cdf-site-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--accent-6) !important; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.cdf-tagline { line-height: 1.2; }

/* Home hero heading: three set lines; on phones shrink so "Drama and Fringe" stays on one line */
@media (max-width: 781px) {
	.cdf-hero-title { font-size: min(8.4vw, 2.6rem) !important; }
}

/* Tablets / small laptops: shrink the (long) site title and menu so the header stays compact */
@media (min-width: 600px) and (max-width: 1199px) {
	.cdf-site-header .wp-block-site-title { font-size: 1.05rem; line-height: 1.15; }
	.cdf-site-header .wp-block-site-logo img { width: 56px !important; height: auto !important; }
	.cdf-site-header .wp-block-navigation { font-size: 0.95rem; }
	.cdf-site-header .wp-block-navigation .wp-block-navigation__container { gap: 0.4rem 1rem !important; }
	.cdf-tagline { font-size: 0.78rem !important; }
}

/* Bold text: the parent theme sets body text to weight 300, so plain "bold" only reached 400 */
strong, b { font-weight: 700; }

/* Forms (Fringe entry form, PayPal fee form) */
.wp-block-post-content :is(input[type=text], input[type=email], input[type=tel], select, textarea) {
	width: 100%; max-width: 100%; box-sizing: border-box; margin-top: .3rem;
	padding: .55rem .7rem; font: inherit; color: inherit; background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-4); border-radius: 6px;
}
.wp-block-post-content :is(input, select, textarea):focus-visible { outline: 2px solid var(--wp--preset--color--stage); outline-offset: 1px; }
.wp-block-post-content input[type=checkbox] { width: 1.2em; height: 1.2em; accent-color: var(--wp--preset--color--stage); vertical-align: -.2em; margin-right: .4em; }
.wpcf7-form label { display: block; font-weight: 600; }
.wpcf7-form p { margin: 0 0 1.1rem; }
.wpcf7-acceptance label { font-weight: 400; }
.wpcf7-list-item { margin: 0; }
.wpcf7-submit {
	background: var(--wp--preset--color--accent-2); color: #fff; border: 0; border-radius: 6px; cursor: pointer;
	padding: .9rem 1.8rem; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.wpcf7-submit:disabled { opacity: .45; cursor: not-allowed; }

/* Schedule/results pills: Open = green, Confined = red */
.cdf-section { opacity: 1; font-weight: 600; }
.cdf-section-open { color: var(--wp--preset--color--accent-1); background: var(--wp--preset--color--accent-5); border-color: var(--wp--preset--color--accent-1); }
.cdf-section-confined { color: var(--wp--preset--color--accent-2); background: #FDECEE; border-color: var(--wp--preset--color--accent-2); }

/* Old posts have fixed-size embeds (e.g. YouTube 560x315): shrink them to fit phones */
.wp-block-post-content iframe { max-width: 100%; }
.wp-block-post-content iframe[src*="youtube"], .wp-block-post-content iframe[src*="vimeo"] { width: 100%; max-width: 560px; height: auto; aspect-ratio: 16 / 9; }

/* Mobile menu (full-screen overlay): left-aligned list with dividers and big tap targets */
.cdf-site-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
	border-top: 6px solid var(--wp--preset--color--poster-red);
	box-shadow: inset 0 3px 0 var(--wp--preset--color--stage);
}
.cdf-site-header .is-menu-open .wp-block-navigation__responsive-container-content,
.cdf-site-header .is-menu-open .wp-block-navigation__container { align-items: stretch !important; gap: 0 !important; width: 100%; }
.cdf-site-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: var(--wp--preset--spacing--40); }
.cdf-site-header .is-menu-open .wp-block-navigation-item {
	align-items: stretch !important; width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}
.cdf-site-header .is-menu-open .wp-block-navigation-item__content {
	display: block; width: 100%; text-align: left; padding: .7rem 0 !important; font-size: 1.2rem;
}
.cdf-site-header .is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important; box-shadow: none; gap: 0 !important;
	padding: 0 0 .6rem 1.1rem !important; width: 100%; align-items: stretch !important;
}
.cdf-site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { border: 0; }
.cdf-site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1.05rem; font-weight: 500; padding: .4rem 0 !important;
}
.cdf-site-header .is-menu-open .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--stage); }
.cdf-site-header .is-menu-open .current-menu-item > .wp-block-navigation-item__content::before { content: "▸ "; color: var(--wp--preset--color--poster-red); }

/* Home page hero = the poster */
.cdf-hero.has-background { background: var(--cdf-stage) !important; position: relative; overflow: hidden; }
.cdf-hero::after { /* soft vignette at the edges, like the stage backdrop */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(ellipse 85% 90% at 50% 40%, transparent 60%, rgba(0,40,10,.35) 100%);
}
.cdf-hero > * { position: relative; z-index: 1; }
.cdf-hero h1 {
	color: var(--wp--preset--color--poster-red) !important;
	font-family: var(--wp--preset--font-family--fira-sans);
	font-weight: 900; text-transform: uppercase; letter-spacing: .01em; line-height: 1.02;
	font-size: clamp(2.3rem, 5.6vw, 4.4rem);
	text-shadow: var(--cdf-poster-caps);
	margin-block: .35em .3em;
}
.cdf-hero p { font-family: var(--wp--preset--font-family--vollkorn); font-weight: 700; text-shadow: 0 2px 6px rgba(0,40,10,.45); }
.cdf-hero .cdf-countdown { color: #fff; font-family: var(--wp--preset--font-family--vollkorn); font-style: italic; font-size: clamp(1.4rem, 2.8vw, 2rem); }
.cdf-hero a:not(.wp-block-button__link) { color: inherit; }
.cdf-hero .wp-block-button__link { border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,30,10,.35); }
.cdf-hero .wp-block-button.is-style-outline .wp-block-button__link { background: rgba(0,60,20,.25); }
.cdf-hero .wp-block-button.is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--accent-1) !important; }
.cdf-hero-masks img { filter: drop-shadow(0 10px 16px rgba(0,30,10,.5)); }

/* Headings: a short red underline, like the poster's red band */
main > .wp-block-group > h2.wp-block-heading, main .wp-block-column > h2.wp-block-heading {
	padding-bottom: .25em; background: linear-gradient(var(--wp--preset--color--poster-red), var(--wp--preset--color--poster-red)) left bottom / 2.2em 4px no-repeat;
}

/* Latest news on the home page: full posts, one after another (like the old site) */
.cdf-home-news .wp-block-post-template { list-style: none; padding: 0; margin: 0; }
.cdf-home-news .wp-block-post-template > li + li { margin-top: var(--wp--preset--spacing--50); }
.cdf-news-post { border-top: 4px solid var(--wp--preset--color--stage); padding-top: var(--wp--preset--spacing--30); display: flow-root; }
.cdf-news-post .wp-block-post-title { margin-top: 0; }
.cdf-news-post .wp-block-post-title a { text-decoration: none; }
.cdf-news-date { color: var(--wp--preset--color--accent-4); font-size: .9rem; margin-top: .2em !important; }
.cdf-news-post .wp-block-post-content img { max-width: 100%; height: auto; }
.cdf-news-post .wp-block-post-content .alignleft { margin-right: 1.2em; margin-bottom: .6em; }
@media (max-width: 600px) { .cdf-news-post .wp-block-post-content .alignleft, .cdf-news-post .wp-block-post-content .alignright { float: none; margin: 0 0 1em; } }

/* Cards for news lists */
.cdf-news-card { border-top: 4px solid var(--wp--preset--color--stage); }
.cdf-news-card .wp-block-post-title a { text-decoration: none; }

/* Footer: green stage, then the poster's red band */
.cdf-site-footer.has-background { background: radial-gradient(ellipse 60% 70% at 50% -20%, rgba(31,211,188,.45), transparent 70%), linear-gradient(180deg, #027A34, var(--wp--preset--color--deep-green)) !important; }
.cdf-footer-band { font-family: var(--wp--preset--font-family--vollkorn); font-weight: 700; }
.cdf-site-footer a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.cdf-site-footer a:hover { text-decoration-color: currentColor; }
.cdf-site-footer .cdf-footer-links { list-style: none; padding: 0; margin: 0; line-height: 2; }

/* Plugin output on festival pages */
.cdf-results h3 { color: var(--wp--preset--color--accent-1); }
.cdf-place-1 { color: var(--wp--preset--color--accent-2); }
.cdf-year-picker summary { color: var(--wp--preset--color--accent-1); border-color: var(--wp--preset--color--accent-1) !important; }
.cdf-year-picker summary:hover, .cdf-year-picker[open] summary { background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--base); }
.cdf-old-year { border-left-color: var(--wp--preset--color--poster-red) !important; }
.cdf-year-picker li.current span { background: var(--wp--preset--color--accent-2); color: var(--wp--preset--color--base); border-color: var(--wp--preset--color--accent-2); }

@media (max-width: 600px) {
	.cdf-site-header .wp-block-site-tagline { display: none; }
	.cdf-site-header .wp-block-site-logo img { width: 56px !important; }
	.cdf-hero-masks img { width: 170px !important; }
	.cdf-hero .wp-block-buttons .wp-block-button { width: 100%; }
	.cdf-hero h1 { text-shadow: -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px 1.5px 0 #fff, 0 2px 0 #fff, 3px 5px 8px rgba(0,30,10,.55); }
}

/* Compact lists of festivals / groups / plays */
.wp-block-query .wp-block-post-template.is-layout-grid { row-gap: .4em; }
.wp-block-query .wp-block-post-template.is-layout-grid .wp-block-post-title { margin: 0; }
