/*
 * Theme Name: sl-ua-theme-3
 * Theme URI: https://sl.ua.edu/
 * Description: This WordPress theme framework is intended solely for The University of Alabama Division of Student Life.
 * Version: 1.0
 * Author: Brent Springer
 * Author URI: https://sl.ua.edu/
 * Template: ua-theme
 * Text Domain: uastudentlifeweb
 */

.sl-image-border img {
	border: solid 1px black;
	border-radius: 10px;
}

/* Query Loop with gray background and rounded corners */
.sl-QueryLoop {
	background-color: #F1F2F3;
	height: 100%;
	border-radius: var(--ua_border-radius--large, 1rem);
}
.sl-QueryLoop .wp-block-post-featured-image:not(.alignfull) > img {
	border-radius: var(--ua_border-radius--large, 1rem) var(--ua_border-radius--large, 1rem) 0 0;
	overflow: hidden;
}

/* Query Loop styled like Card blocks */
/* Match heights within a row */
.sl-util_li_display--flex li {
	display: flex;
}
.sl-util_height--100 {
	height: 100%;
}
/* Include featured image in Card block link */
.wp-block-query .ua_card_image-wrapper .wp-block-post-featured-image {
        position: inherit;
}

/* Staff page card formatting - add "sl-staff" to css of block containing card block(s) */
/* Limit card blocks to 500px wide on tablet/mobile screens */
@media screen and (max-width:927px) {
	.sl-staff .ua_card {
		max-width: 500px; 
		margin-left: auto; 
		margin-right: auto;
	}
	.sl-staff .ua_card img, .sl-staff .wp-block-image img {
		width: auto;
	}
}
/* Limit vertical card blocks to 500px wide */
.sl-staff .ua_card:not(.ua_card--landscape) {
	max-width: 500px; 
	margin-left: auto; 
	margin-right: auto;
} 
.sl-staff .ua_card:not(.ua_card--landscape) img {
	width: auto;
}

/* fit card to image and/or content width instead of stretching image - add "sl-card-fit" to css of block containing card block(s) */
.sl-card-fit .ua_card {
	max-width: fit-content; 
	margin-left: auto; 
	margin-right: auto;
}
.sl-card-fit .ua_card img {
	width: auto;
}

/* Card block subtitle font small instead of extra small (applies to groups/cards containing the class "sl-staff" or "sl_card_subtitle--small") */
.ua_minerva .sl-staff .ua_card_subtitle, .ua_minerva .sl_card_subtitle--small .ua_card_subtitle {
	font-size: var(--ua_font-size--small, 1rem);
}

/* Apply formatting to child groups - use with default or wide width */
/* All child groups have padding: flow */
.sl-group-child-boxes > div.wp-block-group {
	padding: var(--ua_space--flow, 2rem) !important;
}
/* Groups are numbered starting with 1, apply a rounded gray background to odd, even, or all groups  */
.sl-group-child-boxes.gray-odd > div.wp-block-group:nth-child(odd),
.sl-group-child-boxes.gray-even > div.wp-block-group:nth-child(even),
.sl-group-child-boxes.gray-all > div.wp-block-group {
	background: var(--ua_color-background--element, #f2f3f4);
	border-radius: var(--ua_border-radius--large, 1rem);
	overflow: hidden;
}
/* Cards, link boxes, and events in gray background groups are a darker gray */
.sl-group-child-boxes.gray-odd > div.wp-block-group:nth-child(odd) :is(.ua_card .ua_card_content-wrapper, .ua_link-box, .ua_event),
.sl-group-child-boxes.gray-even > div.wp-block-group:nth-child(even) :is(.ua_card .ua_card_content-wrapper, .ua_link-box, .ua_event),
.sl-group-child-boxes.gray-all > div.wp-block-group :is(.ua_card .ua_card_content-wrapper, .ua_link-box, .ua_event) {
	background: var(--ua_color-background--chip, #dfe2e5);
}

/* Apply formatting to child group sections - applies full width to background */
/* All child groups have full width */
.sl-group-child-sections > div.wp-block-group {
	max-width: 100% !important;
}
/* Groups are numbered starting with 1, apply a gray background to odd or even groups  */
.sl-group-child-sections.gray-odd > div.wp-block-group:nth-child(odd),
.sl-group-child-sections.gray-even > div.wp-block-group:nth-child(even) {
	background: var(--ua_color-background--element, #f2f3f4);
	padding-block: var(--ua_space--8, 4rem);
}
/* Cards, link boxes, and events in gray background groups are a darker gray */
.sl-group-child-sections.gray-odd > div.wp-block-group:nth-child(odd) :is(.ua_card .ua_card_content-wrapper, .ua_link-box, .ua_event),
.sl-group-child-sections.gray-even > div.wp-block-group:nth-child(even) :is(.ua_card .ua_card_content-wrapper, .ua_link-box, .ua_event) {
	background: var(--ua_color-background--chip, #dfe2e5);
}
/* Margins for groups without backgrounds*/
.sl-group-child-sections.gray-odd > div.wp-block-group:nth-child(even),
.sl-group-child-sections.gray-even > div.wp-block-group:nth-child(odd) {
	margin-block: var(--ua_space--8, 4rem);
}

/* Remove child headings (works with callout, card, and steps blocks) */
.hide-my-heading :is(h1, h2, h3, h4, h5, h6) {
	display: none !important;
}
/* Remove extra margin above next paragraph for card and callout blocks */
.hide-my-heading :is(h1, h2, h3, h4, h5, h6)[class*="_title"] + p {
	margin-top: 0 !important;
}

/* Event Feed classes */
/* Remove default h2 above event feed */
.hide-event-feed-h2 h2 {
	display: none !important;
}
/* Remove UA calendar button below event feed */
.hide-my-button a.ua_cta {
	display: none !important;
}

/* Semi-Transparent Cover block background for cover within cover */
.cover-transparent-black-50 {
	background-color: rgb(0 0 0 / 50%) !important;
}
.cover-transparent-white-50 {
	background-color: rgb(255 255 255 / 50%) !important;
}