/* 
 * FROM Bootstrap 5 Reboot
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled),
button:not(:disabled) {
    cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: smooth;
    }
}
/* 
 * END FROM Bootstrap 5 Reboot
*/

/* FOCUS STYLES */
:where(.wp-site-blocks *:focus-visible) {
    outline: var(--wp--custom--focus--width) solid var(--wp--custom--focus--color);
    outline-offset: var(--wp--custom--focus--offset);
}

:root :where(.wp-element-button, .wp-block-button__link) {
    --wp--custom--focus--color: var(--wp--preset--color--primary);
}


/* FORMS */
:where(.form-control) {
    --wp--custom--focus--offset: 0;
    --wp--custom--focus--color: var(--wp--preset--color--primary);

    padding: var(--wp--custom--form--control-padding-y) var(--wp--custom--form--control-padding-x);
    border: var(--wp--custom--border--width) solid var(--wp--custom--form--control-border-color);
    border-radius: var(--wp--custom--border--radius);
    color: var(--wp--custom--form--control-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--wp--custom--form--control-bg-color);
    background-clip: padding-box;
    font-size: 1rem;
    font-weight: 400;
    line-height: var(--wp--custom--form--control-line-height);
}

select.form-control {
    --form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    
    padding-right: 2.25rem;
    background: var(--wp--custom--form--control-bg-color) var(--form-select-bg-img) no-repeat right .75rem center/16px 12px;
}


/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
	text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6, p {
    margin-block-start: var(--wp--custom--spacing--block-gap);
    margin-block-end: 0;
}

/* https://developer.wordpress.org/news/2023/03/everything-you-need-to-know-about-spacing-in-block-themes/#contextual-spacing-for-headings */
.is-layout-flow * + :is( h1, h2, h3, h4, h5, h6 ),
.is-layout-constrained * + :is( h1, h2, h3, h4, h5, h6 ),
.wp-block-post-content * + :is( h1, h2, h3, h4, h5, h6 )  {
    margin-block-start: calc(var(--wp--style--block-gap)*2.5);
}

.is-layout-flow :is( h1, h2, h3, h4, h5, h6 ) + :is( h1, h2, h3, h4, h5, h6 ),
.is-layout-constrained :is( h1, h2, h3, h4, h5, h6 ) + :is( h1, h2, h3, h4, h5, h6 ),
.wp-block-post-content :is( h1, h2, h3, h4, h5, h6 ) + :is( h1, h2, h3, h4, h5, h6 ) {
    margin-block-start: calc(var(--wp--style--block-gap)*.85);
}


main iframe:not(.iframe-not-fluid) {
    --aspect-ratio: 16/9;

    width: 100%;
    height: auto;
    border: none;
    display: block;
    max-width: var(--wp--style--global--content-size);
    margin-left: auto !important;
    margin-right: auto !important;
    aspect-ratio: var(--aspect-ratio)
}


/* Interior Link Style 
* Used on TTKY advanced-link and list-group blocks 
*/
.link-inner-style,
.link-inner-style-supported {
    --wp--custom--focus--color: var(--wp--custom--link--color);
}

.link-inner-style,
.link-inner-style:hover,
.link-inner-style-supported,
.link-inner-style-supported:hover {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

:where(.link-inner-style, .link-inner-style-supported.link-inner-style-supported--set):hover .link-inner-style__link-text {
    text-decoration: underline;
}

:where(.link-inner-style, .link-inner-style-supported.link-inner-style-supported--set) .wp-block-font-awesome-icon,
:where(.link-inner-style, .link-inner-style-supported.link-inner-style-supported--set) .link-inner-style__link-text {
    color: var(--wp--custom--link--color);
}

:where(.link-inner-style, .link-inner-style-supported.link-inner-style-supported--set):hover .wp-block-font-awesome-icon,
:where(.link-inner-style, .link-inner-style-supported.link-inner-style-supported--set):hover .link-inner-style__link-text {
    color: var(--wp--custom--link--hover-color);
}