body {
    background-color: var(--ly-color-bg) !important;
}

.ly-main-product-form-custom-sidewalls {
    input[type='number'] {
        -moz-appearance: textfield;
    }

    input[type='number']::-webkit-inner-spin-button,
    input[type='number']::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type='checkbox'] {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;

        width: 26px;
        height: 26px;
        border: 1px solid #3333334d;
        border-radius: 4px;
        cursor: pointer;
        background: #ffffff;

        &:checked {
            background: var(--ly-color-primary);
            border-color: #33333300;
            position: relative;

            &::after {
                content: '';
                position: absolute;
                inset: 0;
                font-size: 14px;
                color: #ffffff;
                display: flex;
                align-items: center;
                justify-content: center;
                background: no-repeat center/12px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6.0 10.8L3.2 8l-1.2 1.2 4.0 4.0 8-8-1.2-1.2z'/></svg>");
            }
        }
    }

    .ly-main-product-form-custom-sidewalls-expandable-option {
        padding: 26px 30px;
        background-color: #ffffff;
        border-radius: 10px;
        display: block;
        margin: 20px 0;
        border: 1px solid #ffffff;
        transition: .2s;

        .ly-main-product-form-custom-sidewalls-expandable-option-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            transition: 0.25s;

            &:has(input:checked) {
                border-bottom: 1px solid #3333334d;
                padding-bottom: 16px;
            }
        }

        .ly-main-product-form-custom-sidewalls-expandable-option-grid {
            --r: 0fr;
            display: grid;
            grid-template-rows: var(--r);
            transition: 0.25s;
            overflow: hidden;

            .ly-main-product-form-custom-sidewalls-expandable-option-grid-inner {
                min-height: 0;
            }
        }

        &:has(.ly-main-product-form-custom-sidewalls-expandable-option-header > input:checked) {
            border-color: var(--ly-color-primary);

            .ly-main-product-form-custom-sidewalls-expandable-option-grid {
                --r: 1fr;
            }
        }
    }

    .ly-main-product-form-custom-sidewalls-quantity-input {
        --border: .5px solid #3333334D;

        flex: 0 0 auto;
        display: flex;
        align-items: center;
        width: 104px;
        height: 26px;
        border: var(--border);
        border-radius: 6px;
        overflow: hidden;
        color: var(--ly-color-text);

        button {
            all: unset;
            width: 30px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: .2s;

            .svg-wrapper {
                width: 12px;
            }
        }

        input {
            all: unset;
            width: 100%;
            height: 100%;
            flex: 1;
            text-align: center;
            border-left: var(--border);
            border-right: var(--border);
        }
    }

    .ly-main-product-form-custom-sidewalls-option-wrapper {
        margin: 36px 0;
    }

    .option-title {
        margin-bottom: 20px;
    }
}

.ly-main-product-form-custom-sidewalls-image-option-wrapper {

    .uploader {
        margin-top: 20px;
        width: 120px;
        height: 90px;
        border: 1px solid #3333334d;
        background-color: #ffffff;
        border-radius: 10px;
        overflow: hidden;
        position: relative;

        .upload-wrapper {
            input {
                position: absolute;
                inset: 0;
                opacity: 0;
                cursor: pointer;
            }

            .svg-wrapper {
                position: absolute;
                inset: 0;
                margin: auto;
                cursor: pointer;
                width: 34px;
                height: 34px;
            }
        }

        .preview-wrapper {
            img {
                position: absolute;
                inset: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
                cursor: pointer;
            }

            .svg-wrapper {
                position: absolute;
                inset: 0;
                margin: auto;
                color: #ffffff;
                cursor: pointer;
            }
        }
    }
}

.ly-main-product-form-custom-sidewalls-sidewall-option-wrapper {
    .ly-main-product-form-custom-sidewalls-sidewall-option-side-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 26px 0;

        &:first-child {
            margin-top: 30px;
        }

        input {
            width: 100%;
            padding: 10px 14px;
            border-radius: 10px;
            outline: none;
            border: 1px solid #3333334d;
            transition: .2s;

            &:focus-visible {
                box-shadow: none;
                border-color: var(--ly-color-primary) !important;
            }

            &.is-dangerous {
                border-color: #dc3545 !important;
            }
        }
    }
}

.ly-main-product-form-custom-sidewalls-message-option-wrapper {
    .ly-main-product-form-custom-sidewalls-message-option {
        display: block;
        margin-top: 20px;

        textarea {
            width: 100%;
            padding: 10px 14px;
            border-radius: 10px;
            outline: none;
            border: 1px solid #3333334d;
            transition: .2s;

            &:focus-visible {
                box-shadow: none;
                border-color: var(--ly-color-primary) !important;
            }

            &.is-dangerous {
                border-color: #dc3545 !important;
            }
        }
    }
}

@media screen and (min-width: 750px) {
    .ly-main-product-form-custom-sidewalls {
        .ly-main-product-form-custom-sidewalls-option-wrapper {
            margin: 40px 0;
        }
    }
}

@media (hover: hover) {
    .ly-main-product-form-custom-sidewalls-quantity-input {
        button:hover {
            background-color: #aaaaaa;
            color: #ffffff;
            cursor: pointer;
        }
    }
}