.cc-window-dialog:not([open]),
.cc-window-dialog [hidden] {
    display: none !important;
}

.cc-window-form.cc-product-customizer {
    display: flex;
    gap: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.cc-window-preview {
    justify-content: center;
}

.cc-window-preview-frame {
    position: relative;
    display: flex;
    width: auto;
    height: auto;
    max-width: 720px;
    max-height: 100%;
    aspect-ratio: 2 / 3;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #dce4e0;
    background: #fff;
    box-shadow: 0 4px 22px rgb(30 41 37 / 12%);
}

.cc-window-preview-frame img {
    position: absolute !important;
    inset: 0 !important;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

.cc-window-preview-frame > p {
    display: contents;
    margin: 0;
}

.cc-window-preview-empty,
.cc-window-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #68716e;
}

.cc-window-preview-empty .dashicons,
.cc-window-pdf .dashicons {
    width: 32px;
    height: 32px;
    color: #2f7d71;
    font-size: 32px;
}

.cc-window-preview-empty strong,
.cc-window-pdf strong {
    font-size: 13px;
    font-weight: 550;
}

.cc-window-preview-note {
    line-height: 1.45;
    text-align: center;
}

.cc-window-dialog fieldset > legend small {
    margin-left: 4px;
    color: #68716e;
    font-size: 12px;
    font-weight: 400;
}

.cc-window-dimensions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cc-window-dimensions > label {
    display: grid;
    gap: 7px;
    color: #303735;
    font-size: 13px;
    font-weight: 550;
}

.cc-window-number {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dce4e0;
    border-radius: 5px;
    background: #fff;
}

.cc-window-number:focus-within {
    border-color: #2f7d71;
    box-shadow: 0 0 0 2px rgb(47 125 113 / 12%);
}

.cc-window-number input {
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: #303735;
    box-shadow: none;
    font-variant-numeric: tabular-nums;
}

.cc-window-number input:focus {
    outline: 0;
}

.cc-window-number em {
    display: block;
    flex: 0 0 auto;
    padding: 0 11px;
    color: #68716e;
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.cc-window-size > p,
.cc-window-upload > p {
    margin: 8px 0 0;
    color: #68716e;
    font-size: 11px;
    line-height: 1.45;
}

.cc-window-drop {
    min-height: 126px;
}

.cc-window-artwork-name {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #b9d7cf;
    border-radius: 5px;
    background: #eff6f3;
    color: #303735;
}

.cc-window-artwork-name > .dashicons {
    color: #2f7d71;
}

.cc-window-artwork-name span:last-child {
    display: grid;
    min-width: 0;
}

.cc-window-artwork-name strong,
.cc-window-artwork-name small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-window-artwork-name strong {
    font-size: 13px;
    font-weight: 550;
}

.cc-window-artwork-name small {
    color: #68716e;
    font-size: 11px;
}

.cc-window-breakdown {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.cc-window-breakdown > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: #68716e;
    font-size: 12px;
}

.cc-window-breakdown strong {
    color: #303735;
    font-size: 13px;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
}

.cc-window-total {
    display: flex;
    align-items: baseline;
}

.single-product:has(.cc-window-dialog) .swp-product-summary form.cart > .quantity,
.single-product:has(.cc-window-dialog) .swp-product-summary form.cart > p:has(.single_add_to_cart_button) {
    display: none !important;
}

@media (max-width: 760px) {
    .cc-window-preview {
        min-height: 29dvh;
        flex: 0 0 29dvh;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid #dce4e0;
    }

    .cc-window-body {
        display: flex;
        flex-direction: column;
    }

    .cc-window-controls {
        flex: 1;
    }

    .cc-window-preview-note {
        font-size: 10px !important;
    }
}
