/* Custom modifier app iframe — fills the drawer shell, with a loader until the app responds. */

/* Flex child of the drawer column, so it takes whatever the header leaves rather
   than a full 100% that would push the app's Add to Cart past the clipped edge. */
.wiz-modifier-iframe-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
}

/* Held back until product details supply the real SKU (see setHeaderSkuPending). */
#modifier-drawer-container.wiz-modifier-iframe--sku-pending .drawer-sku {
    visibility: hidden;
}

.wiz-modifier-iframe {
    display: block;
    width: 100% !important;
    height: 100%;
    border: 0;
}

.wiz-modifier-iframe-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wiz-color-background, #fff);
}

.wiz-modifier-iframe-loader[hidden] {
    display: none;
}

.wiz-modifier-iframe-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wiz-color-background, #fff);
    padding: 24px;
    text-align: center;
    color: var(--wiz-color-text, #1a1a1a);
    font-size: 14px;
}

.wiz-modifier-iframe-error[hidden] {
    display: none;
}

.wiz-modifier-iframe-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--wiz-color-border, #e5e7eb);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: wiz-modifier-iframe-spin 0.8s linear infinite;
}

@keyframes wiz-modifier-iframe-spin {
    to {
        transform: rotate(360deg);
    }
}
