/*
Theme Name: Orkel
Theme URI: 
Author: Exigo AS
Author URI: https://www.exigo.no
Description: 
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: orkel
Tags: 
*/

html {
    scroll-behavior: smooth;
}

.wp-block-read-more,
.wp-block-button.is-style-outline a,
.wp-block-button.is-style-outline button,
.alm-load-more-btn {
    border-radius: 8px;
    border: solid 3px var(--wp--preset--color--custom-orange);
    background-color: transparent;
    font-family: var(--wp--preset--font-family--geogrotesque);
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
    transition: all 0.2s ease-in-out;

    &:hover,
    &:focus {
        background-color: var(--wp--preset--color--custom-orange);
        color: white;
    }
}

.wp-block-button a:has(img) {
    background-color: transparent !important;

    img {
        transition: transform 0.3s ease-in-out;

        &:hover {
            transform: rotate(-180deg);
        }
    }
}

.page-template-default,
.post-template-default {
    .entry-content {
        figure.wp-block-image {
            text-align: center;

            img {
                border-radius: 8px;
            }

            figcaption {
                text-align: center;
            }
        }
    }
}

.taxonomy-post_tag {
    a {
        background-color: var(--wp--preset--color--custom-light-gray);
        border-radius: 3px;
        padding: 6px 12px;
        outline: 2px solid transparent;
        text-decoration: none;
        transition: all 0.2s ease-in-out;
        border: none !important;

        &:hover,
        &:focus {
            outline-color: var(--wp--preset--color--custom-orange);
        }
    }

    .wp-block-post-terms__separator {
        visibility: hidden;
    }
}

main {
    min-height: 600px;
}

footer.wp-block-template-part {
    margin-block-start: 0 !important;
}

main a:not(:has(img)):not(.wp-block-button__link):not(.has-text-color):not(.has-background):not(.has-inline-color):not(.wp-block-read-more) {
    display: inline;
    border-bottom: 1px solid var(--wp--preset--color--custom-orange);
    transition: all 0.2s ease-in-out;

    &:hover,
    &:focus {
        border-color: transparent;
    }
}

.wp-block-search {
    border: 2px solid var(--wp--preset--color--custom-orange);
    border-width: 0 0 2px;

    .wp-block-search__button {
        border: none;
    }

    .wp-block-search__input {
        background-color: transparent;
        color: white;
        outline: none;
        border: none;
    }
}


/* Details */

.wp-block-details {
    summary {
        cursor: pointer;
        list-style: none;

        &::marker {
            display: none;
        }

        &::-webkit-details-marker {
            display: none;
        }

        &:hover {
            color: var(--wp--preset--color--custom-orange);
        }
    }

    .details-chevron {
        display: inline-block;
        margin-right: 0.5rem;
        transition: transform 0.3s ease-in-out;
        transform-origin: 8px 7px;
        vertical-align: text-top;
        width: 16px;
        height: 14px;

        svg {
            width: 16px;
            height: 14px;
        }
    }
}


/* Table */

table {
    tr {
        border-bottom: 1px solid var(--wp--preset--color--custom-light-gray);

        td {
            padding: 0.5rem;
            border: none !important;
            font-size: var(--wp--preset--font-size--s);
        }
    }
}


/* Media & Text */

.wp-block-media-text {
    gap: 3vw;
}

.wp-block-media-text .wp-block-media-text__content {
    padding: 0;
}

.wp-block-media-text .wp-block-media-text__media img {
    border: 10px solid var(--wp--preset--color--custom-light-gray);
    border-radius: 50%;
    aspect-ratio: 1;
    max-width: calc(100% - 20px);
}


/* WPML */

div.wpml-language-switcher-block ul.wp-block-navigation__submenu-container {
    background-color: white !important;
    padding: 4px !important;
}


/* ALM */

.alm-listing {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: var(--wp--preset--spacing--50);
}

.alm-listing .wp-block-post-featured-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.alm-listing .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alm-listing .wp-block-post-featured-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.alm-listing .wp-block-post-date {
    margin-top: var(--wp--preset--spacing--30);
    margin-bottom: var(--wp--preset--spacing--30);
}

.alm-listing h3 {
    margin-top: var(--wp--preset--spacing--40);
    margin-bottom: var(--wp--preset--spacing--40);
}

.alm-listing .wp-block-post-terms {
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    text-transform: uppercase;
}

.alm-btn-wrap {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.alm-btn-wrap button {
    color: var(--wp--preset--color--custom-darkest-gray);
}

.alm-btn-wrap button.done {
    visibility: hidden;
}


/* Custom */

.newest-posts ul {
    grid-template-columns: minmax(40%, 1fr) 40%;
}

#gform_fields_4 {
    display: block;
    columns: 330px 2;
    column-gap: var(--wp--preset--spacing--70) !important;
}

#gform_fields_4 .gfield {
    margin: 1rem 0;
}

#gform_fields_4 .gfield--type-textarea,
#gform_fields_4 .gfield--type-fileupload {
    margin-bottom: 3rem;
}

#gform_fields_4 .gfield--type-html {
    padding: 1rem 0;
    margin: 0;
}