.woocommerce-product-gallery__image,
.woocommerce-product-gallery__video {
    position: relative;
}

.sds-media-ai {
    position: absolute;
    top: 14px;
    right: 60px;
    z-index: 10;
}

.sds-media-ai-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #ffffff80;
    border-radius: 11px;
    background: #eeeeeede;
    color: #292d30;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .03em;
    cursor: pointer;
    box-shadow: 0 2px 7px #00000012;
    backdrop-filter: blur(6px);
}

.sds-media-ai-button::before {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23292d30' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M8 5 9.8 9.2 14 11 9.8 12.8 8 17 6.2 12.8 2 11 6.2 9.2Z'/%3E%3Cpath d='m15 1 .9 2.1L18 4l-2.1.9L15 7l-.9-2.1L12 4l2.1-.9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sds-media-ai-button::after {
    content: "i";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.sds-media-ai-button[hidden],
.sds-media-ai-popup[hidden] {
    display: none !important;
}

.sds-media-ai-button:focus-visible {
    outline: 2px solid #24282c;
    outline-offset: 3px;
}

.sds-media-ai-popup {
    position: fixed;
    z-index: 100010;
    box-sizing: border-box;
    width: max-content;
    max-width: min(290px, calc(100vw - 24px));
    max-height: min(240px, calc(100vh - 24px));
    overflow: auto;
    padding: 13px 16px;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
    color: #24282c;
    box-shadow: 0 5px 24px #00000024;
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
