/*
Theme Name: GWM
Theme URI: https://wordpress.org/themes/twentytwentyfive/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Custom theme based on Twent Twenty-Five.
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.2
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gwm
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
*/

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

/* Focus styles */
:where(.wp-site-blocks *:focus) {
    outline-width: 2px;
    outline-style: solid;
}

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

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

.wp-block-button__link svg {
    fill: red !important;
    color: red !important;
}

/* Button hover opacity moved to theme.json (styles.blocks.core/button.css). */

/* Cannot work out how to do this in theme.json */
/* .entry-content p strong {font-weight: 600;} */

header svg {
    width: 32px !important;
    height: 32px !important;
}

header.is-inverted-header .custom-logo {
    filter: invert(100%);
}

header.is-inverted-header .wp-block-navigation__responsive-container-open svg {
    fill: white !important;
}

@media (min-width: 600px) {
 
    header.is-inverted-header .wp-block-navigation-item__content {
        color: white !important;    
    }

}

@media (max-width: 600px) {
 
    header.is-inverted-header .wp-block-navigation-item__content {
        font-size: var(--wp--preset--font-size--medium);
    }

}

@media (max-width:768px) {
    .wp-block-cover__image-background[style*="--mobileImageURL"] {
        background-image: var(--mobileImageURL) !important;
    }

    .model-colour-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-two {
        order: 2;
    }
}


/* START: Build Your Own GWM Car - Select Model */
.gwm-build-your-own,
.gwm-build-your-own * {
    box-sizing: border-box;
    font-family: "Helvetica Now", "Helvetica Now Display", monospace !important;
    font-family: var(--wp--preset--font-family--helvetica-now) !important
}

.gwm-build-your-own {
    font-family: "Helvetica Now", "Helvetica Now Display", monospace !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, .5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    padding: 1rem;
    z-index: 1000
}

.gwm-build-your-own.visible {
    opacity: 1;
    pointer-events: initial;
    visibility: visible;
    transition: opacity .2s, visibility .2s
}

.gwm-content-card {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    width: 100%;
    background-color: #fff;
    max-height: 100%;
    overflow-y: auto
}

.gwm-modal__header {
    display: flex;
    width: 100%;
    padding: .75rem 1.5rem;
    font-size: 1.25rem;
    color: #fff;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
    justify-content: space-between;
    background-color: #000
}

.gwm-modal__header .gwm-modal__title {
    color: #fff;
    font-size: 1.25rem;
    line-height: 1
}

.gwm-modal__content {
    width: 100%;
    padding: 1.5rem
}

.gwm-modal__content .gwm-model__list {
    display: flex;
    flex-direction: column;
    width: calc(100% + 1rem);
    height: auto;
    padding: 0;
    margin: 0;
    margin-right: -1rem
}

@media (min-width:577px) {
    .gwm-modal__content .gwm-model__list {
        flex-direction: row
    }
}

.gwm-modal__content .gwm-model__list .gwm-model__card {
    display: flex;
    text-decoration: none;
    color: #000;
    justify-content: space-between;
    background-color: #fff;
    flex-direction: column;
    padding-top: 40px;
    border: 1px solid transparent;
    align-items: center;
    position: relative;
    margin-right: 1rem;
    padding-bottom: 1rem;
    justify-content: center
}

.gwm-modal__content .gwm-model__list .gwm-model__card:hover {
    border-color: #000;
    background-color: #f8f8fa
}

.gwm-modal__content .gwm-model__list .gwm-model__card svg {
    display: block;
    fill: red;
    width: 1em;
    height: 1em;
    opacity: 0;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    transform: translate(-120%, 0);
    transition: transform .2s, opacity .2s
}

.gwm-modal__content .gwm-model__list .gwm-model__card:hover svg {
    opacity: 100;
    transform: translate(0%, 0)
}

.gwm-modal__content .gwm-model__list .gwm-model__card img {
    width: 100%
}

.gwm-modal__content .gwm-model__list .gwm-model__card .gwm-model__card__title {
    font-size: 1.5rem;
    width: 100%;
    line-height: 1.25;
    text-align: left;
    padding: 0 1rem;
    margin-top: 0;
    margin-bottom: -1.5rem;
    z-index: 2
}

@media (min-width:577px) {
    .gwm-modal__content .gwm-model__list .gwm-model__card .gwm-model__card__title {
        font-size: 2rem;
        margin-bottom: -2rem
    }
}

@media (min-width:768px) {
    .gwm-modal__content .gwm-model__list .gwm-model__card .gwm-model__card__title {
        font-size: 2.5rem
    }
}

.gwm-modal-btn {
    background-color: transparent;
    border: none;
    padding: .5rem;
    cursor: pointer
}

.gwm-modal-btn__close svg {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1;
    fill: #fff;
    transition: all .2s
}

.gwm-modal-btn__close {
    margin-right: -.5rem;
    line-height: 1;
    transition: background-color .2s
}

.gwm-modal-btn__close:hover {
    background-color: rgba(255, 255, 255, 1)
}

.gwm-modal-btn__close:hover svg {
    fill: red
}

/* END: Build Your Own GWM Car - Select Model */

/* START: Configurator Confirmation */
.configurator-wrapper .wp-block-columns.is-layout-flex.wp-container-core-columns-is-layout-1.wp-block-columns-is-layout-flex {
    flex-direction: column-reverse;
}

@media (min-width: 782px) {
    .configurator-wrapper .wp-block-columns.is-layout-flex.wp-container-core-columns-is-layout-1.wp-block-columns-is-layout-flex {
        flex-direction: row;
    }
}

.configuration-model-card {
    display: block;
    width: 100%;
    max-width: 800px;
    margin-right: auto;
    margin-left: auto;
    background-color: #fff;
    margin-top: 2rem;
}

@media (min-width: 801px) {
    .configuration-model-card {
        margin-top: 0;
    }
}

.configuration-model-card img {
    width: 100%;
    height: auto;
}

.configuration-model-card .configuration-model-card__content {
    background-color: #fff;
    padding: var(--wp--preset--spacing--40, 30px);
}

.configuration-model-card .configuration-model-name {
    font-size: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 1.739), 3rem);
    font-size: var(--wp--preset--font-size--x-large, clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 1.739), 3rem));
    margin-bottom: 1rem;
    font-weight: 700;
    margin: 0;
}

.configuration-model-card .configuration-model-price {
    font-size: clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.348), 1.375rem);
    font-size: var(--wp--preset--font-size--large, clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.348), 1.375rem));
    margin-top: 1rem;
    font-weight: 500;
}

.configuration-model-card .configuration-model-row {
    gap: 0rem 2rem;
}

.configuration-model-card .configuration-model-row,
.configuration-model-card .configuration-model-col {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.configuration-model-card .configuration-model-col {
    margin-top: 1rem;
}

.configuration-model-card .configuration-model-row span {
    font-size: 1rem;
    font-weight: 400;
    margin-right: 1rem;
}

.configuration-model-card .configuration-model-row strong {
    font-size: 1rem;
    font-weight: 700;
}

/* END: Configurator Confirmation */

/* START: Mega Menu */
.gwm-mega-menu__open,
.gwm-mega-menu__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    line-height: 0;
}

.gwm-mega-menu__open svg,
.gwm-mega-menu__close svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.gwm-mega-menu {
    position: fixed;
    inset: 0;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    transition: opacity 0.2s, visibility 0.2s;
}

.gwm-mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.gwm-mega-menu-open {
    overflow: hidden;
}

header.is-inverted-header .gwm-mega-menu__open svg,
header.is-inverted-header .gwm-mega-menu__close svg {
    fill: #fff;
}

.gwm-mega-menu .wp-block-navigation .wp-block-navigation-item__content {
    font-size: var(--wp--preset--font-size--large);
}
/* END: Mega Menu */