/*
Theme Name: Mountain Safari
Description: Custom theme built upon Hello TwentyTwentyThree theme
Author: Matus Mirossay
Author URI: https://esoul.systems
Template: twentytwentythree
Version: 1.0.0
*/

:root :where(.wp-element-button:visited, .wp-block-button__link:visited) {
    color: var(--wp--preset--color--base);
}

.wp-site-blocks {
    padding-top: var(--wp--preset--spacing--60);
    padding-bottom: 0;
}

header{
    /* var(--wp--preset--shadow--natural)
    @see https://developer.wordpress.org/themes/global-settings-and-styles/settings/shadow/ on how to change this */

    background: rgba(255,255,255,0.2);
    position:   fixed;
    top:        0;
    left:       0;
    right:      0;
    box-shadow: 0px 3px 9px rgba(0, 0, 0, 0.05);
    z-index:    1;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter:         blur(15px);
}

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

.mtsafari-scf {

    @media (min-width: 1024px) {
        display: flex;
        align-items: center;
    }

    .mtsafari-scf__title {
        font-size:      var(--wp--preset--font-size--medium);
        font-weight:    700;
        text-transform: uppercase;
        margin-top:     0.5em;
        margin-bottom:  10px;
        margin-right:   10px;

        flex:           1;
    }

    .mtsafari-scf__content {
        flex: 1 1 50%;

        margin-bottom: var(--wp--preset--spacing--30);

        @media (min-width: 1024px) {
            margin-bottom: 0px;
        }
    }
}

.mtsafari-rating {
    display: flex;

    .mtsafari-rating__star{
        height: 30px;
        width: 30px;
        display: block;
    }
}

.single-trips{
    .mtsafari-trip-intro{
        @media (min-width: 1024px) {
            display:            flex;
            flex-direction:     row-reverse;
            align-items:        center;
            margin-bottom:      var(--wp--preset--spacing--50);

            .mtsafari-trip-intro__content{
                flex: 1 1 0;
            }
            .mtsafari-trip-intro__image{
                flex: 1 1 0;
                clip-path: polygon(5% 0%, 0% 100%, 100% 100%, 100% 0%);
            }
        }
    }
    main{
        margin-top: 0;
    }
    .wp-block-post-title{
        text-transform: uppercase;
    }
    .wp-block-post-subtitle{
        margin-top:     0;
        margin-bottom:  0;
        text-transform: uppercase;
        font-size:      var(--wp--preset--font-size--large);
    }
    .wp-block-post-featured-image{
        @media (min-width: 1024px) {
            margin-bottom: 0;
        }
    }
}

.wp-block-details{
    border-top:     2px solid var(--wp--preset--color--contrast);
    padding:        15px 0;
    margin-top:     0;

    &:first-of-type{
        margin-top: 1.5rem;
    }
    &:last-of-type{
        border-bottom:  2px solid var(--wp--preset--color--contrast);
    }

    summary{
        font-size: var(--wp--preset--font-size--large);
        font-weight: bold;
        text-transform: uppercase;
    }
}

.wp-block-query{

    .trips {
        box-shadow:     0px 3px 9px rgba(0, 0, 0, 0.1);
        display:        grid;
        align-content:  space-between;
        overflow:       hidden;

        .wp-block-post-title{
            text-transform: uppercase;
            margin-bottom:  var(--wp--preset--spacing--20);
            padding:        0 15px;
        }
        .wp-block-post-content,
        .wp-block-post-excerpt,
        .wp-block-post-date {
            padding: 0 15px;
        }
        figure {
            transition: all 0.2s ease;
        }
        &:hover figure{
            transform: scale(1.1);
        }
    }

    .mtsafari-trip-loop__subtitle {
        text-transform: uppercase;
        margin-top:     0;
        margin-bottom:  var(--wp--preset--spacing--20);
        min-height:     60px;
    }

    .mtsafari-trip-loop__intro{
        margin-top:     0;
        margin-bottom:  var(--wp--preset--spacing--20);
        font-size:      0.9em;
    }

    .mtsafari-scf {
        display:        flex;
        align-items:    center;
        margin-top:     0;

        .mtsafari-scf__title {
            margin-top:     4px;
            margin-bottom:  4px;
        }

        .mtsafari-scf__content {
            margin-bottom:  0;
            flex:           1 1 30%;
        }
    }

    .wp-element-button{
        margin: 15px;
    }
}

.mtsafari-filter {
    display:        flex;
    flex-wrap:      wrap;
    align-items:    center;
    gap:            var(--wp--preset--spacing--30);
    margin-bottom:  var(--wp--preset--spacing--40);

    .mtsafari-filter__group {
        display:        flex;
        align-items:    center;
        gap:            var(--wp--preset--spacing--30);
    }

    .mtsafari-filter__label {
        font-weight:    700;
        text-transform: uppercase;
    }

    .mtsafari-filter__slider {
        position:   relative;
        width:      200px;
        height:     18px;
    }

    .mtsafari-filter__rail,
    .mtsafari-filter__track {
        position:   absolute;
        top:        50%;
        height:     0;
        border-top: 2px solid var(--wp--preset--color--contrast);
        transform:  translateY(-50%);
    }

    .mtsafari-filter__rail {
        left:       0;
        right:      0;
        opacity:    0.25;
    }

    .mtsafari-filter__track {
        left:       0;
        right:      0;
        border-top-width: 4px;
    }

    .mtsafari-filter__from,
    .mtsafari-filter__to {
        position:       absolute;
        inset:          0;
        width:          100%;
        height:         18px;
        margin:         0;
        background:     transparent;
        pointer-events: none;
        appearance:     none;
        -webkit-appearance: none;

        &::-webkit-slider-runnable-track {
            background: transparent;
        }
        &::-moz-range-track {
            background: transparent;
        }
        &::-webkit-slider-thumb {
            -webkit-appearance: none;
            width:          18px;
            height:         18px;
            border:         2px solid var(--wp--preset--color--contrast);
            border-radius:  50%;
            background:     var(--wp--preset--color--base);
            pointer-events: all;
            cursor:         pointer;
        }
        &::-moz-range-thumb {
            width:          14px;
            height:         14px;
            border:         2px solid var(--wp--preset--color--contrast);
            border-radius:  50%;
            background:     var(--wp--preset--color--base);
            pointer-events: all;
            cursor:         pointer;
        }
    }

    .mtsafari-filter__value {
        min-width:  3.5em;
        font-weight: 700;
    }

    .mtsafari-filter__reset {
        font-size:  var(--wp--preset--font-size--small);
    }
}

div.wpforms-container-full .wp-element-button {
    font-size:      var(--wp--preset--font-size--medium) !important;
    border-width:   0 !important;
    border-radius:  0 !important;
    padding:        calc(0.667em + 2px) calc(1.333em + 2px) !important;
    height:         auto !important;
}

.search-results {
    .wp-block-query{
        .wp-block-post {
            align-content:  start;
        }
    }
}

footer{
    padding-bottom: 0
}