#pco_widget {

    .btn-close-dialog-pco-image {
        position: fixed;
        top: 30px;
        right: 30px;
        border: none;
        background-color: transparent;
        outline: none;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
    }

    .pco-option-wrapper {

        margin-bottom: 20px;

        .label-option {
            font-weight: bold;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            z-index: 1;
        }

        .info-circle {
            display: inline-block;
            width: 20px;
            height: 20px;
            line-height: 20px;
            background-color: black;
            border-radius: 50%;
            position: relative;
            margin-left: 5px;
            cursor: pointer;

            &:before {
                content: "i";
                font-family: Arial, sans-serif;
                font-size: 12px;
                color: #fff; /* Text color, you can change it as needed */
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }
        }

        /* Click-based tooltip styles */
        .pco-hint-tooltip {
            position: absolute;
            left: 100%;
            top: 50%;
            transform: translateY(-50%);
            margin-left: 10px;
            padding: 10px 18px;
            min-width: 50px;
            max-width: 300px;
            width: max-content;
            border-radius: 6px;
            font-size: 14px;
            font-weight: normal;
            background-color: rgba(59, 72, 80, 0.95);
            color: #fff;
            text-align: left;
            white-space: pre-wrap;
            box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s, visibility 0.2s;
            
            &.active {
                opacity: 1;
                visibility: visible;
            }
            
            /* Arrow pointing left */
            &:before {
                content: "";
                position: absolute;
                left: -8px;
                top: 50%;
                transform: translateY(-50%);
                border: 8px solid transparent;
                border-right-color: rgba(59, 72, 80, 0.95);
                border-left: none;
            }
        }

        /* Remove old hover-based tooltip styles */
        [data-tooltip] {
            position: relative;
            z-index: 10;
        }
    }

    .price-impact-badge {
        display: inline-block;
        padding: 4px;
        color: black;
        border-radius: 5px;
        background-color: rgba(59, 72, 80, 0.13);
        font-size:0.7rem;
    }

    .pco-option-dropdown {
        select {
            background-color: white;
        }
    }

    .pco-option-checkboxes, .pco-option-radio {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;

        @media only screen and (max-width: 900px) {
            display: block;
        }

        .pco-option-value-wrapper {
            display: flex;
            align-items: center;

            @media only screen and (max-width: 900px) {
                margin-bottom: 5px;
            }

            label {
                line-height: 20px;
                position: relative;
                top: 4px;
                text-align: left;
                margin-left: 5px;
            }

            input[type="checkbox"], input[type="radio"] {
                width: 20px;
                height: 20px;
                line-height: 20px;
            }
        }
    }

    .pco-option-images {
        .pco-option {
            span {
                display: block;
            }
        }

        .pco-option.selected {
        }
    }

    .pco-option-images {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;

        .pco-image {
            width: 100px;
            text-align: center;

            img {
                position: relative;
                transition: transform 0.5s;
                z-index: 10;
                cursor: zoom-in;
                box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
                border: 2px solid #fff;
                max-width: 100%;
                max-height: 70px;
            }

            img.active {
                transform: scale(4);
                box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
                z-index: 100;
            }
        }


        .actions {
            padding: 10px 0;
            text-align: center;

            label {
                text-align: center;
            }

            input[type='radio'] {
                height: 16px;
                width: 16px;
            }
        }
    }

    .pco-option-colors {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;

        .pco-option-color-wrapper {
            width: 80px;
            .pco-color {
                text-align: center;
            }

            .pco-color.selected {
                .swatch {
                    border: 2px solid black;
                }
                .text {
                    font-weight: bold;
                }
            }
        }

        .swatch {
            border-radius: 50%;
            display: block;
            height: 40px;
            width: 40px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
            border: 2px solid #fff;
            margin:0 auto;
        }
    }

    .pco-option-textbox {
        textarea {
            background-color: white;
        }
    }

    .pco-option-textbox-double,
    .pco-option-textbox-triple,
    .pco-option-textbox-multiple {
        display: flex;
        flex-direction: column;
        gap: 15px;

        .pco-textbox-field {
            display: flex;
            flex-direction: column;
            gap: 5px;

            .pco-field-label {
                font-weight: bold;
                text-align: left;
                font-size: 0.9em;
                color: #333;
            }

            textarea {
                background-color: white;
                min-height: 60px;
                resize: vertical;
            }

            .pco-char-count {
                font-size: 0.8em;
                color: #999;
                text-align: right;
            }
        }

        .pco-char-difference-error {
            margin-top: 5px;
            padding: 8px;
            background-color: #f8d7da;
            border: 1px solid #f5c6cb;
            border-radius: 4px;
        }
    }

    .pco-option-date {
        input {
            background-color: white;
        }
    }

    .pco-option-file {
        .pco-file-uploaded {
            color:#222;
            border:1px solid #777;
            background-color: white;
            padding: 10px;
            border-radius: 4px;
            display: grid;
            grid-template-columns: auto 30px;

            .pco-file-delete {
                font-size: 20px;
                cursor: pointer;
            }
        }

        .pco-file-upload-error {
            background-color: #f8d7da;
            color: #721c24;
            padding: 10px;
            border-radius: 4px;
            border:1px solid #721c24;
        }
    }
}


.pco-configurator {

    dialog {
        position: fixed;
        z-index: 999;
        left: 0;
        top: 0;
        width: 100%;
        height: 100vh;
        overflow: hidden;

        .configurator-wrapper {
            width: 100%;
            height: 100%;
            display: grid;
            grid-template-columns: 1080px auto;
        }

        .header-summary {
            .configurator-title {
                font-size: 24px;
                font-weight: bold;
                margin-bottom: 10px;
            }

            .price {
                font-size: 18px;
                font-weight: bold;
                margin-bottom: 10px;
            }
        }

        .image-large {
            @media (max-width: 1024px) {
                display: none;
            }
        }

        .image-large, .options-wrapper {
            height: 100%;
            @media (min-width: 1025px) {
                padding: 20px;
            }
        }

        .pco-option-wrapper.active {
            .label-option {
                opacity: 1 !important;
            }
        }

        .options-wrapper {
            display: grid;
            grid-template-rows: 50px auto;
            gap: 40px;
            overflow-y: auto;

            .label-option {
                font-weight: bold;
                font-size: 18px;
                opacity: 0.5;
                background-color: #f5f5f5;
                padding: 10px;
            }

            .option-hint {
                margin: 20px 0;
                font-size: 14px;
            }

        }

        .image-large {
            background-size: contain;
            background-repeat: no-repeat;
        }

        .pco-option-wrapper {
            .pco-options-wrapper  {
                display:none;
            }
        }

        .pco-option-wrapper.active {
            .pco-options-wrapper {
                display: block !important;
            }
        }

        .pco-option-images {

            .pco-image {
                width: 200px !important;
            }

            .pco-image-wrapper {
                img {
                    height:200px !important;
                    max-height: 200px !important;
                    width: auto !important;
                }
            }
        }

        .btn-pco-configurator-continue {
            width: 100%;
            margin-top: 20px;
        }

    }
}

#dialog-pco-image {
    img {
        width: 100%;
    }

    .btn-close-dialog-pco-image {
        position: fixed;
        top: 10px;
        right: 10px;
        border: none;
        background-color: transparent;
        font-size: 20px;
        font-weight: bold;
    }
}