.itim-designer-actions {
    display: flex;
    width: min(100%, 680px);
    margin: 20px 0;
    gap: 10px;
}

.itim-designer-launch,
.itim-designer-classic {
    display: inline-flex;
    flex: 1 1 260px;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin: 0;
    border: 1px solid #111827;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    transition:
        transform 150ms ease,
        opacity 150ms ease;
}

.itim-designer-launch {
    color: #fff;
    background: #111827;
}

.itim-designer-classic {
    color: #111827;
    background: #fff;
}

.itim-designer-launch:hover,
.itim-designer-classic:hover {
    opacity: 0.9;
}

.itim-designer-launch:active,
.itim-designer-classic:active {
    transform: translateY(1px);
}

[data-itim-designer-hidden='1'] {
    display: none !important;
}

.itim-designer-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 12px;
    background: rgba(9, 9, 11, 0.72);
}

.itim-designer-modal[hidden] {
    display: none !important;
}

.itim-designer-dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    width: min(1500px, 100%);
    height: min(940px, calc(100vh - 24px));
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.itim-designer-dialog-has-variants {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.itim-designer-storefront-variants {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    max-height: none;
    overflow: auto;
    border-right: 1px solid #e4e4e7;
    padding: 20px;
    background: #fff;
    overscroll-behavior: contain;
}

.itim-designer-storefront-variants[hidden] {
    display: none !important;
}

.itim-designer-storefront-variants-title {
    margin: 0 0 12px;
    color: #18181b;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
}

.itim-designer-storefront-variants-content {
    max-width: 100%;
}

.itim-designer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(9, 9, 11, 0.78);
    font: inherit;
    font-size: 30px;
    line-height: 1;
}

.itim-designer-close:hover {
    background: #09090b;
}

.itim-designer-frame {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #f4f4f5;
}

.itim-designer-dialog-has-variants .itim-designer-frame {
    grid-column: 2;
    grid-row: 1;
}

.itim-designer-message {
    position: absolute;
    inset: auto 16px 16px;
    z-index: 2;
    border-radius: 10px;
    padding: 12px 16px;
    color: #991b1b;
    background: #fef2f2;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body.itim-designer-open {
    overflow: hidden !important;
}

@media (max-width: 960px) {
    .itim-designer-dialog-has-variants {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .itim-designer-storefront-variants {
        grid-column: 1;
        grid-row: 1;
        max-height: 40dvh;
        border-right: 0;
        border-bottom: 1px solid #e4e4e7;
        padding: 16px 56px 16px 16px;
    }

    .itim-designer-dialog-has-variants .itim-designer-frame {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 720px) {
    .itim-designer-actions {
        flex-direction: column;
        margin: 14px 0;
        gap: 8px;
    }

    .itim-designer-launch,
    .itim-designer-classic {
        flex: 0 0 auto;
        width: 100%;
        min-height: 46px;
        padding: 10px 16px;
    }

    .itim-designer-modal {
        padding: 0;
    }

    .itim-designer-dialog {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
