/*
 Theme Name:   Zaunkonfigurator
 Description:  Schritt für Schritt Zaunkonfigurator
 Author:       Felix Neunkirchner, Markus Tauscher
 Template:     kadence
 Version:      1.0.0
*/

a {
    color: var(--global-palette4);
    text-decoration: none;
}

a.button i {
    margin-left: 10px;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
    color: transparent;
}

ol,
ul {
    list-style: none !important;
    list-style-type: none !important;
}

.hide {
    display: none !important;
}

:focus {
    outline: 0
}

.infoline {
    font-weight: 600;
    margin-top: 15px;
}

.infoline>i {
    align-items: center;
    background: var(--global-palette6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    height: 30px;
    justify-content: center;
    margin-right: 10px;
    width: 30px;
}

.errorline {
    color: var(--wp--preset--color--vivid-red);
    font-weight: 600;
    margin-top: 10px;
}

.error-message {
    color: var(--wp--preset--color--vivid-red);
    display: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 5px;
}

/* Main-Container */
.configurator {
    margin: 50px auto;
    max-width: var(--global-content-width);
    padding: 0 var(--global-content-edge-padding);
    position: relative;
}

/* Navbar */
.navbar-wrapper {
    background-color: var(--global-palette4);
    text-align: center;
    z-index: 10;
}

.navbar-wrapper .steps-wrapper {
    margin: 0 auto;
    max-width: var(--global-content-width);
    position: relative;
}

.navbar-wrapper .steps-wrapper .steps {
    display: flex;
    counter-reset: step;
}

.navbar-wrapper .steps-wrapper .steps .step {
    counter-increment: step;
    flex-basis: 100%;
    position: relative;
}

.navbar-wrapper .steps-wrapper .steps .step a {
    color: var(--global-palette9);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px 0;
    pointer-events: none;
}

.navbar-wrapper .steps-wrapper .steps .step a .step-count {
    flex-basis: 100%;
    position: relative;
}

.navbar-wrapper .steps-wrapper .steps .step a .step-count span {
    align-items: center;
    background: var(--global-palette6);
    border-radius: 50%;
    border: 2px solid var(--global-palette6);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.navbar-wrapper .steps-wrapper .steps .step a .step-count span::before {
    content: counter(step);
}

.navbar-wrapper .steps-wrapper .steps .step a .step-count i {
    color: var(--global-palette1);
    display: none;
}

/* Lines Between Steps  */
.navbar-wrapper .steps-wrapper .steps .step a .step-count::before {
    background: var(--global-palette6);
    content: "";
    height: 2px;
    left: calc(50% + 18px);
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    width: calc(100% - 36px);
}

.navbar-wrapper .steps-wrapper .steps .step:last-child a .step-count::before {
    display: none;
}

/* Style Step Current */
.navbar-wrapper .steps-wrapper .steps .step.step-current a .step-count span {
    background: transparent;
    border: 2px solid var(--global-palette1);
    color: var(--global-palette1);
}

.navbar-wrapper .steps-wrapper .steps .step.step-current a .step-label {
    color: var(--global-palette1);
    flex-basis: 100%;
}

/* Style Step Finished */
.navbar-wrapper .steps-wrapper .steps .step.step-finished a {
    pointer-events: all;
}

.navbar-wrapper .steps-wrapper .steps .step.step-finished a .step-count::before {
    background: var(--global-palette1);
}

.navbar-wrapper .steps-wrapper .steps .step.step-finished a .step-count i {
    display: block;
}

.navbar-wrapper .steps-wrapper .steps .step.step-finished a .step-count span {
    border: 2px solid var(--global-palette1);
}

.navbar-wrapper .steps-wrapper .steps .step.step-finished a .step-count span::before {
    display: none;
}

.cart-box.active .open-cart {
    transform: translate(0, -50%);
    z-index: -8;
    visibility: hidden;
    opacity: 0;
    transition: all 250ms;
}

.cart-box .open-cart {
    align-items: center;
    background: var(--global-palette1);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    height: 40px;
    justify-content: center;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translate(-100%, -50%);
    transition: all 250ms 250ms;
    width: 60px;
}

.cart-box .close-cart {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: center;
}

/* Cart Box  */
.cart-box {
    background: var(--global-palette6);
    border-radius: 3px;
    color: #fff;
    font-weight: 500;
    padding: 20px;
    position: fixed;
    right: 0;
    text-align: center;
    top: 50%;
    transform: translate(100%, -50%);
    transition: all 250ms;
    width: 350px;
    z-index: 2;
}

.cart-box.active {
    transform: translate(0, -50%);
    transition: all 250ms 250ms;
}

.cart-box h3 {
    color: #fff;
    margin-bottom: 20px;
}

.cart-box .products.fullwidth {
    gap: 5px;
    max-height: 400px;
    overflow: auto;
    margin: 0;
}

.cart-box .products.fullwidth .product-container {
    padding: 10px;
}

.cart-box .products.fullwidth li.product {
    background: var(--global-palette7);
    border-radius: 3px;
    box-shadow: none;
}

.cart-box .products.fullwidth li.product .image-wrapper {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.cart-box .products.fullwidth li.product .product-details {
    padding: 0 0 30px 10px;
}

.cart-box .products.fullwidth li.product .product-details .product-info {
    left: 10px;
    font-size: 14px;
}

.cart-box .products.fullwidth li.product .product-details .product-price {
    left: 10px;
}

.cart-box .products.fullwidth li.product .product-details .product-price .price {
    color: var(--global-palette4);
    font-size: 17px !important;
    font-weight: bold;
}

.cart-box .products.fullwidth li.product .product-details .product-quantity .quantity .value {
    font-size: 16px;
}

.cart-box .products.fullwidth li.product .product-details .product-title {
    border: 0 !important;
    font-size: 14px !important;
    font-weight: bold;
    margin: 0 !important;
    padding: 0 !important;
}

.cart-box .products.fullwidth li.product .product-details .variation-wrapper {
    display: block;
}

.cart-box .products.fullwidth li.product .product-details .variation-wrapper .attribute-field {
    font-size: 14px;
}

.cart-box .products.fullwidth li.product .product-details .variation-wrapper .attribute-field span {
    font-size: 14px;
    font-weight: bold;
}

.cart-box .products li.product .product-details .variation-wrapper .attribute-field select.hide {
    display: none;
}

.cart-box .config-wrapper {
    margin: 20px 0 0 0;
}

.cart-box .config-wrapper .overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-box .config-wrapper .overview .product-count .value {
    align-items: center;
    background: var(--global-palette1);
    border-radius: 12px;
    display: inline-flex;
    font-weight: bold;
    justify-content: center;
    margin: 0 5px 0 0;
    width: 50px;
}

.cart-box .config-wrapper .overview .product-price {
    font-size: 20px;
    font-weight: bold;
}

.cart-box .config-wrapper .show-config {
    text-align: center;
    margin: 20px 0 0 0;
}

.cart-box .config-wrapper .show-config .button {
    display: block;
    font-weight: bold;
}

.cart-box .config-wrapper .show-config .button>i {
    margin: 0 5px;
}

.cart-box .config-wrapper .show-config .button.disabled {
    opacity: .3;
    cursor: not-allowed;
    pointer-events: none
}

/* Content  */
.content-wrapper .content-row {
    position: relative;
    border-bottom: 2px solid rgb(211, 212, 213);
    padding: 0 0 40px 0;
    margin: 30px 0 0 0;
    width: 100%
}

.content-wrapper .content-row.no-border {
    border: 0;
}

.content-wrapper .content-row.no-padding {
    padding: 0;
}

.content-wrapper .content-headline {
    border-bottom: 4px solid var(--global-palette1);
    margin: 0;
    padding: 0 0 20px 0
}

.content-wrapper .step-count {
    align-items: center;
    background: var(--global-palette1);
    border-radius: 50%;
    border: 2px solid var(--global-palette1);
    display: flex;
    float: left;
    height: 36px;
    justify-content: center;
    margin: 2px 15px 0 0;
    overflow: hidden;
    position: relative;
    text-align: center;
    width: 36px;
}

.content-wrapper .step-count span {
    color: #fff;
}

.content-wrapper h1 {
    color: var(--global-palette1);
    line-height: 40px;
}

.content-wrapper h3 {
    color: var(--global-palette1);
}

.content-wrapper .input-row {
    display: flex;
    width: 100%;
    margin: 0;
    position: relative
}

.content-wrapper .input-row.product {
    justify-content: space-between;
}

.content-wrapper .input-row .content-products {
    flex-basis: 40%;
}

.content-wrapper .input-row .content-products .products {
    margin: 0;
}

.content-wrapper .input-item {
    width: 100%;
    position: relative;
    margin-top: 20px
}

.content-wrapper .input-item-30 {
    width: 30%;
    margin-right: 3%
}

.content-wrapper .input-item-50 {
    width: 48%;
    margin-right: 2%
}

/* Input Selectors */

.content-wrapper .input-selector {
    margin: 5px 0 0 0;
    max-width: 350px;
    overflow: hidden;
    padding: 6px 0 6px 20px;
    width: 100%;
}

.content-wrapper .input-selector .input-selector-item {
    cursor: pointer;
}

.content-wrapper .input-label {
    font-size: 14px;
    font-weight: 600;
}

.content-wrapper .addlength-button:hover {
    color: #fff;
    border: 1.5px solid var(--global-palette1);
    background: var(--global-palette1)
}

.content-wrapper .content-next {
    border-bottom: 0
}

.content-wrapper .content-next .input-item-next {
    text-align: right;
}


.content-wrapper .info-line {
    width: 100%;
    float: left;
    font-size: 14px;
    margin: 10px 0 0 0;
    color: #707070
}

.content-wrapper .info-text {
    float: left;
    margin: 2px 0 0 0;
    line-height: 19px
}

/* Products */

.products {
    -webkit-box-pack: center;
    display: flex;
    gap: 10px;
    height: 100%;
    justify-content: center;
    margin: 0;
    margin: 30px 0 0 0;
    padding: 0;
    position: relative;
    width: 100%;
}

.products li.product {
    background: #fff;
    box-shadow: rgb(211, 212, 213) 0px 6px 24px 0px;
    flex: 1 1 0%;
    max-width: 400px;
}

.products li.product .image-wrapper {
    position: relative;
    padding-top: 60%;
    position: relative;
    width: 100%;
}

.products li.product .image-wrapper .add-to-cart {
    align-items: center;
    background: var(--global-palette1);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    z-index: 1;
}

.products li.product .image-wrapper .add-to-cart i.spinner {
    display: block;
    animation: rotate 1s linear infinite;
}

.products li.product .image-wrapper>img {
    height: 100%;
    left: 0;
    object-fit: contain;
    position: absolute;
    top: 0;
    width: 100%;
}

.products li.product .image-wrapper::before {
    background: var(--global-palette5);
    bottom: 0;
    content: "";
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity 200ms ease;
    z-index: 0;
}

.products li.product .image-wrapper>i {
    color: var(--global-palette1);
    font-size: 50px;
    left: 50%;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 200ms ease;
    z-index: 1;
}

.products li.product.selected .image-wrapper::before {
    opacity: 0.6;
    transition: opacity 200ms ease;
    z-index: 1;
}

.products li.product.selected .image-wrapper i {
    opacity: 1;
    transition: opacity 200ms ease;
}

.products li.product .product-details {
    padding: 0.5rem 1.5rem;
}

.products li.product .product-details .product-title {
    border-bottom: 1px solid rgb(211, 212, 213);
    color: var(--global-palette4);
    font-size: 19px !important;
    font-weight: 600;
    line-height: 20px;
    margin: 10px 0 0px 0 !important;
    padding-bottom: 8px;
    width: 100%;
}

.products li.product .product-details .product-details {
    padding: 18px 30px;
}

.products li.product .product-details .variation-wrapper {
    display: none;
    width: 100%
}

.products li.product .product-details .variation-wrapper .attribute-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products li.product .product-details .variation-wrapper td,

.products li.product .product-details .variation-wrapper th {
    padding: 0
}

.cart-box .products li.product .product-details .variation-wrapper .attribute-field {
    display: block;
}

.cart-box .products li.product .product-details .variation-wrapper .attribute-field select {
    pointer-events: none;
    background: none;
    border: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0;
    width: auto;
    cursor: default;
}

/* Hide the dropdown arrow in different browsers */
.cart-box .products li.product .product-details .variation-wrapper .attribute-field select::-ms-expand {
    display: none;
}

/* Optional: Add these if you want to ensure text doesn't wrap */
.cart-box .products li.product .product-details .variation-wrapper .attribute-field select {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.products li.product .product-details .product-price .price {
    color: var(--global-palette1);
    display: block;
    font-size: 26px !important;
    font-weight: bold;
}

/* Products FullWidth */

.products.fullwidth {
    flex-wrap: wrap;
    gap: 10px;
}

.products.fullwidth li.product {
    flex-basis: 100%;
    max-width: none;
    margin: 0;
}

.products.fullwidth .product-container {
    display: flex;
    padding: 15px 30px;
}

.products.fullwidth li.product .image-wrapper {
    padding-top: 19.899%;
    width: 25%;
}

.products.fullwidth li.product .product-details {
    color: var(--global-palette4);
    flex-basis: 100%;
    flex-wrap: wrap;
    padding: 0px 0 45px 30px;
    position: relative;
    text-align: left;
}

.products.fullwidth li.product .product-details .product-title {
    font-size: 18px !important;
}

.products.fullwidth li.product .product-details .product-info {
    align-items: center;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    left: 30px;
    position: absolute;
    right: 0;
}

.products.fullwidth li.product .product-details .product-quantity .quantity {
    align-items: center;
    background: var(--global-palette1);
    border-radius: 12px;
    display: inline-flex;
    justify-content: center;
    margin-left: 5px;
    min-width: 50px;
}

.products.fullwidth li.product .product-details .product-quantity .quantity .minus,
.products.fullwidth li.product .product-details .product-quantity .quantity .plus {
    display: none;
    color: var(--global-palette4);
    cursor: pointer;
    width: 15px;
}

.products.fullwidth li.product.editable .product-details .product-quantity .quantity {
    gap: 10px;
    padding: 0 10px;
    width: unset;
}

.products.fullwidth li.product .product-details .product-quantity .quantity .value {
    font-size: 20px;
    color: #fff;
    font-weight: bold;
}

.products.fullwidth li.product.editable .product-details .product-quantity .quantity .minus,
.products.fullwidth li.product.editable .product-details .product-quantity .quantity .plus {
    display: block;
}

/* Measurements */

.content-measurements .measurements {
    margin: 30px 0 0 0;
}

.content-measurements .measurements .row {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-measurements .measurements span:not(.value, .text) {
    align-items: center;
    background: var(--global-palette5);
    border-radius: 15px;
    color: var(--global-palette9);
    display: inline-flex;
    gap: 5px;

    height: 30px;
    padding: 0px 18px;
    white-space: nowrap;
}

/* Step 3 */

.configurator.step3 .products li.product .product-details .variation-wrapper {
    display: block;
    margin-top: 10px;
}

.configurator.step3 .products li.product .product-details .variation-wrapper .attribute-field {
    display: none;
}

.configurator.step3 .products li.product .product-details .variation-wrapper .attribute-field[data-attribute="pa_weite-2-fluegelig"],
.configurator.step3 .products li.product .product-details .variation-wrapper .attribute-field[data-attribute="pa_tor-weite-in-cm"] {
    display: flex;
}

/* Übersicht Page - aktuelle Konfiguration */

.configurator.overview .products li.product .product-details .variation-wrapper {
    display: block;
    margin-top: 10px;
}

.configurator.overview .products li.product .product-details .variation-wrapper .attribute-field {
    gap: 10px;
    justify-content: flex-start;
}

/* Styling für select-Elemente in der Übersicht, damit sie wie Text erscheinen */
.configurator.overview .products li.product .product-details .variation-wrapper select {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    box-shadow: none;
    color: inherit;
    cursor: default;
    display: inline;
    font-family: inherit;
    font-size: inherit;
    font-weight: bold;
    margin: 0;
    padding: 0;
    pointer-events: none;
    width: auto;
}

.configurator.overview .products li.product .product-details .variation-wrapper select:focus {
    outline: none;
}

/* Hide the dropdown arrow in different browsers */
.configurator.overview .products li.product .product-details .variation-wrapper select::-ms-expand {
    display: none;
}

.configurator.overview .price-container {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
}

.configurator.overview .price-container .product-quantity .quantity {
    align-items: center;
    background: var(--global-palette1);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    font-weight: bold;
    justify-content: center;
    margin-left: 5px;
    width: 50px;
}

.configurator.overview .price-container .product-price .total-price {
    display: block;
    font-size: 30px !important;
    font-weight: bold;
}

/* Loading Spinner */
.loading-spinner {
    background: rgba(0, 0, 0, 0.5);
    bottom: 0;
    left: 0;
    opacity: 0;
    position: fixed;
    right: 0;
    top: 0;
    visibility: hidden;
    z-index: 10000;
}

.loading-spinner .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading-spinner .icon i {
    animation: rotate 1s linear infinite;
    color: var(--global-palette1);
    font-size: 60px;
}

.loading-spinner.show {
    opacity: 1;
    visibility: visible;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* For tablets (width up to 768px) */
@media only screen and (max-width: 1024px) {
    .configurator {
        padding: 0 30px;
    }

    .navbar-wrapper .steps-wrapper .steps .step a .step-count span {
        height: 28px;
        width: 28px;
    }

    .content-wrapper .input-row {
        flex-wrap: wrap;
    }

    .content-wrapper .input-item-30,
    .content-wrapper .input-item-50 {
        width: 100%;
        margin-right: 0;
    }

    .cart-box h3 {
        font-size: 18px;
    }

    .products.fullwidth li.product .product-details {
        padding: 0px 0 40px 15px;
    }

    .products li.product .product-details .product-title {
        font-size: 18px !important;
    }

    .products.fullwidth li.product .product-details .product-info {
        left: 15px;
    }

    .products li.product .product-details .product-price .price {
        font-size: 22px !important;
    }

    .configurator.overview .price-container .product-price .total-price {
        font-size: 26px !important;
    }

    .content-wrapper h1,
    .content-wrapper h3 {
        font-size: 24px;
    }
}

/* For mobile devices (width up to 480px) */
@media only screen and (max-width: 700px) {
    .configurator {
        margin: 20px auto;
        padding: 0 15px;
    }

    .navbar-wrapper .steps-wrapper .steps {
        flex-wrap: wrap;
        padding: 20px 15px;
    }

    .navbar-wrapper .steps-wrapper .steps .step {
        padding: 0 0 5px 0;
    }

    .navbar-wrapper .steps-wrapper .steps .step:last-child {
        padding-bottom: 0 !important;
    }

    .navbar-wrapper .steps-wrapper .steps .step a {
        justify-content: flex-start;
        padding: 0;
    }

    .navbar-wrapper .steps-wrapper .steps .step a .step-count {
        flex-basis: auto;
    }

    .navbar-wrapper .steps-wrapper .steps .step a .step-count::before {
        bottom: 0;
        height: 5px;
        left: 50%;
        top: unset;
        transform: translate(-50%, 100%);
        width: 2px;
    }

    .navbar-wrapper .steps-wrapper .steps .step.step-current a .step-label {
        flex-basis: auto;
    }

    .products {
        flex-wrap: wrap;
        margin: 20px 0 0 0;
        gap: 10px;
    }

    .products li.product {
        flex-basis: 100%;
        margin: 0;
        max-width: unset;
    }

    .products li.product .image-wrapper {
        padding-top: 50%;
    }

    .products li.product .product-details {
        padding: 5px 15px;
    }


    .products li.product .product-details .product-title {
        font-size: 16px;
        margin: 7px 0 0px 0 !important;
        padding-bottom: 8px;
    }

    .content-wrapper h1 {
        font-size: 20px;
    }

    .content-wrapper h3 {
        font-size: 18px;
    }

    .content-wrapper .content-row {
        padding: 0 0 30px 0;
        margin: 30px 0 0 0;
    }

    .content-wrapper .input-item {
        margin-top: 15px;
    }

    .content-measurements .measurements .row {
        gap: 5px;
    }

    .content-measurements .measurements span:not(.value, .text) {
        padding: 0px 10px;
        font-size: 16px;
    }


}