/**
 * Forms + small mobile fixes (mobile round 2026-10-16).
 * Account forms (password toggle, fieldset, helper text, submit), Select2, privacy buttons, Help spacing,
 * tour page photo credit + phone title order. Loads after app.css (flow/*.css, alphabetical): rules that
 * meet later sheets (online.css, rich.css) use body.ggt-theme.ggt-theme.
 */

/* ---------- Password inputs: eye toggle inside the right edge ---------- */
body.ggt-theme .password-input { position: relative; display: block; }
body.ggt-theme .password-input input[type="password"],
body.ggt-theme .password-input input[type="text"] { padding-right: 52px; }
body.ggt-theme .show-password-input {
	position: absolute; top: 50%; right: 2px; transform: translateY(-50%);
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: var(--ggt-radius-sm); background: transparent; box-shadow: none;
	color: var(--ggt-muted); cursor: pointer; transition: color .15s ease, background-color .15s ease;
}
body.ggt-theme .show-password-input::before {
	content: ""; display: block; width: 20px; height: 20px; background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}
body.ggt-theme .show-password-input.display-password::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.4 10.4 0 0 1 12 5c6.5 0 10 7 10 7a17.6 17.6 0 0 1-3.2 4.1M6.6 6.6C3.7 8.4 2 12 2 12s3.5 7 10 7a9.7 9.7 0 0 0 5.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.4 10.4 0 0 1 12 5c6.5 0 10 7 10 7a17.6 17.6 0 0 1-3.2 4.1M6.6 6.6C3.7 8.4 2 12 2 12s3.5 7 10 7a9.7 9.7 0 0 0 5.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}
body.ggt-theme .show-password-input:hover { color: var(--ggt-ink); background: var(--ggt-canvas); }
body.ggt-theme .show-password-input:focus-visible { outline: none; color: var(--ggt-ink); box-shadow: var(--ggt-focus); }

/* ---------- Account details: "Password change" section, helper text ---------- */
body.ggt-theme .woocommerce-EditAccountForm fieldset { margin: 32px 0 0; padding: 24px 0 0; border: 0; border-top: 1px solid var(--ggt-line); }
body.ggt-theme .woocommerce-EditAccountForm legend {
	float: left; width: 100%; margin: 0 0 16px; padding: 0;
	font-family: var(--ggt-font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; color: var(--ggt-ink);
}
body.ggt-theme .woocommerce-EditAccountForm legend + * { clear: both; }
body.ggt-theme .woocommerce-EditAccountForm em,
body.ggt-theme #account_display_name_description { display: block; margin-top: 6px; font-style: normal; font-size: 13px; line-height: 1.45; color: var(--ggt-muted); }
body.ggt-theme .woocommerce-EditAccountForm fieldset + .clear + p,
body.ggt-theme .woocommerce-EditAccountForm fieldset + p { margin-top: 24px; }

/* ---------- Select2 (Country / Region, State): same as the theme inputs ---------- */
body.ggt-theme .select2-container { font-family: var(--ggt-font); }
body.ggt-theme .select2-container .select2-selection--single {
	height: 48px; margin: 0; background: var(--ggt-paper);
	border: 1px solid var(--ggt-line-strong); border-radius: var(--ggt-radius-sm);
	transition: border-color .15s ease, box-shadow .15s ease; outline: none;
}
body.ggt-theme .select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0 44px 0 14px; line-height: 46px; font-size: 16px; color: var(--ggt-ink);
}
body.ggt-theme .select2-container .select2-selection--single .select2-selection__placeholder { color: var(--ggt-muted); }
body.ggt-theme .select2-container .select2-selection--single .select2-selection__clear { margin-right: 4px; color: var(--ggt-muted); }
body.ggt-theme .select2-container .select2-selection--single .select2-selection__arrow { top: 1px; right: 4px; width: 40px; height: 46px; }
body.ggt-theme .select2-container .select2-selection--single .select2-selection__arrow b {
	top: 50%; left: 50%; width: 8px; height: 8px; margin: 0;
	border: solid var(--ggt-muted); border-width: 0 1.75px 1.75px 0;
	transform: translate(-50%, -70%) rotate(45deg); transition: transform .15s ease;
}
body.ggt-theme .select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: var(--ggt-ink); border-width: 0 1.75px 1.75px 0; transform: translate(-50%, -25%) rotate(-135deg); }
body.ggt-theme .select2-container:hover .select2-selection--single { border-color: var(--ggt-muted); }
body.ggt-theme .select2-container--focus .select2-selection--single,
body.ggt-theme .select2-container--open .select2-selection--single { border-color: var(--ggt-accent); box-shadow: var(--ggt-focus); }
body.ggt-theme .select2-container--open.select2-container--below .select2-selection--single,
body.ggt-theme .select2-container--open.select2-container--above .select2-selection--single { border-radius: var(--ggt-radius-sm); }
body.ggt-theme .select2-dropdown {
	overflow: hidden; border: 1px solid var(--ggt-line-strong); border-radius: var(--ggt-radius-md);
	background: var(--ggt-paper); box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
}
body.ggt-theme .select2-container--open .select2-dropdown--below { margin-top: 6px; border-top: 1px solid var(--ggt-line-strong); border-radius: var(--ggt-radius-md); }
body.ggt-theme .select2-container--open .select2-dropdown--above { margin-top: -6px; border-bottom: 1px solid var(--ggt-line-strong); border-radius: var(--ggt-radius-md); }
body.ggt-theme .select2-search--dropdown { padding: 8px; }
body.ggt-theme .select2-container .select2-search--dropdown .select2-search__field {
	min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ggt-ink);
	border: 1px solid var(--ggt-line-strong); border-radius: var(--ggt-radius-sm); outline: none;
}
body.ggt-theme .select2-container .select2-search--dropdown .select2-search__field:focus { border-color: var(--ggt-accent); box-shadow: var(--ggt-focus); }
body.ggt-theme .select2-results > .select2-results__options { max-height: 280px; padding: 0 0 6px; }
body.ggt-theme .select2-results__option { padding: 10px 14px; font-size: 15px; line-height: 1.4; color: var(--ggt-ink); }
body.ggt-theme .select2-container--default .select2-results__option[aria-selected="true"],
body.ggt-theme .select2-container--default .select2-results__option--selected { background: transparent; color: var(--ggt-accent); font-weight: 600; }
body.ggt-theme .select2-container--default .select2-results__option--highlighted[aria-selected],
body.ggt-theme .select2-container--default .select2-results__option--highlighted[data-selected],
body.ggt-theme .select2-container--default .select2-results__option.select2-results__option--highlighted { background: var(--ggt-accent-soft); color: var(--ggt-ink); }
body.ggt-theme .select2-results__message { color: var(--ggt-muted); }

/* ---------- Privacy & data: 44px request buttons ---------- */
body.ggt-theme .ggt-legal-actions { gap: 10px; }
body.ggt-theme .ggt-legal-actions .ggt-btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; border-radius: var(--ggt-radius-md); }

/* ---------- Phones: primary buttons full width ---------- */
@media (max-width: 599px) {
	body.ggt-theme .woocommerce-MyAccount-content form button[type="submit"].button,
	body.ggt-theme .woocommerce-MyAccount-content form button[type="submit"].woocommerce-Button { display: flex; width: 100%; justify-content: center; }
	body.ggt-theme .ggt-legal-actions { flex-direction: column; align-items: stretch; }
	body.ggt-theme .ggt-legal-actions form, body.ggt-theme .ggt-legal-actions .ggt-btn { width: 100%; }
}

/* ---------- Help and FAQ: spacing between nav, groups and the contact box ---------- */
body.ggt-theme .ggt-help:has(.ggt-help__group) { font-size: 16px; color: var(--ggt-ink-2); }
body.ggt-theme .ggt-help__intro { margin: 0 0 8px; font-size: 16px; color: var(--ggt-muted); }
body.ggt-theme .ggt-help__nav {
	display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px;
	margin: 0 0 36px; padding: 0 0 12px; border-bottom: 1px solid var(--ggt-line); color: var(--ggt-line-strong); font-size: 15px;
}
body.ggt-theme .ggt-help__nav a { display: inline-flex; align-items: center; min-height: 44px; }
body.ggt-theme .ggt-help__group > h2 { margin: 0 0 16px; scroll-margin-top: calc(var(--ggt-header-h) + 16px); }
body.ggt-theme .ggt-help__group + .ggt-help__group { margin-top: 48px; }
body.ggt-theme .ggt-help__contact { margin-top: 48px; }
body.ggt-theme .ggt-help .ggt-faq__a { font-size: 15px; line-height: 1.6; }

/* ---------- Tours listing: keyword chip (site search lands here as ?q=) ---------- */
body.ggt-theme .ggt-listsearch__q {
	flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 16px;
	background: var(--ggt-accent-soft); border: 1px solid var(--ggt-accent); border-radius: var(--ggt-pill);
	color: var(--ggt-accent); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
body.ggt-theme .ggt-listsearch__q > span { font-size: 18px; line-height: 1; font-weight: 500; }
body.ggt-theme .ggt-listsearch__q:hover { color: var(--ggt-accent-hover); border-color: var(--ggt-accent-hover); }
body.ggt-theme .ggt-listsearch__q:focus-visible { outline: none; box-shadow: var(--ggt-focus); }

/* ---------- Tour page: photo credit (one quiet line on phones) ---------- */
body.ggt-theme .ggt-photo-credit--phone { display: none; }
@media (max-width: 767px) {
	body.ggt-theme.ggt-theme .ggt-photo-credit--wide { display: none; }
	body.ggt-theme.ggt-theme .ggt-photo-credit--phone { display: block; margin: -24px 0 12px; }
	body.ggt-theme .ggt-photo-credit--phone > summary {
		display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
		list-style: none; cursor: pointer; font-size: 12px; color: var(--ggt-muted);
	}
	body.ggt-theme .ggt-photo-credit--phone > summary::-webkit-details-marker { display: none; }
	body.ggt-theme .ggt-photo-credit--phone > summary::after {
		content: ""; width: 6px; height: 6px; margin-top: -3px;
		border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .15s ease;
	}
	body.ggt-theme .ggt-photo-credit--phone[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
	body.ggt-theme .ggt-photo-credit--phone > summary:focus-visible { outline: 2px solid var(--ggt-accent); outline-offset: 2px; border-radius: 4px; }
	body.ggt-theme .ggt-photo-credit--phone > p { margin: 0 0 4px; font-size: 12px; line-height: 1.5; color: var(--ggt-muted); }

	/* Title, rating and meta above the gallery (DOM order unchanged; desktop untouched). */
	body.ggt-theme .ggt-tour > .ggt-container { display: flex; flex-direction: column; }
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-tour__layout,
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-tour__layout > .ggt-tour__main { display: contents; }
	body.ggt-theme .ggt-tour > .ggt-container > *,
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-tour__layout > *,
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-tour__layout > .ggt-tour__main > * { min-width: 0; }
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-crumbs { order: -2; }
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-tour__layout > .ggt-tour__main > .ggt-tour__head { order: -1; margin-bottom: 20px; }
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-tour__layout > .ggt-tour__aside { margin-top: 32px; }
	body.ggt-theme .ggt-tour__head .ggt-tour__title { margin-bottom: 12px; }
	body.ggt-theme .ggt-tour > .ggt-container > .ggt-tour-gallery { margin-bottom: 28px; }
}
