.vc-open-modal {
    margin-top: 14px;
}

#vc-tile-modal.vc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

#vc-tile-modal.vc-modal.is-open {
    display: block;
}

.vc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.62);
    backdrop-filter: blur(2px);
}

.vc-modal__dialog {
    position: relative;
    width: min(96vw, 1180px);
    margin: 2vh auto;
    background: #efefef;
    border-radius: 36px;
    padding: 0;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
    border: 1px solid #d9d9d9;
    max-height: 95dvh;
    overflow: hidden;
}

.vc-modal__close {
    position: absolute;
    /*right: 16px;*/
    right:0px;
    /*top: 14px;*/
    border: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    color: #111111;
    cursor: pointer;
    z-index: 10;
    margin-top:0px;
    margin-right:0px;
}

#vc-tile-modal .vc-modal__layout {
    display: grid !important;
    grid-template-columns: minmax(320px, 40%) minmax(0, 1fr) !important;
    min-height: min(680px, 90dvh);
    transform-origin: top center;
    transform: scale(var(--vc-fit-scale, 1));
    transition: transform 140ms ease-out;
}

#vc-tile-modal .vc-sidepanel {
    background: #f4f4f4;
    border-right: 1px solid #d2d2d2;
    padding: 38px 34px 30px;
    overflow: hidden;
}

#vc-tile-modal-title {
    margin: 0;
    font-size: clamp(20px, 4vw, 42px);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #14171b;
}

.vc-modal__subtitle {
    /*margin: 4px 0 26px;*/
    margin-bottom: 0px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8a9198;
    font-size: 9px;
}

.vc-block {
    margin-bottom: 3px;
}

.vc-block__title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.vc-step-badge {
    width: 14px;
    height: 14px;
    /*border-radius: 50%;*/
    background: #0f1217;
    color: #0f1217;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vc-block__title {
    margin: 0;
    font-size: clamp(15px, 2.6vw, 15px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #101418;
}

.vc-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: min(92%, 760px);
    margin-top: 10px;
}

.vc-toolbar__group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.vc-toolbar__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #545c66;
    font-weight: 700;
    margin-right: 4px;
}

.vc-toolbar__inline-tools {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.vc-mask-tool {
    border: 1px solid #cfd2d6;
    border-radius: 18px;
    background: #f3f3f3;
    color: #838b93;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    padding: 8px 16px;
}

.vc-mask-tool.is-active {
    background: linear-gradient(145deg, #121418, #1b2028);
    color: #ffffff;
    border-color: #121418;
}

.vc-format-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.vc-field--compact > span {
    display: inline-flex;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: #88919a;
    font-weight: 700;
}

.vc-field--compact input {
    border: 1px solid #dbdee2;
    border-radius: 14px;
    padding: 10px 12px;
    min-height: 46px;
    font-size: 22px;
    font-weight: 700;
    color: #111820;
    background: #f8f8f8;
}

.vc-product-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
    border: 1px solid #dbdee2;
    border-radius: 22px;
    background: #ececec;
    padding: 14px;
    margin-top: 8px;
    margin-bottom:19px;
}

#vc-product-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #d5d5d5;
}

.vc-product-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#vc-product-name {
    color: #0f172a;
    font-size: 17px;
}

#vc-product-dimensions {
    color: #7b848d;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
}

.vc-wishlist-btn {
    margin-top: 12px;
    width: 100%;
    text-align: center;
}

.vc-side-action {
    width: 100%;
    margin-top: 6px;
}

#vc-download-result.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

#vc-tile-modal .vc-stage {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.vc-dropzone {
    width: min(92%, 760px);
    min-height: clamp(260px, 40vh, 420px);
    border: 4px dashed #d6d6d6;
    border-radius: 40px;
    background: #f2f2f2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    cursor: pointer;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.vc-pick-image {
    margin-top: 4px;
}

.vc-dropzone__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
}

.vc-stage-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f2f2f2;
    border-radius: 36px;
}

.vc-compare {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 36px;
    overflow: hidden;
}

.vc-mask-canvas,
.vc-mask-preview-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 36px;
}

.vc-mask-preview-canvas {
    pointer-events: none;
    z-index: 4;
}

.vc-mask-canvas {
    z-index: 5;
    cursor: crosshair;
    touch-action: none;
}

.vc-mask-canvas.is-hidden,
.vc-mask-preview-canvas.is-hidden {
    display: none;
}



.vc-compare__after-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: inset(0 50% 0 0);
}

.vc-compare__after-mask .vc-stage-preview {
    inset: 0;
}

.vc-compare__slider {
    --vc-compare-split: 50%;
    position: absolute;
    inset: 0;
    z-index: 6;
    cursor: ew-resize;
    touch-action: none;
}

.vc-compare__slider::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--vc-compare-split);
    width: 2px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
}

.vc-compare__handle {
    position: absolute;
    top: 50%;
    left: var(--vc-compare-split);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
    color: transparent;
    cursor: ew-resize;
}

.vc-compare__handle::before {
    content: "< >";
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #ffffff;
    font-weight: 700;
}

.vc-compare__handle:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.vc-dropzone.has-media {
    border-style: solid;
    border-color: #cfd6dd;
}

.vc-dropzone.is-locked {
    cursor: not-allowed;
    border-color: #b8c1cb;
}

.vc-dropzone__icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #e7e7e7;
    color: #161b22;
    font-size: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vc-dropzone strong {
    font-size: clamp(20px, 2.2vw, 26px);
    text-transform: uppercase;
    color: #171b20;
}

.vc-dropzone span {
    color: #8d949b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: clamp(11px, 1.3vw, 13px);
}

.vc-selected-file {
    min-height: 20px;
    margin: 10px 0 0;
    color: #4a5563;
    font-weight: 600;
}

.vc-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    color: #3f4650;
    font-size: 13px;
    line-height: 1.4;
}

.vc-consent input {
    margin-top: 2px;
}

.vc-run-simulation {
    margin-top: 10px;
}

.vc-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.vc-field input[type="file"] {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px;
    background: #fff;
}

.vc-loader {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 16px;
    color: #334155;
    width: min(92%, 760px);
}

.vc-loader__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vc-loader__text {
    font-weight: 600;
}

.vc-loader__progress {
    --vc-progress-value: 0%;
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #dbe4ec;
    overflow: hidden;
}

.vc-loader__progress::after {
    content: "";
    display: block;
    width: var(--vc-progress-value);
    height: 100%;
    background: linear-gradient(90deg, #0f766e, #1d4ed8);
    transition: width 220ms ease;
}

.vc-loader__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vc-progress-step {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc;
    font-weight: 700;
}

.vc-progress-step.is-active {
    border-color: #1d4ed8;
    background: #dbeafe;
    color: #1d4ed8;
}

.vc-progress-step.is-done {
    border-color: #0f766e;
    background: #dcfce7;
    color: #0f766e;
}

.vc-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-top-color: #0f766e;
    border-radius: 50%;
    animation: vc-spin 0.8s linear infinite;
}

.vc-feedback {
    margin: 16px 0 0;
    min-height: 20px;
}

.vc-feedback.is-error {
    color: #b91c1c;
}

.vc-feedback.is-success {
    color: #166534;
}

.vc-result {
    margin-top: 18px;
    width: min(92%, 760px);
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

#vc-result-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
}

@keyframes vc-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1080px) {
    #vc-tile-modal .vc-modal__layout {
        grid-template-columns: minmax(300px, 42%) minmax(0, 1fr) !important;
    }

    #vc-tile-modal .vc-sidepanel,
    #vc-tile-modal .vc-stage {
        padding: 24px 20px;
    }

    .vc-field--compact input {
        font-size: 18px;
    }
}

@media (max-width: 860px) {
    .vc-modal__dialog {
        width: 98vw;
        margin: 1vh auto;
        border-radius: 20px;
        max-height: 98dvh;
        overflow-y: auto;
    }

    #vc-tile-modal .vc-modal__layout {
        grid-template-columns: 1fr !important;
        min-height: auto;
    }

    #vc-tile-modal .vc-stage {
        order: 1;
    }

    #vc-tile-modal .vc-sidepanel {
        order: 2;
        display: flex;
        flex-direction: column;
    }

    #vc-tile-modal .vc-sidepanel,
    #vc-tile-modal .vc-stage {
        padding: 20px 14px;
    }

    .vc-product-card {
        grid-template-columns: 64px 1fr;
        border-radius: 16px;
    }

    .vc-toolbar {
        width: min(96%, 760px);
    }

    #vc-product-thumb {
        width: 64px;
        height: 64px;
    }

    .vc-dropzone {
        width: 100%;
        min-height: clamp(280px, 52dvh, 520px);
        border-radius: 20px;
        border-width: 3px;
        padding: 16px;
    }

    .vc-toolbar__group .button,
    .vc-toolbar__inline-tools .button {
        min-height: 44px;
    }

    .vc-dropzone__icon {
        width: 62px;
        height: 62px;
        font-size: 38px;
    }

    .vc-run-simulation,
    #vc-download-result,
    #vc-add-wishlist {
        width: 100%;
        text-align: center;
    }

    .vc-side-action {
        margin-top: 10px;
    }

    .vc-sidepanel .vc-run-simulation {
        margin-top: auto;
    }

    .vc-result {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .vc-modal__dialog {
        width: 96vw;
        margin: 2vh auto;
        border-radius: 16px;
    }

    .vc-sidepanel,
    .vc-stage {
        padding: 16px 12px;
    }

    .vc-dropzone {
        width: 100%;
        min-height: clamp(300px, 56dvh, 560px);
        border-radius: 16px;
    }

    .vc-dropzone strong {
        font-size: 18px;
    }

}
