/*
Theme Name: Able Elite
Theme URI: https://example.com/able-elite
Description: Able Elite Tours brand theme (child of Twenty Twenty-Five). Green primary, yellow accent, red for errors and unpaid states.
Author: Able Elite Ltd
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: able-elite
*/

/* Member / Take a Tour menu button (FR-02, FR-03). */
.ae-member-link {
	display: inline-block;
	padding: 0.5em 1.1em;
	border-radius: 6px;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--contrast) !important;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ae-member-link:hover,
.ae-member-link:focus {
	background: #e6af12;
}

/* Logged-in members: Take a Tour button + "My Account" menu. Same size as the menu links. */
.ae-member-nav {
	display: flex;
	align-items: center;
	gap: 0.75em;
}

.ae-site-header .ae-member-nav {
	font-size: var(--wp--preset--font-size--medium);
}

.ae-account-menu {
	position: relative;
}

.ae-account-menu summary {
	cursor: pointer;
	list-style: none;
	padding: 0.5em 0.25em;
	font-weight: 300;
	white-space: nowrap;
	color: #fff;
}

.ae-account-menu summary::-webkit-details-marker {
	display: none;
}

.ae-account-menu summary::after {
	content: " ▾";
	font-size: 0.8em;
}

.ae-account-menu summary:hover,
.ae-account-menu summary:focus-visible,
.ae-account-menu[open] summary {
	color: var(--wp--preset--color--accent-1);
}

.ae-account-menu ul {
	position: absolute;
	right: 0;
	top: calc(100% + 0.4em);
	z-index: 100;
	min-width: 11em;
	margin: 0;
	padding: 0.4em 0;
	list-style: none;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.ae-account-menu li a {
	display: block;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	padding: 0.55em 1.1em;
	color: #2c4327 !important;
	text-decoration: none;
	white-space: nowrap;
}

.ae-account-menu li a:hover,
.ae-account-menu li a:focus-visible {
	background: #ffc92d;
}

@media (max-width: 600px) {
	.ae-member-nav {
		flex-wrap: wrap;
		justify-content: flex-end;
	}

	.ae-account-menu ul {
		right: -0.5em;
	}
}

.ae-site-header .wp-block-navigation a:hover,
.ae-site-header .wp-block-navigation a:focus-visible {
	color: var(--wp--preset--color--accent-1) !important;
	text-decoration: none;
}

.ae-notice {
	padding: 1em 1.25em;
	margin-bottom: 1.5em;
	border-left: 4px solid var(--wp--preset--color--accent-1);
	background: var(--wp--preset--color--base);
}

/* Photos: rounded cards, readable credits. */
.wp-block-columns .wp-block-image img,
.wp-block-media-text__media img,
.entry-content > .wp-block-image img,
.wp-block-post-content > .wp-block-image img {
	border-radius: 8px;
}

.wp-block-image .wp-element-caption,
.wp-block-gallery .wp-element-caption {
	font-size: 0.75rem;
}

.wp-block-columns .wp-block-image .wp-element-caption {
	color: var(--wp--preset--color--accent-4);
	margin-top: 0.35em;
}

/* Hero text stays readable on the photo. */
.wp-block-cover h1,
.wp-block-cover p {
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Call-to-action band: dark button on yellow, centred. */
.has-accent-1-background-color .wp-block-able-elite-member-link {
	text-align: center;
}

.has-accent-1-background-color .ae-member-link {
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base) !important;
}

.has-accent-1-background-color .ae-member-link:hover,
.has-accent-1-background-color .ae-member-link:focus {
	background: var(--wp--preset--color--contrast);
}

/* Contact Us map (sits directly above the footer). */
.ae-map {
	margin-bottom: 0;
	line-height: 0;
}

.ae-map iframe {
	display: block;
	width: 100%;
	border: 0;
}

/* When a page ends with the map, let it sit directly on the footer. */
.wp-block-group:has(> .wp-block-post-content > .ae-map:last-child) {
	padding-bottom: 0 !important;
}

.wp-site-blocks:has(.wp-block-post-content > .ae-map:last-child) > footer {
	margin-block-start: 0;
}

/* Contact form. */
.ae-contact-form {
	scroll-margin-top: 2rem;
}

.ae-contact-form form {
	display: grid;
	gap: 0.25rem;
}

.ae-form-row--half {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
}

@media (max-width: 600px) {
	.ae-form-row--half {
		grid-template-columns: 1fr;
	}
}

.ae-form-field {
	margin: 0 0 0.75rem;
}

.ae-form-field label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
	font-size: 0.9rem;
}

.ae-form-field input,
.ae-form-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 6px;
	background: var(--wp--preset--color--base);
	font: inherit;
}

.ae-form-field input:focus,
.ae-form-field textarea:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}

.ae-form-field.has-error input,
.ae-form-field.has-error textarea {
	border-color: var(--wp--preset--color--danger);
}

.ae-form-error {
	display: block;
	margin-top: 0.25rem;
	color: var(--wp--preset--color--danger);
	font-size: 0.85rem;
}

.ae-form-notice {
	padding: 0.85rem 1rem;
	margin-bottom: 1rem;
	border-radius: 6px;
	border-left: 4px solid;
}

.ae-form-notice--success {
	background: var(--wp--preset--color--accent-5);
	border-color: var(--wp--preset--color--primary);
}

.ae-form-notice--error {
	background: #fdecec;
	border-color: var(--wp--preset--color--danger);
}

.ae-contact-form button[type="submit"] {
	justify-self: start;
	padding-inline: 2rem;
}

.ae-form-privacy {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	color: var(--wp--preset--color--accent-4);
}

/* Honeypot: hidden from people, visible to simple bots. */
.ae-form-trap {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Gallery: album cards. */
.ae-albums {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

@media (max-width: 900px) {
	.ae-albums {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.ae-albums {
		grid-template-columns: 1fr;
	}
}

.ae-album-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 10px;
	background: var(--wp--preset--color--base);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	color: inherit !important;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ae-album-card:hover,
.ae-album-card:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ae-album-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--accent-5);
}

.ae-album-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ae-album-card__count {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 0.2em 0.65em;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 0.8rem;
}

.ae-album-card__body {
	display: block;
	padding: 1rem 1.15rem 1.25rem;
}

.ae-album-card__title {
	display: block;
	color: var(--wp--preset--color--primary-dark);
	font-size: 1.25rem;
	font-weight: 600;
}

.ae-album-card__text {
	display: block;
	margin-top: 0.35rem;
	color: var(--wp--preset--color--accent-4);
	font-size: 0.95rem;
}

.ae-back-link a {
	text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
	.ae-album-card {
		transition: none;
	}
}

/* Galleries: keep every photo the same size, even when the last row is not full. */
.wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-grow: 0;
}

/* Tour booking form. */
.ae-booking {
	scroll-margin-top: 2rem;
}

.ae-booking-form {
	display: grid;
	gap: 1.5rem;
}

.ae-booking-step {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.ae-booking-step legend {
	margin-bottom: 0.85rem;
	color: var(--wp--preset--color--primary-dark);
	font-size: 1.2rem;
	font-weight: 600;
}

.ae-tour-options {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
}

@media (max-width: 1100px) {
	.ae-tour-options {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ae-tour-options {
		grid-template-columns: 1fr;
	}
}

.ae-tour-option {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 2px solid var(--wp--preset--color--accent-6);
	border-radius: 10px;
	background: var(--wp--preset--color--base);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ae-tour-option:hover {
	border-color: var(--wp--preset--color--primary-200, #c3dab7);
}

.ae-tour-option.is-selected,
.ae-tour-option:has(input:checked) {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(94, 143, 77, 0.2);
}

.ae-tour-option input[type="radio"] {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	width: 22px;
	height: 22px;
	accent-color: var(--wp--preset--color--primary);
}

.ae-tour-option:has(input:focus-visible) {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.ae-tour-option__media {
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--wp--preset--color--accent-5);
}

.ae-tour-option__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ae-tour-option__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.9rem 1rem 1rem;
}

.ae-tour-option__title {
	color: var(--wp--preset--color--primary-dark);
	font-size: 1.1rem;
	font-weight: 600;
}

.ae-tour-option__meta,
.ae-tour-option__text {
	color: var(--wp--preset--color--accent-4);
	font-size: 0.9rem;
}

.ae-tour-option__price {
	margin-top: auto;
	padding-top: 0.4rem;
	font-weight: 700;
}

.ae-tour-option__price small {
	color: var(--wp--preset--color--accent-4);
	font-weight: 400;
}

.ae-booking-availability {
	margin: 0;
	color: var(--wp--preset--color--primary-dark);
	font-size: 0.95rem;
}

.ae-booking-availability.is-full {
	color: var(--wp--preset--color--danger);
}

.ae-booking-summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 1rem 1.25rem;
	border-radius: 8px;
	background: var(--wp--preset--color--accent-5);
}

.ae-booking-summary strong {
	color: var(--wp--preset--color--primary-dark);
	font-size: 1.5rem;
}

.ae-booking-terms label {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	font-weight: 400;
}

.ae-booking-terms input {
	width: auto;
	accent-color: var(--wp--preset--color--primary);
}

.ae-booking-form button[type="submit"] {
	justify-self: start;
	padding-inline: 2rem;
}

.ae-booking-form .ae-form-field input[readonly] {
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--accent-4);
}

/* Booking status badges (My Account). */
.ae-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
}

.ae-badge--paid {
	background: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--primary-dark);
}

.ae-badge--pending_payment {
	background: #fff4d6;
	color: #7a5a00;
}

.ae-badge--expired,
.ae-badge--cancelled {
	background: #fdecec;
	color: var(--wp--preset--color--danger);
}

.ae-small-button {
	padding: 0.35em 0.9em !important;
	font-size: 0.85rem !important;
}

/* Login and Register pages: one centred card each. */
.ae-auth {
	max-width: 520px;
	margin: 0 auto;
	padding: 1.75rem 2rem;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 10px;
	background: var(--wp--preset--color--base);
}

.woocommerce .ae-auth form.login,
.woocommerce .ae-auth form.register,
.ae-auth form.woocommerce-form-login,
.ae-auth form.woocommerce-form-register {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.ae-auth .woocommerce-form-row,
.ae-auth .form-row {
	box-sizing: border-box;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

.ae-auth input.input-text,
.ae-auth .password-input {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 100%;
}

/* One type scale for both login and register cards. */
.ae-auth {
	font-size: 1.125rem;
	line-height: 1.5;
}

.ae-auth label {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
}

.ae-auth .woocommerce-form-login__rememberme,
.ae-auth .woocommerce-form-login__rememberme span {
	font-size: 1rem;
	font-weight: 400;
}

.ae-auth input.input-text,
.ae-auth input[type="text"],
.ae-auth input[type="email"],
.ae-auth input[type="tel"],
.ae-auth input[type="password"],
.woocommerce .ae-auth form .form-row input.input-text,
.woocommerce.ae-auth form .form-row input.input-text {
	padding: 0.65rem 0.75rem;
	border: 1px solid #b9bfc7;
	border-radius: 6px;
	font-family: inherit;
	font-size: 1.0625rem;
	line-height: 1.4;
}

.ae-auth input.input-text:focus,
.ae-auth input[type="password"]:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}

.ae-auth input::placeholder {
	font-size: 1rem;
	color: var(--wp--preset--color--accent-4);
}

.ae-auth button[type="submit"] {
	padding: 0.7rem 1.75rem;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
}

.ae-auth .lost_password,
.ae-auth .ae-auth__switch {
	font-size: 1rem;
}

/* Centre the page title above the login / register card. */
main:has(.ae-auth) .wp-block-post-title {
	text-align: center;
}

.ae-auth__switch {
	margin: 1.5rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--accent-6);
	text-align: center;
}

.ae-auth__switch a {
	font-weight: 600;
}

.ae-form-hint {
	display: block;
	margin-top: 0.25rem;
	color: var(--wp--preset--color--accent-4);
	font-size: 0.85rem;
}

/* Site footer (able-elite/site-footer block). */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.ae-footer {
	margin: 0;
	background: var(--wp--preset--color--deep-green, #2c4327);
	color: rgba(255, 255, 255, 0.82);
	font-size: 1.05rem;
	line-height: 1.6;
}

.ae-footer a {
	color: #fff;
	text-decoration: none;
}

.ae-footer a:hover,
.ae-footer a:focus-visible {
	color: var(--wp--preset--color--accent-1);
}

.ae-footer__inner {
	box-sizing: border-box;
	max-width: 1340px;
	margin: 0 auto;
	padding: 4rem clamp(1.25rem, 5vw, 6rem) 2rem;
}

.ae-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.2fr;
	gap: 3rem;
}

.ae-footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
}

.ae-footer__badge,
.ae-footer__logo-image {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 10px;
	object-fit: cover;
}

.ae-footer__badge {
	background: var(--wp--preset--color--accent-1);
	color: #2c4327;
	font-size: 1.5rem;
	font-weight: 800;
}

.ae-footer__name {
	color: #fff;
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ae-footer__about {
	max-width: 34rem;
	margin: 1.25rem 0 1.5rem;
}

.ae-footer__social,
.ae-footer__links,
.ae-footer__contact,
.ae-footer__policies {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ae-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.ae-footer__social a {
	display: inline-block;
	padding: 0.45rem 1.1rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 600;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ae-footer__social a:hover,
.ae-footer__social a:focus-visible {
	border-color: var(--wp--preset--color--accent-1);
	background: rgba(255, 201, 45, 0.1);
}

.ae-footer__heading {
	margin: 0.6rem 0 1.4rem;
	color: var(--wp--preset--color--accent-1);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.ae-footer__links li + li {
	margin-top: 0.8rem;
}

.ae-footer__links a {
	font-size: 1.1rem;
}

.ae-footer__contact li {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
}

.ae-footer__contact li + li {
	margin-top: 0.9rem;
}

.ae-footer__icon {
	flex: none;
	width: 22px;
	height: 22px;
	margin-top: 0.2rem;
	color: var(--wp--preset--color--accent-1);
}

.ae-footer__contact strong {
	font-weight: 600;
}

.ae-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	align-items: center;
	justify-content: space-between;
	margin-top: 3.5rem;
	padding-top: 1.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 0.95rem;
}

.ae-footer__bottom p {
	margin: 0;
}

.ae-footer__policies {
	display: flex;
	gap: 1.5rem;
}

.ae-footer__policies a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 960px) {
	.ae-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.ae-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.ae-footer__grid {
		grid-template-columns: 1fr;
		gap: 2.25rem;
	}

	.ae-footer__inner {
		padding-top: 3rem;
	}
}

/* Current page in the main menu: same yellow as the footer link hover. */
.ae-site-header .wp-block-navigation .current-menu-item > a,
.ae-site-header .wp-block-navigation a[aria-current="page"] {
	color: var(--wp--preset--color--accent-1) !important;
}

/* Leadership team cards. */
.ae-leaders {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

@media (max-width: 900px) {
	.ae-leaders {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ae-leaders {
		grid-template-columns: 1fr;
	}
}

.ae-leader {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 2rem 1.5rem;
	border-top: 4px solid var(--wp--preset--color--accent-1);
	border-radius: 10px;
	background: var(--wp--preset--color--base);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	text-align: center;
}

.ae-leader__photo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 140px;
	height: 140px;
	margin-bottom: 1.25rem;
	border: 4px solid var(--wp--preset--color--accent-5);
	border-radius: 50%;
	object-fit: cover;
}

.ae-leader__photo--initials {
	box-sizing: border-box;
	background: var(--wp--preset--color--deep-green, #2c4327);
	color: var(--wp--preset--color--accent-1);
	font-size: 2.25rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.ae-leader__name {
	margin: 0;
	color: var(--wp--preset--color--contrast);
	font-size: 1.3rem;
	font-weight: 700;
}

.ae-leader__position {
	margin: 0.35rem 0 0;
	color: var(--wp--preset--color--primary);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ae-leader__bio {
	margin: 1rem 0 0;
	color: var(--wp--preset--color--accent-4);
	font-size: 1rem;
	line-height: 1.6;
}

.ae-leader__link {
	margin-top: 1rem;
	font-size: 0.95rem;
	font-weight: 600;
}

/* My Account: member dashboard and My tours. */
.ae-dashboard__hello {
	font-size: 1.15em;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
}

.ae-dashboard__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
	gap: 1em;
	margin-top: 1em;
}

.ae-dashboard__card {
	padding: 1.1em 1.25em;
	border: 1px solid #e0ecda;
	border-top: 4px solid #ffc92d;
	border-radius: 8px;
	background: #fff;
}

.ae-dashboard__card h3 {
	margin: 0 0 0.4em;
	font-size: 0.85em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5e8f4d;
}

.ae-dashboard__card p {
	margin: 0.3em 0;
}

.ae-dashboard__big {
	font-size: 1.35em;
	font-weight: 700;
	color: #2c4327;
}

.ae-tours-heading {
	margin: 1.5em 0 0.6em;
	color: #2c4327;
	font-weight: 600;
}

.ae-tours-heading:first-child {
	margin-top: 0;
}
