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

.cc-life-launch {
    width: 100%;
    grid-column: 1 / -1;
}

.single-product.postid-14 .woocommerce-product-gallery .zoomImg {
    display: none !important;
}

.single-product.postid-14 .woocommerce-product-gallery__image img.wp-post-image {
    position: relative !important;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

.cc-life-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-life-preview {
    justify-content: center;
}

.cc-life-stage {
    position: relative;
    display: flex;
    height: min(660px, calc(100% - 38px));
    max-width: 100%;
    aspect-ratio: 2 / 5;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #dce4e0;
    background: #fff;
    box-shadow: 0 4px 22px rgb(30 41 37 / 12%);
    isolation: isolate;
    touch-action: none;
}

.cc-life-preview-empty {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(190px, calc(100% - 28px));
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #68716e;
    text-align: center;
}

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

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

.cc-life-photo-layer {
    --photo-x: 50%;
    --photo-y: 50%;
    --photo-scale: 1;
    position: absolute;
    z-index: 2;
    left: var(--photo-x);
    top: var(--photo-y);
    width: 70%;
    height: auto;
    transform: translate(-50%, -50%) scale(var(--photo-scale));
    transform-origin: center;
    border: 1px solid #2f7d71;
    cursor: move;
    outline: 0;
    touch-action: none;
    user-select: none;
}

.cc-life-photo-layer:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2f7d71;
}

.cc-life-photo-preview {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;
}

.cc-life-photo-resize {
    position: absolute;
    z-index: 5;
    width: 13px;
    height: 13px;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 2px;
    background: #2f7d71;
    box-shadow: 0 1px 3px rgb(30 41 37 / 22%);
    cursor: nwse-resize;
    touch-action: none;
}

.cc-life-photo-resize.is-top-left {
    top: -7px;
    left: -7px;
}

.cc-life-photo-resize.is-top-right {
    top: -7px;
    right: -7px;
    cursor: nesw-resize;
}

.cc-life-photo-resize.is-bottom-left {
    bottom: -7px;
    left: -7px;
    cursor: nesw-resize;
}

.cc-life-photo-resize.is-bottom-right {
    right: -7px;
    bottom: -7px;
}

.cc-life-crop-frame {
    position: absolute;
    z-index: 3;
    inset: 4.5% 9%;
    border: 1px dashed #7d8985;
    pointer-events: none;
}

.cc-life-crop-frame > span {
    position: absolute;
    inset: 2px;
    border: 1px solid rgb(255 255 255 / 82%);
}

.cc-life-crop-label {
    position: absolute;
    z-index: 4;
    top: calc(4.5% + 8px);
    left: 50%;
    padding: 3px 7px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: rgb(255 255 255 / 92%);
    color: #59635f;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}

.cc-life-reset-photo {
    position: absolute;
    z-index: 6;
    right: 9px;
    top: 9px;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #dce4e0;
    border-radius: 4px;
    background: rgb(255 255 255 / 92%);
    color: #303735;
    box-shadow: 0 1px 4px rgb(30 41 37 / 10%);
    cursor: pointer;
}

.cc-life-reset-photo:hover {
    border-color: #2f7d71;
    background: #eff6f3;
    color: #2f7d71;
}

.cc-life-reset-photo .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
}

.cc-life-preview-file {
    position: fixed !important;
    inset: auto !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

.cc-life-preview-note {
    max-width: 430px;
    line-height: 1.45;
    text-align: center;
}

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

.cc-life-controls > fieldset,
.cc-life-controls > section {
    margin: 0 0 18px;
    padding: 0 0 18px;
    border-bottom: 1px solid #dce4e0;
}

.cc-life-controls > :last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.cc-life-height select {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 38px 0 12px;
    border: 1px solid #dce4e0;
    border-radius: 5px;
    background-color: #fff;
    color: #303735;
    box-shadow: none;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.cc-life-height select:focus,
.cc-life-contact input:focus,
.cc-life-notes textarea:focus {
    border-color: #2f7d71;
    outline: 0;
    box-shadow: 0 0 0 2px rgb(47 125 113 / 12%);
}

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

.cc-life-drop {
    min-height: 132px;
}

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

.cc-life-photo-name > .dashicons {
    color: #2f7d71;
}

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

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

.cc-life-photo-name strong {
    font-size: 13px;
    font-weight: 550;
}

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

.cc-life-contact h3 {
    margin-bottom: 4px;
}

.cc-life-contact > p {
    margin: 0 0 11px;
    color: #68716e;
    font-size: 11px;
    line-height: 1.45;
}

.cc-life-contact > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cc-life-contact label {
    display: grid;
    gap: 5px;
    color: #303735;
    font-size: 12px;
    font-weight: 500;
}

.cc-life-contact b {
    color: #b44335;
    font-weight: 500;
}

.cc-life-contact input {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #dce4e0;
    border-radius: 5px;
    background: #fff;
    color: #303735;
    box-shadow: none;
}

.cc-life-quantity > p,
.cc-life-notes > p {
    margin: 0 !important;
}

.cc-life-quantity legend,
.cc-life-notes legend {
    margin-bottom: 7px;
}

.cc-life-quantity label,
.cc-life-quantity > p > label {
    margin: 0;
}

.cc-life-notes textarea {
    display: block;
    width: 100%;
    min-height: 92px;
    margin: 0;
    padding: 10px 12px;
    resize: vertical;
    border: 1px solid #dce4e0;
    border-radius: 5px;
    background: #fff;
    color: #303735;
    box-shadow: none;
    font: inherit;
}

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

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

@media (max-width: 760px) {
    .cc-life-body {
        display: flex;
        flex-direction: column;
    }

    .cc-life-preview {
        min-height: 38dvh;
        flex: 0 0 38dvh;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid #dce4e0;
    }

    .cc-life-stage {
        height: calc(100% - 30px);
    }

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

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

    .cc-life-contact > div {
        grid-template-columns: 1fr;
    }
}
