/* ==========================================================================
   Castle Connections Travel - accessibility fixes (WCAG 2.1 AA)
   Loaded after the theme stylesheets on every page so these rules win.
   ========================================================================== */

/* ---------- 1. Visible keyboard focus ----------
   The theme's style.css removes all focus outlines (":active, :focus { outline: none }").
   :focus-visible shows a ring for keyboard users without affecting mouse clicks.
   The white halo keeps the ring visible on both light and dark backgrounds. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
iframe:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
	outline: 3px solid #0b6b58 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #ffffff !important;
}
#slider a:focus-visible,
#slider [role="button"]:focus-visible {
	outline-color: #ffffff !important;
	box-shadow: 0 0 0 5px #000000 !important;
}

/* ---------- 2. Keyboard access to the drop-down menu ---------- */
#primary-menu ul li:focus-within > ul {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
}

/* Skip link: hidden until it receives keyboard focus */
.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100000;
	padding: 12px 18px;
	background: #0b6b58;
	color: #ffffff !important;
	font-weight: 700;
	border-radius: 0 0 4px 4px;
	text-decoration: underline;
}
.skip-link:focus {
	top: 0;
}
#main-content:focus { outline: none; }

/* ---------- 3. Colour contrast ----------
   The theme colour #1ABC9C has 2.4:1 contrast on white (4.5:1 is required for text).
   #0b6b58 is the same teal family at 6.5:1 on white and 4.8:1 on the footer's grey. */
a,
h2 > span:not(.nocolor):not(.badge),
h3 > span:not(.nocolor):not(.badge),
h4 > span:not(.nocolor):not(.badge),
#primary-menu ul li:hover > a,
#primary-menu ul li.current > a,
#primary-menu ul ul li:hover > a,
body:not(.dark) #header:not(.dark) #header-wrap:not(.dark) #primary-menu > ul > li:hover a,
body:not(.dark) #header:not(.dark) #header-wrap:not(.dark) #primary-menu > ul > li.current a {
	color: #0b6b58;
}
#primary-menu ul ul:not(.mega-menu-column) { border-top-color: #0b6b58; }
.fancy-title.title-bottom-border h4 { border-bottom-color: #0b6b58; }
#gotoTop:hover { background-color: #0b6b58; }
::selection { background: #0b6b58; color: #ffffff; }
::-moz-selection { background: #0b6b58; color: #ffffff; }

/* Grey body text that was too light */
.feature-box p,
.team-content,
.team-content p { color: #666666; }   /* was #999 (2.8:1) and #777 (4.47:1); now 5.7:1 */

/* Newsletter button: white on #28a745 is 3.1:1 */
.btn-success,
.btn-success:not(:disabled):not(.disabled):active {
	background-color: #1e7e34;
	border-color: #1e7e34;
	color: #ffffff;
}
.btn-success:hover,
.btn-success:focus {
	background-color: #155d27;
	border-color: #155d27;
	color: #ffffff;
}

/* Links inside running text must not rely on colour alone */
#content p a,
#content li a,
#content div[style] > a,
#content h5 a,
#page-title h4 a,
#copyrights a:not(.social-icon),
#cct-cc-banner a,
#cct-cc-modal a {
	text-decoration: underline !important;   /* the theme forces "none !important" on all links */
}

/* ---------- Screen-reader-only text ---------- */
.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;
}

/* Mobile menu button: show focus and a pointer */
#primary-menu-trigger { cursor: pointer; }
