/* 
Theme Name: CodePix Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Een website door CodePix
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-codepix
Version: 1.0.2
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Hide recaptcha */
.grecaptcha-badge {
    visibility: hidden;
}

form .elementor-field-type-recaptcha_v3 {
    height: 0;
    margin-bottom: 0 !important;
}

.elementor-form .elementor-form-fields-wrapper small {
    line-height: 1.3em;
    display: block;
    text-wrap: balance;
}

.elementor-form .elementor-form-fields-wrapper small a {
    color: inherit;
    text-decoration: underline;
}

/* Elementor form messages */
.elementor-form .elementor-message {
    background-color: #f8f8f8;
    border-radius: 0px;
    padding: 15px;
    line-height: 1.5;
    border: 1px solid #bdbdbd;
    color: #000;
}

.elementor-form .elementor-message.elementor-message-success {
    border-bottom: 3px solid var(--e-global-color-primary);
}

/* Hide hidden form fields */
.elementor-form .elementor-field-type-hidden {
    margin-bottom: 0 !important;
    height: 0 !important;
}

/* CPX form checkboxes and radio buttons */
.cpx-form .elementor-field-type-checkbox .elementor-field-option,
.cpx-form .elementor-field-type-acceptance .elementor-field-option,
.cpx-form .elementor-field-type-radio .elementor-field-option {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.cpx-form .elementor-field-type-checkbox .elementor-field-option label,
.cpx-form .elementor-field-type-acceptance .elementor-field-option label,
.cpx-form .elementor-field-type-radio .elementor-field-option label {
    padding-left: 1.75em;
    position: relative;
    font-weight: 400;
    font-size: var(--e-global-typography-text-font-size);
    line-height: 1.2;
}

.cpx-form .elementor-field-type-checkbox .elementor-field-option label:hover,
.cpx-form .elementor-field-type-acceptance .elementor-field-option label:hover,
.cpx-form .elementor-field-type-radio .elementor-field-option label:hover {
    cursor: pointer;
}

.cpx-form .elementor-field-type-checkbox .elementor-field-option input[type="checkbox"],
.cpx-form .elementor-field-type-acceptance .elementor-field-option input[type="checkbox"],
.cpx-form .elementor-field-type-radio .elementor-field-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.cpx-form .elementor-field-type-checkbox .elementor-field-option label:before,
.cpx-form .elementor-field-type-acceptance .elementor-field-option label:before,
.cpx-form .elementor-field-type-radio .elementor-field-option label:before {
    content: '';
    position: absolute;
    top: 0px;
    left: 0;
    width: 21px;
    height: 21px;
    border-radius: 5px;
    background-color: #fff;
    border: 1px solid #b6b6b6;
    transition: background-color .2s ease-in-out;
    line-height: 0;
}

/* Make the radio buttons round */
.cpx-form .elementor-field-type-radio .elementor-field-option label:before {
    border-radius: 100%;
}

.cpx-form .elementor-field-type-checkbox .elementor-field-option label:after,
.cpx-form .elementor-field-type-acceptance .elementor-field-option label:after,
.cpx-form .elementor-field-type-radio .elementor-field-option label:after {
    content: '';
    color: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    background-color: var(--e-global-color-primary);
    transition: opacity .2s ease-in-out, transform .2s ease-in-out;
    line-height: 0;

    opacity: 0;
    transform: scale(0);
}

/* Make the radio buttons round */
.cpx-form .elementor-field-type-radio .elementor-field-option label:after {
    border-radius: 100%;
}

.cpx-form .elementor-field-type-checkbox .elementor-field-option:hover label:after,
.cpx-form .elementor-field-type-acceptance .elementor-field-option:hover label:after,
.cpx-form .elementor-field-type-radio .elementor-field-option:hover label:after {
    opacity: 1;
    transform: scale(0.6);
}

.cpx-form .elementor-field-type-checkbox .elementor-field-option input[type="checkbox"]:checked+label:after,
.cpx-form .elementor-field-type-acceptance .elementor-field-option input[type="checkbox"]:checked+label:after,
.cpx-form .elementor-field-type-radio .elementor-field-option input[type="radio"]:checked+label:after {
    opacity: 1;
    transform: none;
}

.cpx-form .elementor-field-type-radio .elementor-field-subgroup,
.cpx-form .elementor-field-type-checkbox .elementor-field-subgroup,
.cpx-form .elementor-field-type-acceptance .elementor-field-subgroup {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cpx-form .elementor-field-type-checkbox .elementor-field-label,
.cpx-form .elementor-field-type-acceptance .elementor-field-label,
.cpx-form .elementor-field-type-radio .elementor-field-label {
    margin-bottom: .5rem;
}

.cpx-form .elementor-field-type-checkbox,
.cpx-form .elementor-field-type-acceptance,
.cpx-form .elementor-field-type-radio {
    margin-bottom: 30px !important;
}

/* End CPX form checkboxes */

/* Fix icons not having auto width defined on ipad */
.elementor-widget-icon svg {
    width: auto !important;
}

/* Elementor animation overwrites */
@keyframes cpx_fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.fadeInDown {
    animation-name: cpx_fadeInDown !important;
}

@keyframes cpx_fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }

    to {
        opacity: 1;
        transform: none
    }
}

.fadeInLeft {
    animation-name: cpx_fadeInLeft !important;
}

@keyframes cpx_fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }

    to {
        opacity: 1;
        transform: none
    }
}

.fadeInRight {
    animation-name: cpx_fadeInRight !important
}

@keyframes cpx_fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.fadeInUp {
    animation-name: cpx_fadeInUp !important;
}

/* Balance out all headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* Fix elementor default line height for icons. Icons should not affect button height */
.elementor-widget-button .elementor-button-icon {
    line-height: 0;
    /* Flexbox to keep the icon in the middle if it's not big enough to fill height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Backgrounds */
.cpx-background {
    height: 100%;
}

.cpx-background img {
    object-fit: cover;
    object-position: center;
}

/* ::selection {
    background: rgba(251, 80, 0, 0.3);
    color: #FFFFFF;
}
  
::-moz-selection {
    background: rgba(251, 80, 0, 0.3);
    color: #FFFFFF;
} */

/* Prevent focussing woo messages with ugly outline */
.woocommerce-message:focus {
    outline: none;
    box-shadow: none;
}

/* Turn elementor grids into centered flex layout using the gap variables from the grid */
.cpx-grid-to-flex .elementor-grid {
    display: flex;
    flex-wrap: wrap;
    row-gap: var(--grid-row-gap, 30px);
    column-gap: var(--grid-column-gap, 30px);
    justify-content: center;
}

/* Based on the variable --grid-columns (this is an int, say: 5) i need the items (.e-loop-item) to have the correct sizes. calculate the gaps so it doesnt overflow */
.cpx-grid-to-flex .elementor-grid .e-loop-item {
    flex: 0 1 calc(calc(100% / var(--grid-columns, 5)) - var(--grid-column-gap, 30px));
}

/* Fix all icons */
.elementor-widget-container .elementor-icon-wrapper {
    line-height: 0;
}

body {
    --cpx-header-height: 110px;
}

body.admin-bar {
    --cpx-header-height: 110px;
}

/* Responsive header height */
@media (max-width: 1024px) {
    body {
        --cpx-header-height: 80px;
    }
    
    body.admin-bar {
        --cpx-header-height: 90px;
    }
}

body.admin-bar .cpx-header__main {
    top: 32px !important;
}

/* Fix text editor paragraph spacing */
.elementor-widget-text-editor p:not(:last-child) {
    margin-bottom: 1em;
}

/* Header scroll animation */
header[data-elementor-type="header"] .cpx-header__main,
header[data-elementor-type="header"] .cpx-header__main .elementor-widget-theme-site-logo img {
    transition: all 0.3s ease-in-out;
}

header[data-elementor-type="header"].scrolled-past .cpx-header__main {
    background-color: var(--e-global-color-secondary);
}

header[data-elementor-type="header"].scrolled-past .cpx-header__main .elementor-widget-theme-site-logo img {
    height: 60px;
}


/* Hide count from product categories widget */
.woocommerce-loop-category__title .count {
    display: none;
}

.woocommerce ul.products li.product a img {
    margin-bottom: 5px;
}

/* Add a hover animation to the categories widget */
.elementor-widget-wc-categories .product-category a {
    position: relative;
    display: block;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: all 0.3s ease-in-out;
    }

    &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        aspect-ratio: 1/1;
        background-image: var(--cpx-arrow-right-white);
        background-size: 20px;
        background-repeat: no-repeat;
        background-position: center;
        transform: translateX(-10px) scale(0.8);
        opacity: 0;
        transition: all 0.3s ease-in-out;
    }

    /* Transition the img inside */
    .woocommerce-loop-category__title {
        transition: all 0.3s ease-in-out;
    }

    &:hover {
        &::before {
            opacity: 1;
        }

        &::after {
            opacity: 1;
            transform: translateX(5px) scale(1);
        }

        .woocommerce-loop-category__title {
            transform: translateY(-3px);
        }
    }
}

/* Remove the underline from ins element */
.elementor-widget-woocommerce-product-price ins {
    text-decoration: none !important;
}

/* CPX add to cart */
.cpx-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: .5rem;

    .cpx-qty-button, .cpx-qty-input {
        padding: 10px 0px !important;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
input.cpx-qty-input {
    text-align: center;
    border-color: var(--e-global-color-accent) !important;
    /* Remove default Chrome spinners */
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
}
button.cpx-qty-button {
    cursor: pointer;
    border: 1px solid #ccc;
    background: var(--e-global-color-secondary);
    line-height: 1;
    font-size: 18px;
    padding: 0;
    text-align: center;
    width: 40px;
    flex-shrink: 0;

    &:focus {
        outline: none;
    }
    &:focus-visible {
        outline: none;
    }
}

button.cpx-add-to-cart-button, a.cpx-add-to-cart-info-button {
    width: 100%;
    text-align: center;
    background-color: var(--e-global-color-primary);
    font-family: var(--e-global-typography-9cc13e6-font-family), Sans-serif;
    font-size: var(--e-global-typography-9cc13e6-font-size);
    line-height: var(--e-global-typography-9cc13e6-line-height);
    color: var(--e-global-color-text);
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: var(--e-global-color-primary);
    border-radius: 0px 0px 0px 0px;
    padding: 5px 15px;
    height: 40px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 9px;

    img, svg {
        height: 18px;
        width: auto;
        fill: var(--e-global-color-text);

        margin-bottom: -2px;
    }

    &:hover {
        background-color: var(--e-global-color-accent);
        color: var(--e-global-color-primary);
        
        svg {
            fill: var(--e-global-color-primary);
        }
    }

    &:focus {
        outline: none;
    }
    &:focus-visible {
        outline: none;
    }
} 

@media screen and (max-width: 520px) {
    button.cpx-add-to-cart-button, a.cpx-add-to-cart-info-button {
        font-size: 14px;   
    }
}

.cpx-add-to-cart-sold-out, .variations_form p.stock.out-of-stock {
    text-align: center;
    display: block;
    margin-bottom: .5rem;
    font-size: 14px;
    font-weight: bold;
    color: var(--e-global-color-text);
    font-weight: 400 !important;

    &::before {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        background-color: rgb(153, 19, 19);
        border-radius: 50%;
        margin-right: 8px;
    }
}

.elementor-widget-wp-widget-cpx_add_to_cart_widget a {
    color: var(--e-global-color-text);
    text-align: center;
}

/* Some adjustments for the single product page */
.cpx-add-to-cart--big {
    .cpx-add-to-cart-form {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;

        width: 500px;
        max-width: 100%;
    }

    .cpx-quantity-wrapper {
        margin-bottom: 0;
    }
}

.cpx-add-to-cart-form .added_to_cart {
    display: none !important;
}

/* basic look */
.cpx-toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	transform: translateX(-50%) translateY(100%);
	min-width: 120px;
	max-width: 90vw;
	padding: .75rem 1.25rem;
	border-radius: 0px;
	font-size: 1rem;
	color: #fff;
	background: #323232;
	box-shadow: 0 4px 16px rgba(0,0,0,.2);
	opacity: 0;
	transition: transform .3s ease, opacity .3s ease;
	z-index: 9999;
    font-weight: bold;
}

/* colour variants */
.cpx-toast--success { background: #008a6e; }
.cpx-toast--error   { background: #e74c3c; }

/* “is-visible” = slide up + fade in */
.cpx-toast.is-visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

/* spinner keyframes stay the same */
@keyframes cpx-spin { to { transform: rotate(360deg); } }

/* state applied while the request is running */
.cpx-btn--loading {
	position: relative;
	pointer-events: none;
}

/* hide only the label, not the button’s colour */
.cpx-btn--loading .cpx-btn__text { visibility: hidden; }

/* the spinner */
.cpx-btn--loading::after {
	content: '';
	position: absolute;
	top: 50%; left: 50%;
	width: 18px; height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: cpx-spin .7s linear infinite;
}

/* cpx mt auto */
.cpx-mt-auto {
    margin-top: auto;
}

/* === Category bar ================================================= */
.cpx-cat-bar {
	display: flex;
	flex-wrap: nowrap;          /* keep cards on one line            */
	gap: 0.65rem;
	overflow-x: auto;           /* horizontal scroll when needed     */
	scrollbar-width: thin;      /* Firefox                           */
	-webkit-overflow-scrolling: touch; /* smooth iOS momentum scroll */
}

.cpx-cat-card {
	display: flex;
	align-items: center;
	background: #fff;
	border: 2px solid #eee;
    border-radius: 30px;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
	transition: all .2s ease;
    flex-shrink: 0;

    &:hover {
        background-color: var(--e-global-color-primary);
        color: var(--e-global-color-text);
        border-color: var(--e-global-color-primary);
    }
}

.cpx-cat-card img {
	width: 40px;
	height: 40px;
	object-fit: cover;
    border-radius: 30px;
}

.cpx-cat-card span {
	padding: 0 .75rem;
	font-size: .875rem;
	font-weight: 500;
	white-space: nowrap;        /* name never wraps                  */
}

.cpx-cat-card:hover {
	box-shadow: 0 3px 8px rgba(0,0,0,.08);
}

.cpx-cat-card:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Reset woocommerce breadcrumb default margin */
.woocommerce-breadcrumb {
    margin-bottom: 0 !important;
}

/* Product page sale flash */
.woocommerce span.onsale {
    background-color: var(--e-global-color-primary);
    color: var(--e-global-color-text);
    padding: 8px 10px !important;
    border-radius: 0;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    min-height: 0;
    min-width: 0;
}

/* Adjust the elementor cart */
.elementor-widget-woocommerce-menu-cart {
    .elementor-menu-cart__footer-buttons .elementor-button--view-cart {
        display: none !important; 
    }

    .elementor-menu-cart__product {
        grid-template-columns: 50px auto;
    }

    .elementor-menu-cart__product-name {
        line-height: 1.7;
    }
}

/* Adjust the woocommerce block checkout page */
body.woocommerce-checkout {
    .elementor-widget-woocommerce-checkout-page .woocommerce-checkout .form-row>span {
        font-family: var(--e-global-typography-text-font-family), Sans-serif;
        font-size: var(--e-global-typography-text-font-size);
        font-weight: var(--e-global-typography-text-font-weight);
        line-height: var(--e-global-typography-text-line-height);
        color: var(--e-global-color-text);
    }

    .woocommerce form .form-row .required {
        display: none;
    }

    .woocommerce-shipping-fields {
        margin: var(--sections-margin, 0);
    }

    .elementor-widget-woocommerce-checkout-page .woocommerce-shipping-fields .shipping_address {
        background-color: rgba(255, 255, 255, .1);
        padding: 20px;
    }

    .e-woocommerce-coupon-nudge.e-checkout-secondary-title {
        background-color: rgba(255, 255, 255, .1);
        padding: 20px;
        font-size: 18px !important;

        a {
            text-decoration: underline;
            
            &:hover {
                color: var(--e-global-color-primary);
            }
        }
    }

    #add_payment_method #payment div.payment_box, .woocommerce-cart #payment div.payment_box, .woocommerce-checkout #payment div.payment_box {
        background-color: rgba(255, 255, 255, .1) !important;
        margin-top: 0;
    }

    .elementor-widget-woocommerce-checkout-page .woocommerce-checkout #payment .payment_methods li {
        background-color: rgba(255, 255, 255, .1);
        padding: 0px 20px;
        transition: all .2s ease;

        label {
            padding-top: 15px;
            padding-bottom: 15px;
            width: calc(100% - 45px);
            display: inline-block;
            text-align: left;
        }

        &:hover {
            background-color: rgba(255, 255, 255, .2);
        }
    }

    .woocommerce-privacy-policy-text {
        margin-bottom: 1em;
        font-size: 15px;
    }

    #shipping_method li label {
        font-size: inherit !important;
        font-weight: bold !important;
        text-wrap: balance !important;
    }

    .woocommerce-checkout-review-order-table tr > td:last-child,
    .woocommerce-checkout-review-order-table tr > th:last-child {
        width: 40%;
        text-align: right;
    }
}

/* Redo the default add to cart for variable products */
.variations_form.cart {
    td, th {
        text-align: left;
        color: var(--e-global-color-text);
        padding: 0;
        background-color: transparent;
    }

    th {
        padding-right: 10px;
    }

    select {
        border-radius: 0px;
        border: 1px solid #fff;
        color: var(--e-global-color-text);
        font-family: var(--e-global-typography-text-font-family), Sans-serif;
        font-size: var(--e-global-typography-text-font-size);
        font-weight: var(--e-global-typography-text-font-weight);
        line-height: var(--e-global-typography-text-line-height);

        option {
            color: var(--e-global-color-secondary);
        }

        &:focus {
            outline: none;
        }
        &:focus-visible {
            outline: none;
        }
    }

    a.reset_variations {
        color: var(--e-global-color-text);
        background: var(--e-global-color-primary);
        border-radius: 0px;
        border: 1px solid var(--e-global-color-primary);
        padding: 9px 10px;
        font-size: 14px !important;
        font-weight: bold;
        text-decoration: none;
        margin-top: 10px;
        display: inline-block;
        line-height: 1;
    }

    span.price {
        color: var(--e-global-color-text) !important;
        margin-bottom: 10px;
        display: block;
    }

    span.price ins {
        color: var(--e-global-color-text) !important;
    }

    .input-text.qty {
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }
}

body.logged-in .hide-logged-in {
    display: none !important;
}

body:not(.logged-in) .hide-logged-out {
    display: none !important;
}

/* Conditional display of the default add to cart */
.elementor-widget-woocommerce-product-add-to-cart {
    display: none !important;
}

body.product-type-variable .elementor-widget-woocommerce-product-add-to-cart {
    display: block !important;
}

/* B2B approval notice */
.cpx-b2b-approval-notice {
    background-color: var(--e-global-color-secondary);
    padding: 9px 20px;
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    background-image: var(--cpx-batik-pattern);
    background-size: 430px;
    background-repeat: repeat;
    background-position: center;
    position: relative;
    font-size: 16px;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;

    * {
        z-index: 2;
        position: relative;
    }

    &:after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--e-global-color-primary);
        z-index: 1;
        opacity: .9;
    }
}

/* Cookie bar adjustments */
.cpx2_cookie-balk.cpx2_cookie-balk--v3 {
    label {
        color: var(--cpx2-cookie-balk-tekst) !important;
        font-family: var(--e-global-typography-text-font-family), Sans-serif !important;
    }

    .cpx2_cookie-balk__acties {
        button.cpx2_cookie-balk__v3__alles-afwijzen, button.cpx2_cookie-balk__v3__selectie-toestaan, button.cpx2_cookie-balk__v3__alles-toestaan {
            border-radius: 0 !important;
        }
    }
}

.cpx-b2b-approved {
    a {
        color: inherit;
        text-decoration: underline;
    }
}