/*
Theme Name: UoA
Theme URI: https://www.abdn.ac.uk/
Author: UoA
Author URI: https://www.abdn.ac.uk/
Description: UoA WordPress Theme.
Requires at least: 5.9
Tested up to: 6.0
Requires PHP: 5.6
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uoa
Tags: full-site-editing

*/

/*
 * Font smoothing.
 * This is a niche setting that will not be available via Global Styles.
 * https://github.com/WordPress/gutenberg/issues/35934
 */

 body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/*
 * Text and navigation link styles.
 * Necessary until the following issue is resolved in Gutenberg:
 * https://github.com/WordPress/gutenberg/issues/27075
 */

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25ch;
}

a:hover,
a:focus {
	text-decoration-style: dashed;
}

a:active {
	text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item a:hover,
.wp-block-navigation .wp-block-navigation-item a:focus {
	text-decoration: underline;
	text-decoration-style: solid;
}

/*
 * Search and File Block button styles.
 * Necessary until the following issues are resolved in Gutenberg:
 * https://github.com/WordPress/gutenberg/issues/36444
 * https://github.com/WordPress/gutenberg/issues/27760
 */

.wp-block-search__button,
.wp-block-file .wp-block-file__button {
	background-color: var(--wp--preset--color--primary);
	border-radius: 0;
	border: none;
	color: var(--wp--preset--color--background);
	font-size: var(--wp--preset--font-size--medium);
	padding: calc(.667em + 2px) calc(1.333em + 2px);
}

/*
 * Button hover styles.
 * Necessary until the following issue is resolved in Gutenberg:
 * https://github.com/WordPress/gutenberg/issues/27075
 */

.wp-block-search__button:hover,
.wp-block-file .wp-block-file__button:hover,
.wp-block-button__link:hover {
	opacity: 0.90;
}

/*
 * Alignment styles.
 * These rules are temporary, and should not be relied on or
 * modified too heavily by themes or plugins that build on
 * Twenty Twenty-Two. These are meant to be a precursor to
 * a global solution provided by the Block Editor.
 *
 * Relevant issues:
 * https://github.com/WordPress/gutenberg/issues/35607
 * https://github.com/WordPress/gutenberg/issues/35884
 */

.wp-site-blocks,
body > .is-root-container,
.edit-post-visual-editor__post-title-wrapper,
.wp-block-group.alignfull,
.wp-block-group.has-background,
.wp-block-cover.alignfull,
.is-root-container .wp-block[data-align="full"] > .wp-block-group,
.is-root-container .wp-block[data-align="full"] > .wp-block-cover {
	padding-left: var(--wp--custom--spacing--outer);
	padding-right: var(--wp--custom--spacing--outer);
}

.wp-site-blocks .alignfull,
.wp-site-blocks > .wp-block-group.has-background,
.wp-site-blocks > .wp-block-cover,
.wp-site-blocks > .wp-block-template-part > .wp-block-group.has-background,
.wp-site-blocks > .wp-block-template-part > .wp-block-cover,
body > .is-root-container > .wp-block-cover,
body > .is-root-container > .wp-block-template-part > .wp-block-group.has-background,
body > .is-root-container > .wp-block-template-part > .wp-block-cover,
.is-root-container .wp-block[data-align="full"] {
	margin-left: calc(-1 * var(--wp--custom--spacing--outer)) !important;
	margin-right: calc(-1 * var(--wp--custom--spacing--outer)) !important;
	width: unset;
}

/* Blocks inside columns don't have negative margins. */
.wp-site-blocks .wp-block-columns .wp-block-column .alignfull,
.is-root-container .wp-block-columns .wp-block-column .wp-block[data-align="full"],
/* We also want to avoid stacking negative margins. */
.wp-site-blocks .alignfull:not(.wp-block-group) .alignfull,
.is-root-container .wp-block[data-align="full"] > *:not(.wp-block-group) .wp-block[data-align="full"] {
	margin-left: auto !important;
	margin-right: auto !important;
	width: inherit;
}

/*
 * Responsive menu container padding.
 * This ensures the responsive container inherits the same
 * spacing defined above. This behavior may be built into
 * the Block Editor in the future.
 */

.wp-block-navigation__responsive-container.is-menu-open {
	padding-top: var(--wp--custom--spacing--outer);
	padding-bottom: var(--wp--custom--spacing--large);
	padding-right: var(--wp--custom--spacing--outer);
	padding-left: var(--wp--custom--spacing--outer);
}

/* ##### UoA Styles ##### */

/* ## General ## */

/* remove underline from site title */
header .wp-block-site-title a {
	text-decoration: none;
}

/* remove underline from post title */
.wp-block-post-title a {
	text-decoration: none;
}

/* Block styles : https://getcssscan.com/css-box-shadow-examples */

.is-style-boxshadow,
.is-style-boxshadow-media img {
	padding: 10px;
	box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.is-style-bottomshadow,
.is-style-bottomshadow-media img {
	padding: 10px;
	box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
}

.is-style-subtleshadow,
.is-style-subtleshadow-media img {
	padding: 10px;
	box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

.is-style-primaryboxshadow {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-contrast);
	padding: 10px;
	box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.is-style-primarybottomshadow {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-contrast);
	padding: 10px;
	box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
}

.is-style-primarysubtleshadow {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-contrast);
	padding: 10px;
	box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

.is-style-secondaryboxshadow {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary-contrast);
	padding: 10px;
	box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.is-style-secondarybottomshadow {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary-contrast);
	padding: 10px;
	box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
}

.is-style-secondarysubtleshadow {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary-contrast);
	padding: 10px;
	box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

/* # UoA Site Header # */

.uoa-site-header .wp-block-column:first-child {
	text-align: center;
}

.uoa-site-header .wp-block-column:last-child {
	text-align: center;
}

/* # UoA Archive Display # */

.wp-block-post-featured-image {
	border-bottom: 1px solid #1f1f1f;
}

.uoa-read-more-link {
	border-top: 1px solid #1f1f1f;
}

.uoa-read-more img {
	border: 1px solid var(--wp--preset--color--abdn-grey-60);
}

.uoa-site-navigation {
	margin: 0 var(--wp--custom--spacing--outer);
}

.uoa-post-item {
	border: 1px solid #1f1f1f;
}

.wp-block-query li .uoa-post-item:hover {
	box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.uoa-post-item .wp-block-button__link {
	background: var(--wp--preset--color--abdn-grey-20);
	border-top: 1px solid var(--wp--preset--color--abdn-grey-60);
	color: var(--wp--preset--color--abdn-grey-60);
	text-align: left;
}

/* ## Scroll to top ## */
#scrollToTop {
	background-color: var(--wp--preset--color--primary);
	border: none;
	border-radius: 50%;
	color: var(--wp--preset--color--secondary);
	cursor: pointer;
	bottom: 20px;
	display: none;
	outline: none;
	position: fixed;
	right: 30px;
	text-align: center;
	transform: rotate(90deg);
	width: 30px;
	z-index: 99999;
}

a#scrollToTop {
	padding: 10px;
	text-decoration: none;
}

#scrollToTop:hover {
	background-color: var(--wp--preset--color--tertiary);
}

/* ensure scroll to top link appears in admin */
.edit-site-block-editor__block-list #scrollToTop {
	display: block !important;
}

/* ## UoA Corporate Footer ## */

.uoa-logo-footer img {
	width: 300px;
}

.uoa-where-utility {
	list-style: none;
	text-decoration: none;
	padding-left: 0;
}

.uoa-where-utility li a {
	text-decoration: none;
}

.uoa-where-utility li a:hover {
	text-decoration: underline;
}

.uoa-utility-links .wp-block-buttons {
	justify-content: center;
}

.uoa-utility-links .wp-block-buttons a {
	font-size: .8em;
}

.uoa-global-contact {
	padding: 0 0 1.5em;
	background-position: right center;
	background-image: url('assets/images/british_isles_sm_2018.png');
	background-repeat: no-repeat;
	background-size: 10em;
}

/* # Corporate footer top of page link # */
.uoa-top-of-page {
	text-align: center;
}

.uoa-top-of-page a {
	color: #fff !important;
	text-decoration: none;
	background-color: #333333;
	padding: 0.5em 1em;
	font-size: .8em;
}

.uoa-top-of-page a:hover {
	background-color: #3b5998;
}

/* # social icons # */

.offscreen {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip-path: inset(100%);
    clip: rect(1px 1px 1px 1px);
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;	
}

.uoa-global-social ul {
	font-size: 2em;
}

.uoa-global-social h2 {
	display: none;
}

.fse-uoa-social {
	display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.fse-uoa-social li {
	margin: 0 0.5em 0 0 ;
}

.fse-uoa-social li:last-child {
    margin-right: 0;
}

.fse-uoa-social li a {
    color: var(--wp--preset--color--abdn-grey-40);
    text-decoration: none;
}

.fa-brands.fa-youtube:hover {
    color: #e52d27;
}

.fa-brands.fa-twitter-square:hover {
    color: #1da1f2;
}

.fa-brands.fa-facebook-square:hover {
    color: #3b5998;
}

.fa-brands.fa-pinterest-square:hover {
    color: #e52d27;
}

.fa-brands.fa-instagram-square:hover {
    color: #3b5998;
}

.fa-brands.fa-linkedin:hover {
    color: #0077b5;
}

.fa-brands.fa-weibo:hover {
    color: #e52d27;
}

/* # utility legals # */

.utility-legals ul {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: center;
}

.utility-legals li {
	margin: 0;
}

.utility-legals li a {
	display: block;
}

/* ## UoA Navigation ## */
/* control the spacing on the responsive mobile menu */
.uoa-site-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
	padding-top: 0;
	padding-bottom: .5em;
}

/* Override core WordPress mobile to standard menu display settings: https://wordpress.org/support/topic/navigation-breakpoint/ */
/* turn 'on' the mobile menu */
body .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: block !important;
}

/* turn 'off' the standard menu */
body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
	display: none !important;
}

@media screen and (min-width: 600px) {
	/* # Corporate footer top of page link # */
	.uoa-top-of-page {
		text-align: right;
		position: relative;
		bottom: -20px;
	}
}

@media (min-width: 782px) {
	.uoa-site-header .wp-block-column:first-child {
		text-align: left;
	}
	
	.uoa-site-header .wp-block-column:last-child {
		text-align: right;	
	}
	
	.fse-uoa-social {
		justify-content: right;
	}

	.uoa-utility-links {
		padding-top: 50px;
	}

	.uoa-global-contact {
		margin-top: -100px !important;
	}

	.uoa-utility-links .wp-block-buttons {
		justify-content: right;
	}

	.uoa-global-social h2 {
		display: block;
	}
}

@media screen and (min-width: 880px) {
	/* # UoA Navigation # */
	.uoa-site-navigation ul ul {
		
		border: 1px solid var(--wp--preset--color--abdn-grey-60) !important;
		border-top: 0;
		
	}

	.uoa-site-navigation ul ul li {
		
		margin: 0;
		border-top: 1px solid var(--wp--preset--color--abdn-grey-60);
		width: 250px;
		
	}

	/* stop menus dropping 1 pixel with each level */
	.uoa-site-navigation ul ul li:first-child { 
		
        margin: 0;
		margin-top: -1px;
		
    }

	/* # map position # */
	.uoa-global-contact {
		background-position: center;
	}

	/* # utility legals # */
	.utility-legals ul {
		display: flex;
		justify-content: center;
		text-align: center;
	}

	.utility-legals li {
		margin: 0 0.25em;
	}
}

@media (min-width: 880px) {
	/* turn 'off' the mobile menu */
	body .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none !important;
	}

	/* turn 'on' the standard menu */
	body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: block !important;
	}
}