/*
Theme Name: UD Wordpress Theme
Theme URI: 
Author: UD CAS IT
Author URI: 
Description: A Wordpress theme for the University of Delaware that uses Wordpress's Twenty Twenty-Five theme as a starting point
Requires at least: 6.7.2
Tested up to: 6.8.2
Requires PHP: 7.2
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ud-wordpress-theme
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Style to get rid of margin-block-start for main#wp--skip-link--target
*/
main#wp--skip-link--target {
	margin-block-start: 0;
}

/* Styling for navigation areas */

/* Color Variables */
:root {
	--HeaderBackground: #00539F;
	--HeaderText: #FFFFFF;
	--NavLinkBackground: #BDBDBD;
	--NavLinkText: #000000;
	--NavLinkSeparator: #9E9E9E;
}

/* Accessibility Improvement: Making the keyboard tab selection of the top/main nav highlight as white for visibility */
/* Note: Black background was applied to the group wrapper in the header template part, rather than the nav, as adding the color to the nav created odd padding issues, so the nav thinks it's on a white backround, thus the black default outline */
ul.UD-Top-Nav>li>a:focus,
ul.UD-Top-Nav>li>button:focus {
	outline-color: #FFFFFF;
}

/* Accessibilty Improvement: better bi-color outlines for the left navigation during keyboard tab selection */
/* also moved the outline from the anchor tags over to the span wihtin the anchor tag */
nav.UD-Sidebar-Nav>ul>li a:focus {
	outline: none;
}

nav.UD-Sidebar-Nav>ul>li button:focus,
nav.UD-Sidebar-Nav>ul>li a:focus span {
	border: 1px solid black;
	outline: 2px solid white;
}

/* Hide non-current branches: the nav block normally shows the entire navigation, this limits the side navigation to only show the current branch */
nav.UD-Sidebar-Nav>ul>li:not(.current-menu-ancestor, .current-menu-item) {
	display: none !important;
}

/* Overriding odd decisions made by the designers of the Twenty Twenty Five theme of how a left nav should work */
nav.UD-Sidebar-Nav>ul>li>ul,
nav.UD-Sidebar-Nav>ul li.current-menu-ancestor>ul,
nav.UD-Sidebar-Nav>ul li.current-menu-item>ul {
	border: none !important;
	position: static !important;
	height: auto !important;
	width: auto !important;
	visibility: visible !important;
	opacity: 1 !important;
}

nav.UD-Sidebar-Nav>ul>li>ul ul {
	border: none !important;
	width: auto !important;
	position: static !important;
}

nav.UD-Sidebar-Nav li {
	display: block !important;
}

nav.UD-Sidebar-Nav,
nav.UD-Sidebar-Nav>ul {
	display: block !important;
}

nav.UD-Sidebar-Nav li a {
	display: inline-block !important;
}

/* Left Nav - Header Modifications */
/* Hide the caret button from the main header */
nav.UD-Sidebar-Nav>ul>li>button {
	display: none !important;
}

/* Set text color for the header */
nav.UD-Sidebar-Nav>ul>li {
	color: var(--HeaderText) !important;
}

/* Set additional styling for the header */
nav.UD-Sidebar-Nav>ul>li>a {
	text-transform: uppercase !important;
	width: 100%;
	padding-left: 10px;
}

nav.UD-Sidebar-Nav>ul>li {
	font-weight: bold !important;
	font-size: 16px !important;
	line-height: 40px !important;
	padding: 0 !important;
	background-color: var(--HeaderBackground) !important;
}

/* Left Nav links below the header */
/* Set background color for the nav links */
nav.UD-Sidebar-Nav>ul>li ul {
	background-color: var(--NavLinkBackground) !important;
}

/* Set addtional styling for the nav links */
nav.UD-Sidebar-Nav>ul>li ul li {
	color: var(--NavLinkText) !important;
	font-weight: normal !important;
	font-size: 14px !important;
	line-height: 18px !important;
	padding: 0 10px !important;
}

nav.UD-Sidebar-Nav>ul>li ul li a {
	text-transform: capitalize !important;
	padding: 5px 0;
	/* position: relative; /* for anchoring the button */
	width: 100%;
	border-bottom: 1px solid var(--NavLinkSeparator) !important;
}

/* Set styling for the nav carat */
nav.UD-Sidebar-Nav li {
	position: relative;
}

nav.UD-Sidebar-Nav li button {
	position: absolute;
	right: 9px;
	top: 9px;
}