/*
Theme Name: Ottawa Tool Library
Theme URI: https://wordpress.org/themes/ottawatoollibrary/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Ottawa Tool Library emphasizes simplicity and adaptability. It offers flexible design options, supported by a variety of patterns for different page types, such as services and landing pages, making it ideal for building personal blogs, professional portfolios, online magazines, or business websites. Its templates cater to various blog styles, from text-focused to image-heavy layouts. Additionally, it supports international typography and diverse color palettes, ensuring accessibility and customization for users worldwide.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ottawatoollibrary
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
*/


@media screen and (min-width: 1024px) {
	html {
		font-size: 125%;
	}
}

html {
	font-size: 100%;
}

.wp-block-image.is-style-rounded img {
	border-radius: 16px;
}

.section .section__container {
	max-width: var(--wp--style--global--wide-size);
	margin: 0 auto;
}

.gallery-grid .gallery-grid__container > .wp-block-column:first-of-type .wp-block-image:last-child {
	width: calc(100% - 24px);
	margin-left: 24px;
}

.gallery-grid .gallery-grid__container > .wp-block-column:last-of-type .wp-block-image {
	height: calc(100% - 64px - var(--wp--preset--spacing--x-small));
	width: 100%;
}

.gallery-grid .gallery-grid__container > .wp-block-column:last-of-type .wp-block-image img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.wp-block-cover.is-style-full {
	background: var(--wp--preset--color--contrast);
	/* For mobile: min-height: 450px; */
	/* For tablet: min-height: 800px; */
	min-height: 1000px;
}

.wp-block-cover.is-style-card {
	background: var(--wp--preset--color--contrast);
	/* For mobile: min-height: 450px; */
	/* For tablet: min-height: 800px; */
	min-height: 570px;
}

.card-grid {
	grid-template-columns: 1fr;
}

.card-grid .wp-block-cover.is-style-card:first-of-type {
		border-top-left-radius: 16px;
		border-top-right-radius: 16px;
	}

.card-grid .wp-block-cover.is-style-card:last-of-type {
	border-bottom-left-radius: 16px;
	border-bottom-right-radius: 16px;
}

@media screen and (min-width: 1024px) {
	.card-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.card-grid .wp-block-cover.is-style-card:first-of-type {
		border-top-left-radius: 16px;
		border-top-right-radius: 0;
	}

	.card-grid .wp-block-cover.is-style-card:nth-of-type(2) {
		border-top-right-radius: 16px;
	}

	.card-grid .wp-block-cover.is-style-card:nth-of-type(3) {
		border-bottom-left-radius: 16px;
	}

	.card-grid .wp-block-cover.is-style-card:last-of-type {
		border-bottom-right-radius: 16px;
		border-bottom-left-radius: 0;
	}

}

@media screen and (min-width: 1200px) {
	.card-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.card-grid .wp-block-cover.is-style-card:first-of-type {
		border-top-left-radius: 16px;
		border-bottom-left-radius: 16px;
	}

	.card-grid .wp-block-cover.is-style-card:last-of-type {
		border-top-right-radius: 16px;
		border-bottom-right-radius: 16px;
	}

	.card-grid .wp-block-cover.is-style-card:nth-of-type(2) {
		border-radius: 0;
	}

	.card-grid .wp-block-cover.is-style-card:nth-of-type(3) {
		border-radius: 0;
	}
}

.hide-mobile {
	display: none !important;
}

@media screen and (min-width: 1200px) {
	.hide-desktop {
		display: none !important;
	}

	.hide-mobile {
		display: flex !important;
	}
}

.columns__grid-4 {
	display: grid !important;
	grid-template-columns: 1fr;
}

@media screen and (min-width: 1024px) {
	.columns__grid-4 {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 1200px) {
	.columns__grid-4 {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
	}
}

.text-with-decorative-image {
	position: relative;
}

.text-with-decorative-image .wp-block-column.decorative {
	z-index: 2;
}

.text-with-decorative-image .wp-block-column.decorative .wp-block-image {
	width: 100%;
	float: none;
}

.text-with-decorative-image .wp-block-column.decorative .wp-block-image img {
	object-fit: cover;
}

.text-with-decorative-image .wp-block-column.decorative::after {
	display: none;
}

@media screen and (min-width: 1024px) {

	.text-with-decorative-image .wp-block-column.decorative .wp-block-image {
		width: calc(100% - 48px);
		float: right;
	}

	.text-with-decorative-image .wp-block-column.decorative::after {
		content: '';
		position: absolute;
		top: 0;
		right: 0;
		background: var(--wp--preset--color--accent-1);
		width: 50%;
		display: block;
		height: calc(100% - (var(--wp--preset--spacing--x-large) * 3));
		border-bottom-left-radius: 32px;
		z-index: -1;
	}
}

@media screen and (min-width: 1200px) {
	.text-with-decorative-image .wp-block-column.decorative::after {
		height: calc(100% - (var(--wp--preset--spacing--x-large) * 2));
	}
}

footer.site-footer {
	border-top: 1px solid var(--wp--preset--color--accent-1);
	margin-block-start: 0;
}

footer.site-footer .site-footer__container {
	max-width: var(--wp--style--global--wide-size);
	margin: 0 auto;
}

footer.site-footer .site-footer__container a {
	text-decoration: none;
}

.gform_required_legend {
	display: none !important;
}

.gfield_label {
	font-weight: bold !important;
}

.gform-button {
	border-radius: 32px !important;
	font-weight: bold !important;
}

.gform-theme--framework input[type="email"],
.gform-theme--framework input[type="text"],
.gform-theme--framework textarea {
	border: 1px solid var(--wp--preset--color--accent-1) !important;
	box-shadow: none !important;
}

.gform-theme--framework input:focus {
	outline: none !important;
}

.table__hours-of-operation {
	width: auto;
}

.table__hours-of-operation th,
.table__hours-of-operation td {
	padding: 0;
}

.table__hours-of-operation tr {
	display: grid;
	column-gap: 8px;
	grid-template-columns: 90px 1fr;
}

.table__hours-of-operation tr td:first-of-type {
	font-weight: bold;
}

.table__hours-of-operation tbody {
	display: grid;
	row-gap: 4px;
}

.list__helpful-links {
	padding-left: 0;
	list-style: none;
	line-height: 1.625;
}

/* WooCommerce */
.woocommerce-cart .wp-block-post-title,
.woocommerce-checkout .wp-block-post-title,
.woocommerce-account .wp-block-post-title {
	max-width: 100%;
}

.wp-element-button,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
	border-radius: 32px;
}

.woocommerce img,
.woocommerce-page img {
	border-radius: 16px;
}

.wp-block-woocommerce-product-image-gallery {
    max-width: 100% !important;
    width: 100% !important;
}

.woocommerce-product-gallery,
.woocommerce-product-gallery .flex-viewport {
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce-product-gallery img {
    width: 100% !important;
    height: auto !important;
	border-radius: 16px;
}

.wp-block-ctrl-accordion .accordion__header .accordion__heading {
	font-size: var(--wp--preset--font-size--medium);
}

.embla__container {
	gap: 0;
}

.price-card {
	border-right: 2px solid var(--wp--preset--color--accent-1);
	padding: 0 16px;
	min-width: 275px;
}

.price-card:last-of-type {
	border-right: 0;
}

.price-card ul {
	list-style: none;
	padding-left: 0;
}

@media (min-width: 1200px) {
	.embla__controls {
		display: none;
	}

	.price-card {
		min-width: 290px;
	}
}

/* 4. OPTIONAL: If the Columns themselves are too narrow */
@media (min-width: 782px) {
    /* This targets the specific column structure in your source code */
    .wp-block-columns.wp-container-core-columns-is-layout-28f84493 {
        max-width: 100% !important; /* Allow columns to go wider than content width */
    }
}

.grid-logo__container {
	justify-content: center;
	display: flex !important;
	flex-wrap: wrap;
}

.grid-logo__container figure {
	width: calc(33.33333% - var(--wp--preset--spacing--medium));
}

@media (min-width: 1024px) {
	.grid-logo__container figure {
		width: calc(20% - var(--wp--preset--spacing--medium));
	}
}



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

/* 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;
}

/* Fix for text decoration issue in Gutenberg */
h1[style*="text-decoration:none"] a,
h2[style*="text-decoration:none"] a,
h3[style*="text-decoration:none"] a,
h4[style*="text-decoration:none"] a,
h5[style*="text-decoration:none"] a,
h6[style*="text-decoration:none"] a {
    text-decoration: inherit;
}

/*
 * 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;
}

.ctrl-mobile-toggle {
	font-weight: bold;
	color: var(--wp--preset--color--contrast);
	display: grid;
	grid-template-columns: 24px max-content;
	gap: 4px;
	line-height: 1;
}

.ctrl-mobile-toggle::before {
	content: url('assets/images/menu.svg');
	line-height: 1;
	height: 24px;

}

/**
 * Box Model, Html & Body
 */
html {
	scrollbar-gutter: stable;
}

html,
body,
[canvas=container],
[data-off-canvas] {
	margin: 0;
	padding: 0;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
}

/**
 * Canvas
 */
[data-canvas=container] {
	width: 100%;
	height: 100%;
	position: relative;
	background-color: var(--wp--preset--color--accent-2);
	-webkit-overflow-scrolling: touch; /* Enables momentum scrolling on iOS devices, may be removed by setting to 'auto' in your own CSS. */
}

[canvas=container]:before,
[canvas=container]:after {
	clear: both;
	content: '';
	display: table;
}

/**
 * Off-Canavs
 */
[data-off-canvas] {
	display: none;
	position: fixed;
	overflow: hidden;
	overflow-y: auto;
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--accent-2);
	-webkit-overflow-scrolling: touch; /* Enables momentum scrolling on iOS devices, may be removed by setting to 'auto' in your own CSS. */
}

[data-off-canvas*=top] {
	width: 100%;
	height: 255px;
	top: 0;
}

[data-off-canvas*=right] {
	width: 75%;
	height: 100%;
	top: 0;
	right: 0;
}

[data-off-canvas*=bottom] {
	width: 100%;
	height: 255px;
	bottom: 0;
}

[data-off-canvas*=left] {
	width: 75%;
	height: 100%;
	top: 0;
	left: 0;
}

[data-off-canvas*=reveal] {
	z-index: 0;
}

[data-off-canvas*=overlay] {
	z-index: 9999;
}

/* Reset any transform or margin settings for fade style panels */
[data-off-canvas*="fade"] {
	z-index: 500;
	margin: 0;
	transform: none;
	/* Optionally, ensure the panel starts with zero opacity */
	opacity: 0;
}

/**
 * Animation
 */

[data-canvas],
[data-off-canvas] {
	-webkit-transform: translate(0px, 0px);
	-ms-transform: translate(0px, 0px);
	transform: translate(0px, 0px);
	-webkit-transition: -webkit-transform 300ms;
	transition: transform 300ms;
	-webkit-backface-visibility: hidden; /* Prevents flickering, may be removed if experiencing problems with fixed background images in Chrome. */
}

[data-off-canvas*=shift][data-off-canvas*=top] {
	-webkit-transform: translate(0px, 50%);
	transform: translate(0px, 50%);
}

[data-off-canvas*=shift][data-off-canvas*=right] {
	-webkit-transform: translate(-50%, 0px);
	transform: translate(-50%, 0px);
}

[data-off-canvas*=shift][data-off-canvas*=bottom] {
	-webkit-transform: translate(0px, -50%);
	transform: translate(0px, -50%);
}

[data-off-canvas*=shift][data-off-canvas*=left] {
	-webkit-transform: translate(50%, 0px);
	transform: translate(50%, 0px);
}

body.menu-open {
	overflow: hidden !important;
}

.menu-close {
	position: absolute;
	top: 16px;
}

.menu-close a {
	display: block;
	line-height: 1;
}

/**
 * Print
 */
@media print {
	[data-canvas] {
		-webkit-transform: translate(0px, 0px) !important;
		-ms-transform: translate(0px, 0px) !important;
		transform: translate(0px, 0px) !important;
	}

	[data-off-canvas] {
		display: none !important;
	}
}

/* Styles */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap; /* Prevents the text from wrapping */
	border: 0;
}

.nav-slidebar {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--accent-2);
	width: 100%;
	overflow: hidden;
}

.admin-bar .nav-slidebar {
	top: 46px;
}

@media (min-width: 768px) {
	.admin-bar .nav-slidebar {
		top: 32px;
	}
}

.nav-slidebar #panel-content {
	display: flex;
	height: 100%;
	width: 100%;
	justify-content: flex-start;
	align-items: flex-start;
	padding: 48px 32px 32px 32px;
	box-sizing: border-box;
}

.nav-slidebar .nav-primary {
	padding: 0;
}

.nav-slidebar .nav-primary .nav-primary-menu {
	list-style-type: none;
	padding: 0 !important;
	margin: 0 !important;
	display: grid;
	gap: 8px;
}

.nav-slidebar .nav-primary .nav-primary-menu li {
	text-align: left;
	width: 100%;
	list-style-type: none;
	line-height: 1.625;
}

.nav-slidebar .nav-primary .nav-primary-menu li.menu-item-has-children > a {
	display: grid;
	grid-template-columns: max-content 24px;
	gap: 8px;
	align-items: center;
	justify-content: flex-start;
}

.nav-slidebar .nav-primary .nav-primary-menu li.menu-item-has-children > a::after {
	content: url( 'assets/images/chevron-down.svg');
	line-height: 1;
}

.nav-slidebar .nav-primary .nav-primary-menu li.menu-item-has-children.open > a::after {
	transform: rotate(-180deg);
	-webkit-transform: rotate(-180deg);
}

.nav-slidebar .nav-primary .nav-primary-menu li a {
	color: var(--wp--preset--color--accent-2);
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: bold;
	font-size: var(--wp--preset--font-size--medium);
	text-decoration: none;
}

.nav-slidebar .nav-primary .nav-primary-menu li ul.sub-menu {
	padding: 0 0 0 8px;
	display: none;
}

.nav-slidebar .nav-primary .nav-primary-menu li ul.sub-menu.open {
	display: block;
}

.nav-slidebar .nav-primary .nav-primary-menu li ul.sub-menu li a {
	font-size: var(--wp--preset--font-size--medium);
}

/* TEC Styles */
:root {
    --tec-font-size-1: var(--wp--preset--font-size--x-small) !important;
    --tec-font-size-2: var(--wp--preset--font-size--small) !important;
	--tec-font-size-7: var(--wp--preset--font-size--large) !important;
	--tec-color-text-primary: var(--wp--preset--color--contrast) !important;
    --tec-color-link-accent: var(--wp--preset--color--primary) !important;
	--tec-color-link-accent-hover: var(--wp--preset--color--primary) !important;
	--tec-color-button-primary: var(--wp--preset--color--primary) !important;
	--tec-color-text-events-title: var(--wp--preset--color--primary) !important;
	--tec-color-text-event-date: var(--wp--preset--color--secondary) !important;
	--tec-color-accent-primary-hover: var(--wp--preset--color--primary) !important;
	--tec-color-border-default: var(--wp--preset--color--accent-1) !important;
	--tec-color-text-secondary: var(--wp--preset--color--secondary) !important;
	--tec-color-icon-primary: var(--wp--preset--color--secondary) !important;
	--tec-line-height-1: 1.2 !important;
	--tec-font-family-sans-serif: var(--wp--preset--font-family--open-sans) !important;
}

.tribe-common .tribe-common-form-control-text__input:focus {
	outline: none !important;
}

.tribe-events-c-subscribe-dropdown__container {
	display: none !important;
}

.single-tribe_events .tribe-events-schedule {
	justify-content: center;
}

.tribe-events-back {
	text-align: center;
	margin-bottom: 0;
	color: var(--wp--preset--color--secondary);
}

.tribe-events-back a {
	color: var(--wp--preset--color--secondary) !important;
	font-family: var(--wp--preset--font-family--montserrat);
}

.tribe-events-single-event-title {
	text-align: center;
	margin-bottom: 0;
	font-family: var(--wp--preset--font-family--montserrat);
}

.single-tribe_events .tribe-events-event-image img {
	margin: 0 auto;
	width: 100%;
	height: auto;
}

.single-tribe_events .tribe-events-single-event-description.tribe-events-content > div:first-of-type {
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--primary);
	font-weight: bold;
	font-family: var(--wp--preset--font-family--montserrat);
	line-height: 1.2;
}

.single-tribe_events .tribe-events-single-event-description.tribe-events-content > div > div{
	margin: 16px 0 0 0 !important;
}

.tribe-events-single ul.tribe-related-events li {
	background: none !important;
	border: 0 !important;
}

.tribe-common-h1
.tribe-common-h2,
.tribe-common-h3,
.tribe-common-h4,
.tribe-common-h5,
.tribe-common-h6 {
	font-family: var(--wp--preset--font-family--montserrat) !important;
}

.tribe-events-calendar-list__event-datetime {
	font-weight: bold;
	font-family: var(--wp--preset--font-family--montserrat);
	color: var(--wp--preset--color--secondary);
}


/* Swap colors for TEC in dark mode */
:root :where(.is-style-dark-section-secondary) {
    color: var(--wp--preset--color--base);
    --tec-color-text-primary: var(--wp--preset--color--base);
    --tec-color-accent-primary: var(--wp--preset--color--base);
    --tec-color-accent-secondary: var(--wp--preset--color--accent-1);
    --tec-color-background: var(--wp--preset--color--contrast);
    --tec-color-link-accent: var(--wp--preset--color--accent-1);
    /* --tec-color-text-events-title-widget-list: var(--tec-color-text-primary); */
}

.tribe-common .tribe-common-anchor-thin:active, .tribe-common .tribe-common-anchor-thin:focus, .tribe-common .tribe-common-anchor-thin:hover {
	border-bottom: 0 !important;
}

/* Align events in container based on preceding H2 heading */
h2.has-text-align-center + div .tribe-events {
}

h2.has-text-align-center + div .tribe-events {
    display: flex;
    justify-content: center;
}

/* Make the events list use the TEC text color variable */

.tribe-events-widget .tribe-events-widget-events-list__event-title,
.tribe-common .tribe-common-b2 {
    color: var(--tec-color-text-primary);
}

/* Swap colors of SVG icon in dark mode */

.tribe-common .tribe-common-c-svgicon--messages-not-found path {
    stroke: var(--tec-color-text-primary) !important;
}

.tribe-events-widget .tribe-events-widget-events-list .tribe-events-c-messages__message--notice .tribe-events-c-messages__message-icon-svg {
    fill: var(--tec-color-text-primary) !important;
}

/* Make old-style coloured calendar box */

.tribe-events-widget .tribe-events-widget-events-list__event-date-tag {
    background-color: var(--wp--preset--color--primary);
    border: 2px solid var(--wp--preset--color--primary);
    margin-right: 15px;
    padding: 3px 0;
    border-radius: 10px;
}

.tribe-events-widget .tribe-events-widget-events-list__event-row .tribe-events-widget-events-list__event-date-tag span {
    color: var(--wp--preset--color--base);
}

/* Print */
@media print {
	[data-canvas] {
		-webkit-transform: translate(0px, 0px) !important;
		-ms-transform: translate(0px, 0px) !important;
		transform: translate(0px, 0px) !important;
	}

	[data-off-canvas] {
		display: none !important;
	}
}

