/*
Theme Name: OEG Awards
Theme URI: 
Author: 
Author URI: https://www.oeglobal.org/
Description: 
Requires at least: 6.6.5
Tested up to: 6.9
Requires PHP: 
Version: 0.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: oeg-main
Text Domain: oeg-awards
Tags: 
*/

/* Single Award page */

.award-link .prefix {
    display: inline-block;
}
.award-link .value a[href] {
    /* Add ellipsis at the end if text does not fit in given width */
    text-overflow: ellipsis;
    /* Have to add this line to make upper line work */
    overflow: hidden;
    /* Decide what is the longest link width in given units (px, em, rem etc.) */
    max-width: 30ch;
    /* Element has to be inline-block to have width and fit inline in the same time */
    display: inline-block;
    /* We want to have all the link in one line without wrapping */
    white-space: nowrap;
    /* Fix vertical position of inline-block */
    vertical-align:top
}

/* Category info widget */
.award-content-columns:before {
    content: "";
    width: 100vw;
    height: 800px;
    background-color: var(--wp--preset--color--dark-blue);
    background-image: url(assets/img/awards-bg.svg);
    background-size: cover;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
}

/* Fade awards into view after an archive filter changes. */
body.post-type-archive-award .wp-block-post-template > li,
body.post-type-archive-award .wp-block-post-template > .wp-block-post {
    opacity: 0;
    animation: oeg-award-fade-in 450ms ease-out forwards;
}

body.post-type-archive-award .wp-block-post-template > li:nth-child(2),
body.post-type-archive-award .wp-block-post-template > .wp-block-post:nth-child(2) { animation-delay: 60ms; }

body.post-type-archive-award .wp-block-post-template > li:nth-child(3),
body.post-type-archive-award .wp-block-post-template > .wp-block-post:nth-child(3) { animation-delay: 120ms; }

body.post-type-archive-award .wp-block-post-template > li:nth-child(4),
body.post-type-archive-award .wp-block-post-template > .wp-block-post:nth-child(4) { animation-delay: 180ms; }

body.post-type-archive-award .wp-block-post-template > li:nth-child(5),
body.post-type-archive-award .wp-block-post-template > .wp-block-post:nth-child(5) { animation-delay: 240ms; }

@keyframes oeg-award-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.post-type-archive-award .wp-block-post-template > li,
    body.post-type-archive-award .wp-block-post-template > .wp-block-post {
        opacity: 1;
        animation: none;
        transform: none;
    }
}

/* Category info widget */
.oeg-award-category-term {
    text-align: center;
}

.oeg-award-category-icon {
    margin: 0 auto;
}

.oeg-award-category-desc {
    text-align: left;
    font-size: var(--wp--preset--font-size--small);
}

/* Awards query loop widget */
.oeg-award-item {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--wp--preset--spacing--10);
}

.oeg-award-item:not(:last-child) {
    margin-bottom: var(--wp--preset--spacing--20);
}

.oeg-award-item img {
    width: 80px;
    height: 80px;
}

.oeg-award-item .oeg-award-title {
    font-size: var(--wp--preset--font-size--medium);
    margin: 0 !important;
}

.oeg-award-item a {
    border: none;
    text-decoration: none;
    color: var(--wp--preset--color--coal);
}

/* Awards Filters form */

.oeg-award-filter button {
    font-family: var(--wp--preset--font-family--montserrat);
    font-size: var(--wp--preset--font-size--medium);
 	background-color: var(--wp--preset--color--sunglow-yellow);
	background-image:none;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--coal);
	border-radius: 0.25rem;
	cursor: pointer;
    border: none;
}

/* .oeg-award-category-filter input[type="text"] {
    font-family: var(--wp--preset--font-family--montserrat);
    font-size: 1rem
	box-shadow: 0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);
	color: var(--color-gray-700);
	appearance: none;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
	border-radius: 0.25rem;
} */

.oeg-award-filter {
    display: flex;
    gap: var(--wp--preset--spacing--10);
    flex-flow: column;
    flex-wrap: wrap;
    max-width: 100%;
    width: auto;
    margin: 0;
    padding: 0;
}

@media (min-width: 700px) {
    .oeg-award-filter {
        flex-flow: row;
        align-items: center;
    }
}

.oeg-award-filter label {
    display: none;
}

/* Dropdowns */

.oeg-award-filter select {
    font-family: var(--wp--preset--font-family--montserrat);
    font-size: 1rem;
    max-width: 100%;
    padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
    border: none;
    background-color: var(--wp--preset--color--snow);
    border: 1px solid var(--wp--preset--color--silver);
    border-radius: 0.25rem;
}
@media (min-width: 700px) {
    .oeg-award-filter select {
        max-width: 20ch!important;
    }
}

.oeg-award-filter select:active,
.oeg-award-filter select:focus {
    outline: none;
    box-shadow: none;
}

.oeg-award-filter select:after {
    content: "";
    position: absolute;
    top: 50%;
    margin-top: -2px;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #aaa;
}
