/*
Theme Name: Bennys Theme
Theme URI:
Description: Child theme for Bennys Bilverkstad. Racing green, gold, and navy blue.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
Template: twentytwentyfive
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bennys-theme
*/

/* ============================================================
   Only styles that theme.json cannot express belong here.
   All colour, typography, and spacing tokens live in theme.json.
   ============================================================ */

/* --- Sticky header with frosted glass effect --- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

header.wp-block-template-part .wp-block-group.has-background {
	background-color: rgba(10, 29, 20, 0.92) !important;
}

/* --- Navigation: no underlines --- */
.wp-block-navigation a {
	text-decoration: none;
}
.wp-block-navigation a:hover {
	color: var(--wp--preset--color--gold);
}

/* --- Site title: no underline --- */
.wp-block-site-title a {
	text-decoration: none;
	color: inherit;
}

/* --- Header site title: gold gradient text --- */
header .wp-block-site-title a {
	background: linear-gradient(-135deg, #FFFFFF 30%, #C8A84B 65%, #E0C978 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* --- Header: prevent site title from wrapping at medium viewport widths --- */
header .wp-block-site-title {
	white-space: nowrap;
	flex-shrink: 0;
}

/* --- Buttons: sharp corners, uppercase, transition --- */
.wp-block-button__link,
.wp-element-button {
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	transition: background-color 0.2s ease, color 0.2s ease;
	border-radius: 0 !important;
}

/* --- Gold separator --- */
.wp-block-separator {
	border: none;
	border-top: 2px solid var(--wp--preset--color--gold);
	opacity: 1;
}

/* --- Post title link --- */
.wp-block-post-title a {
	text-decoration: none;
	color: inherit;
}
.wp-block-post-title a:hover {
	color: var(--wp--preset--color--racing-green-mid);
}

/* --- Query pagination --- */
.wp-block-query-pagination a {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
	font-size: 0.8rem;
	text-decoration: none;
	color: var(--wp--preset--color--racing-green);
}
.wp-block-query-pagination a:hover {
	color: var(--wp--preset--color--gold);
}

/* --- Mobile nav overlay --- */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--racing-green-dark);
}

/* --- Mobile nav: pin close (×) button to match hamburger position --- */
.wp-block-navigation__responsive-container-close {
	position: fixed;
	top: var(--wp--preset--spacing--50);
	right: var(--wp--preset--spacing--50);
}

/* --- Navigation: remove focus/active outline --- */
.wp-block-navigation a:focus,
.wp-block-navigation a:focus-visible,
.wp-block-navigation button:focus,
.wp-block-navigation button:focus-visible {
	outline: none;
	box-shadow: none;
}
/* --- Remove click-focus outline on links (keyboard focus kept) --- */
a:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
	outline: none;
}



/* --- Footer: hide nav column on mobile (nav block renders a burger there) --- */
@media (max-width: 599px) {
	footer.wp-block-template-part .wp-block-columns .wp-block-column:first-child {
		display: none;
	}
}

/* --- Fade-up entrance animation --- */
@keyframes bennys-fade-up {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: translateY(0); }
}
.bennys-fade-up {
	animation: bennys-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ============================================================
   Contact Form 7 — Bokningsformulär
   CF7 renders its own HTML so these overrides live here.
   ============================================================ */

/* Grid layout */
.boka-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.75rem 2rem;
}
.boka-field-full {
	grid-column: 1 / -1;
}

/* Labels */
.boka-form-grid label {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--racing-green-dark);
	margin-bottom: 0.5rem;
}
.boka-form-grid label .required {
	color: var(--wp--preset--color--gold);
	margin-left: 0.15em;
}

/* All inputs, selects, textareas */
.boka-form-grid input[type="text"],
.boka-form-grid input[type="tel"],
.boka-form-grid input[type="email"],
.boka-form-grid input[type="date"],
.boka-form-grid select,
.boka-form-grid textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.875rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.5;
	color: var(--wp--preset--color--racing-green-dark);
	background-color: #fff;
	border: 2px solid #d6d0c4;
	border-radius: 0;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.boka-form-grid input[type="text"]:focus,
.boka-form-grid input[type="tel"]:focus,
.boka-form-grid input[type="email"]:focus,
.boka-form-grid input[type="date"]:focus,
.boka-form-grid select:focus,
.boka-form-grid textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--racing-green);
	box-shadow: 0 0 0 3px rgba(42, 74, 52, 0.12);
}

/* Placeholder colour */
.boka-form-grid input::placeholder,
.boka-form-grid textarea::placeholder {
	color: #a09a8e;
}

/* Select arrow */
.boka-form-grid select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232a4a34' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
	padding-right: 2.5rem;
	cursor: pointer;
}

/* Textarea */
.boka-form-grid textarea {
	resize: vertical;
	min-height: 9rem;
}

/* CF7 wraps inputs in <span class="wpcf7-form-control-wrap"> */
.boka-form-grid .wpcf7-form-control-wrap {
	display: block;
}

/* Validation error messages */
.boka-form-grid .wpcf7-not-valid-tip {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.8rem;
	color: #c0392b;
}
.boka-form-grid input.wpcf7-not-valid,
.boka-form-grid select.wpcf7-not-valid,
.boka-form-grid textarea.wpcf7-not-valid {
	border-color: #c0392b;
}

/* Submit button */
.boka-form-grid .boka-submit,
.boka-form-grid input.boka-submit {
	display: inline-block;
	padding: 1rem 2.5rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--cream);
	background-color: var(--wp--preset--color--racing-green-dark);
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.boka-form-grid .boka-submit:hover,
.boka-form-grid input.boka-submit:hover {
	background-color: var(--wp--preset--color--racing-green);
}

/* Response messages */
.wpcf7-response-output {
	margin-top: 1.25rem !important;
	padding: 1rem 1.25rem !important;
	font-size: 0.95rem;
	border-radius: 0 !important;
	border-left: 4px solid var(--wp--preset--color--gold) !important;
	border-top: none !important;
	border-right: none !important;
	border-bottom: none !important;
	background: #f4efe640;
}

/* Responsive: stack to single column on narrow screens */
@media (max-width: 640px) {
	.boka-form-grid {
		grid-template-columns: 1fr;
	}
	.boka-field-full {
		grid-column: 1;
	}
}

/* ============================================================
   FAQ accordion — colour-coded questions and answers
   core/details does not expose separate colour controls for
   <summary> vs the answer content, so CSS is required here.
   ============================================================ */

/* Question (the summary / trigger row) */
.faq-accordion details summary {
	color: var(--wp--preset--color--racing-green-dark);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	list-style: none;
	padding-left: 1.75em;
	position: relative;
	cursor: pointer;
}

/* Hide the native marker — it can render as a colour emoji on mobile */
.faq-accordion details summary::marker,
.faq-accordion details summary::-webkit-details-marker {
	display: none;
}

/* CSS-drawn chevron — consistent across all browsers */
.faq-accordion details summary::before {
	content: '';
	position: absolute;
	left: 0.1em;
	top: 0.4em;
	width: 0.45em;
	height: 0.45em;
	border-right: 2px solid var(--wp--preset--color--gold);
	border-bottom: 2px solid var(--wp--preset--color--gold);
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}
.faq-accordion details[open] summary::before {
	transform: rotate(45deg);
	top: 0.3em;
}

/* Answer content — gold left border to visually group and distinguish */
.faq-accordion details p {
	color: var(--wp--preset--color--racing-green);
	border-left: 3px solid var(--wp--preset--color--gold);
	padding-left: var(--wp--preset--spacing--60);
	margin-top: var(--wp--preset--spacing--30);
}
