/**
 * NDT4 WordPress Theme Styles
 *
 * Minimal styles to support WordPress-specific features.
 * Main styles are loaded from conductor.nd.edu/stylesheets/themes/ndt/4.0/ndt.css
 *
 * @package NDT4
 * @since 4.0.0
 */

/* ==========================================================================
   NDT4 Style Overrides/Additions
   ========================================================================== */
@layer site {
	.breadcrumbs [href^=http]:after,
	.entry-title [href^=http]:after { background-image:none; }

	.nav-site {
		.active > .sub-menu {display:block; }
		.sub-menu { display:none; }
	}

	.card:has(.card-link) .card-link:after {
		background-image: url(../images/icn-arrow-right.svg);
  	background-size: .65em;
	}

	/* .card:has(.card-link):focus-within .card-title, .card:has(.card-link):hover .card-title {
		text-decoration: none;
	} */

	.widget_block { margin-block-end:1.5rem;
		.wp-block-heading {font-size:clamp(1.325rem,0.7vw + 1rem,1.5rem); }
	}

	@media only screen and (min-width: 30em) {
    figure.alignleft, figure.alignright { max-width:46%; }
	}
}

/* ==========================================================================
   WordPress Core - Required styles for WP features
   ========================================================================== */

/* Alignments */
.alignleft {
	float: left;
	margin-right: 1.5rem;
	margin-bottom: 1rem;
}

.alignright {
	float: right;
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

.aligncenter {
	clear: both;
	display: block;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1rem;
}

.alignwide {
	max-width: 1340px;
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* Captions */
.wp-caption {
	max-width: 100%;
	margin-bottom: 1rem;
}

.wp-caption img {
	display: block;
	max-width: 100%;
	height: auto;
}

.wp-caption-text {
	font-size: 0.875rem;
	color: #666;
	padding-top: 0.5rem;
}

/* Galleries */
.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.gallery-item {
	flex: 1 1 calc(33.333% - 1rem);
	min-width: 150px;
}

.gallery-icon img {
	display: block;
	width: 100%;
	height: auto;
}

.gallery-caption {
	font-size: 0.75rem;
	padding-top: 0.25rem;
}

/* Screen reader text */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: #21759b;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Page links (multi-page posts) */
.page-links {
	clear: both;
	margin: 1.5rem 0;
}

.page-links .page-numbers {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	margin-right: 0.25rem;
}

/* Post pagination */
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	padding: 0.5rem 0.75rem;
}

/* Comments */
.comment-list {
	list-style: none;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	padding-left: 2rem;
}

.comment-body {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e4e1d8;
}

.comment-meta {
	margin-bottom: 0.5rem;
}

.comment-author .avatar {
	float: left;
	max-width: 32px;
	margin-right: 1rem;
	border-radius: 50%;
}

.comment-reply-link {
	font-size: 0.875rem;
}

/* ==========================================================================
   WordPress Blocks - Block editor support
   ========================================================================== */

/* Embed responsive */
.wp-block-embed__wrapper {
	position: relative;
}

.wp-block-embed iframe {
	max-width: 100%;
}

/* Image block */
.wp-block-image figcaption {
	font-size: 0.875rem;
	color: #666;
	margin-top: 0.5rem;
}

/* Quote block - already styled by conductor, just add fallback */
.wp-block-quote {
	margin: 1.5rem 0;
}

/* Separator */
.wp-block-separator {
	border: none;
	border-top: 1px solid #e4e1d8;
	margin: 2rem 0;
}

.wp-block-separator.is-style-wide {
	border-top-width: 2px;
}

.wp-block-separator.is-style-dots {
	border: none;
	text-align: center;
}

.wp-block-separator.is-style-dots::before {
	content: '···';
	letter-spacing: 1em;
}

/* Table block */
.wp-block-table {
	margin-bottom: 1.5rem;
	overflow-x: auto;
}

.wp-block-table table {
	width: 100%;
}

/* Code block */
.wp-block-code {
	overflow-x: auto;
}

/* Preformatted */
.wp-block-preformatted {
	overflow-x: auto;
	white-space: pre-wrap;
}

/* ==========================================================================
   WordPress Admin Bar - Adjustment when logged in
   ========================================================================== */

.admin-bar .skip-links a:focus {
	top: 46px;
}

@media screen and (min-width: 783px) {
	.admin-bar .skip-links a:focus {
		top: 37px;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.skip-links,
	.header-nav-toggle,
	.header-nav-fixed,
	.global-menu,
	.footer-global--utils,
	.back-to-top {
		display: none !important;
	}
}
