/* Accessibility (WCAG 2.2 AA) additions for the Charlotte theme.
 * Loaded after the theme stylesheets. Colour-contrast overrides live in a11y-contrast-*.css. */

/* 2.4.1 Bypass blocks: skip link, visible when focused */
.ct-skip-link {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 100000;
	padding: 12px 18px;
	background: #222;
	color: #fff !important;
	font-size: 16px;
	font-weight: 600;
	text-decoration: underline;
	text-transform: none;
	border-radius: 0 0 4px 4px;
}
.ct-skip-link:focus {
	top: 0;
	outline: 3px solid #ffbf47;
	outline-offset: 0;
}
#main-content:focus {
	outline: none; /* programmatic focus target of the skip link only */
}

/* Screen-reader-only text (mirrors Bootstrap's .sr-only, safe if Bootstrap CSS is not loaded) */
.ct-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 2.4.7 / 2.4.13 Focus visible: the theme removes outlines in many rules; restore a clear,
   high-contrast ring for keyboard users only (mouse clicks are unaffected). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible {
	outline: 3px solid #1a1a1a !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #ffffff !important; /* keeps the ring visible on dark and brown backgrounds */
}

/* 2.1.1 Keyboard: desktop dropdown menus opened on :hover only - also open on keyboard focus */
.ct-mainNav-inner .dropdown:focus-within > .dropdown-menu,
.ct-mainNav-inner .dropdown-submenu:focus-within > .dropdown-menu {
	display: block;
}

/* 2.5.8 Target size (minimum): small inline tag links get a 24px-high hit area */
.ct-blogTag {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
	padding-left: 2px;
	padding-right: 2px;
	margin-bottom: 2px;
}

/* 2.3.3 / 2.2.2 Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* 1.3.1 / 3.3.2 Visible form labels (comment form) */
.ct-form-label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	text-transform: none;
}
.ct-form-note {
	font-size: 14px;
	color: #444;
}
.ct-required {
	color: #a1301f; /* 6.3:1 on the light page texture */
}

/* 1.4.11 Non-text contrast: field boundaries >= 3:1, 1.4.3 field text/placeholder >= 4.5:1 (light areas) */
/* text-type fields only: Contact Form 7 puts .wpcf7-form-control on buttons, checkbox groups and
   the reCAPTCHA holder as well */
.form-control,
input.wpcf7-form-control:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
textarea.wpcf7-form-control,
select.wpcf7-form-control {
	border-color: #767676;
	color: #444;
}
.form-control::placeholder,
.wpcf7-form-control::placeholder {
	color: #595959;
	opacity: 1;
}
/* Dark areas (sidebar title blocks, menu, widgets) */
.ct-sidebar .form-control::placeholder,
.ct-mainNav .form-control::placeholder,
.widget .form-control::placeholder {
	color: #c4c4c4;
}
.ct-sidebar .form-control,
.ct-mainNav .form-control {
	border-color: #a6a6a6;
	color: #fff;
}

/* 1.4.1 Use of colour: links inside running text are underlined, not identified by colour alone */
#main-content p a:not(.btn):not([class*="btn-"]):not(.vc_btn3),
#main-content .wpb_text_column li a:not(.btn),
#main-content blockquote a,
.comment-content a,
.ct-authorPost-quote a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ct-cookie-consent label {
	font-weight: normal;
	color: #333;
	text-transform: none;
}

/* Restaurant menu: fee notice and hidden prices */
.ct-menuFeeNotice {
	margin: 0 auto 30px;
	padding: 14px 18px;
	max-width: 760px;
	text-align: center;
	font-size: 17px;
	font-weight: 600;
	color: #222;
	background: #fff;
	border: 2px solid #755e48;
}

li.ct-foodMenu--noPrice .ct-dottedBg {
	display: none;
}


/* Complianz: give the blocked Google Map room for its placeholder until the visitor consents */
.ct-googleMap.cmplz-placeholder-element {
	min-height: 400px;
}

/* Contact Form 7 reCAPTCHA holder: it carries .wpcf7-form-control, but it is not a text field,
   so no field border, padding or full width (this also sizes the Complianz placeholder) */
.wpcf7-form-control.g-recaptcha,
.wpcf7-form-control.wpcf7-recaptcha {
	width: auto;
	max-width: 304px;
	min-height: 0;
	margin: 0 auto 15px;
	padding: 0;
	border: 0;
	background-color: transparent;
}
.wpcf7-form-control.wpcf7-recaptcha > div {
	margin: 0 auto;
}

/* Page intro panel: it is laid out as a table, and with automatic table layout the slider's own
   (very wide) track stretched the table. The slider then measured that stretched width and its
   slides came out several times too wide, with the text pushed out of view. A fixed layout keeps
   the panel at the width of its container. */
.ct-sidebar-inner {
	table-layout: fixed;
	width: 100%;
}

/* Static photo grid (theme/plugin/photo-grid): replaces the AJAX-loaded WPBakery Media Grid */
.ct-photoGrid {
	margin-bottom: 35px;
}
.ct-photoGrid-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--ct-pg-gap, 5px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.ct-photoGrid--cols1 .ct-photoGrid-list { grid-template-columns: minmax(0, 1fr); }
.ct-photoGrid--cols2 .ct-photoGrid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ct-photoGrid--cols4 .ct-photoGrid-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ct-photoGrid--cols6 .ct-photoGrid-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ct-photoGrid-item {
	margin: 0;
	padding: 0;
}
.ct-photoGrid-item:before {
	content: none; /* no theme list bullet */
}
.ct-photoGrid-link {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	background: #2b2b2b;
	cursor: zoom-in;
}
.ct-photoGrid-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .3s ease, opacity .3s ease;
}
.ct-photoGrid-link:hover .ct-photoGrid-img,
.ct-photoGrid-link:focus .ct-photoGrid-img {
	transform: scale(1.04);
	opacity: .9;
}
.ct-photoGrid-link:focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: -3px;
	box-shadow: inset 0 0 0 6px #fff;
}
@media (max-width: 767px) {
	.ct-photoGrid .ct-photoGrid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ct-photoGrid--cols1 .ct-photoGrid-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.ct-photoGrid-img { transition: none; }
	.ct-photoGrid-link:hover .ct-photoGrid-img,
	.ct-photoGrid-link:focus .ct-photoGrid-img { transform: none; }
}

/* Contact Form 7 submit button: it also carries .wpcf7-form-control, so the field text colour
   above (#444) landed on its black background (1.4.3). White text in every state. */
.wpcf7-form-control.wpcf7-submit,
.wpcf7-form-control.wpcf7-submit:hover,
.wpcf7-form-control.wpcf7-submit:focus,
.wpcf7-form-control.wpcf7-submit:active {
	color: #fff;
}
.wpcf7-form-control.wpcf7-submit {
	background-color: #000;
	border-color: #000;
}
.wpcf7-form-control.wpcf7-submit:hover,
.wpcf7-form-control.wpcf7-submit:focus {
	background-color: #755e48;
	border-color: #755e48;
}
/* not yet available (acceptance box unticked): clearly inactive, still readable */
.wpcf7-form-control.wpcf7-submit[disabled],
.wpcf7-form-control.wpcf7-submit[disabled]:hover,
.wpcf7-form-control.wpcf7-submit[disabled]:focus {
	background-color: #595959;
	border-color: #595959;
	color: #fff;
	opacity: 1;
	cursor: not-allowed;
}
