.uhp-ai-obraz-panel {
    margin: 22px 0;
    padding: 18px;
    border: 1px solid #e2d6c4;
    background: #fffaf3;
    border-radius: 8px;
}
.uhp-ai-obraz-panel h3 { margin-top: 0; font-size: 20px; }
.uhp-ai-obraz-intro { margin-bottom: 14px; color: #5a4a3c; }
.uhp-ai-obraz-type-name { font-weight: 600; color: #6f5530; }
.uhp-ai-obraz-label { display: block; font-weight: 600; margin-bottom: 6px; }
.uhp-ai-obraz-prompt { width: 100%; min-height: 92px; resize: vertical; }
.uhp-ai-obraz-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: #6f6356; margin: 6px 0 12px; }
.uhp-ai-obraz-generate.is-loading { opacity: .7; cursor: wait; }
.uhp-ai-obraz-message { margin-top: 10px; font-size: 14px; }
.uhp-ai-obraz-message.success { color: #196b24; }
.uhp-ai-obraz-message.error { color: #9b1c1c; }
.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled { opacity: .55; cursor: not-allowed; }
.woocommerce-product-gallery.uhp-ai-obraz-gallery-active,
.images.uhp-ai-obraz-gallery-active { background: #f6f0e7; position: relative; }
.woocommerce-product-gallery.uhp-ai-obraz-gallery-active img,
.images.uhp-ai-obraz-gallery-active img { width: 100%; height: auto; object-fit: contain; }

.uhp-ai-obraz-progress { display: none; align-items: center; gap: 10px; margin: 12px 0 4px; }
.uhp-ai-obraz-progress.is-visible { display: flex; }
.uhp-ai-obraz-progress-track { position: relative; flex: 1; height: 10px; overflow: hidden; border-radius: 999px; background: #eadfce; border: 1px solid #d9c8ad; }
.uhp-ai-obraz-progress-bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #9b7a37, #d9b967, #9b7a37); transition: width .45s ease; position: relative; }
.uhp-ai-obraz-progress.is-waiting .uhp-ai-obraz-progress-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: uhpAiProgressShine 1.5s infinite; }
.uhp-ai-obraz-progress-text { min-width: 42px; text-align: right; font-size: 13px; color: #6f5530; font-weight: 600; }
.uhp-ai-obraz-status { margin-top: 6px; min-height: 18px; font-size: 13px; color: #6f6356; font-style: italic; }

.uhp-ai-obraz-cart-thumb { display: block; max-width: 72px; height: auto; object-fit: contain; border: 1px solid #eadfce; background: #fffaf3; }

.woocommerce-product-gallery.uhp-ai-obraz-is-generating,
.images.uhp-ai-obraz-is-generating { position: relative; overflow: hidden; }
.uhp-ai-obraz-painting-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 10; background: rgba(255,255,255,.04); }
.uhp-ai-obraz-painting-overlay span { position: absolute; top: -25%; left: -40%; width: 42%; height: 150%; transform: rotate(14deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), rgba(217,185,103,.22), transparent); filter: blur(8px); animation: uhpAiPaintSweep 1.9s infinite ease-in-out; }
.woocommerce-product-gallery.uhp-ai-obraz-is-generating img,
.images.uhp-ai-obraz-is-generating img { filter: saturate(.9) brightness(.96); }

@keyframes uhpAiProgressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes uhpAiPaintSweep {
    0% { left: -45%; opacity: .25; }
    45% { opacity: .65; }
    100% { left: 105%; opacity: .25; }
}

.uhp-ai-obraz-generated-gallery { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.uhp-ai-obraz-thumb { width:72px; height:72px; padding:0; border:1px solid #d9c8ad; background:#fff; border-radius:6px; overflow:hidden; cursor:pointer; }
.uhp-ai-obraz-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.uhp-ai-obraz-thumb.is-active { border-color:#9b7a37; box-shadow:0 0 0 2px rgba(155,122,55,.18); }
.uhp-ai-obraz-zoom-button { position:absolute; right:12px; bottom:12px; z-index:11; background:rgba(58,31,14,.84); color:#fff; border:0; border-radius:999px; padding:8px 14px; font-size:13px; cursor:pointer; }
.uhp-ai-obraz-zoom-modal { position:fixed; inset:0; z-index:99999; }
.uhp-ai-obraz-zoom-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.74); }
.uhp-ai-obraz-zoom-dialog { position:absolute; inset:5%; display:flex; align-items:center; justify-content:center; }
.uhp-ai-obraz-zoom-dialog img { max-width:92vw; max-height:88vh; box-shadow:0 10px 40px rgba(0,0,0,.45); background:#fff; }
.uhp-ai-obraz-zoom-close { position:absolute; top:10px; right:10px; width:40px; height:40px; border-radius:50%; border:0; background:rgba(255,255,255,.92); font-size:28px; line-height:1; cursor:pointer; }


.woocommerce-product-gallery.uhp-ai-obraz-gallery-active a,
.images.uhp-ai-obraz-gallery-active a,
.woocommerce-product-gallery.uhp-ai-obraz-gallery-active img,
.images.uhp-ai-obraz-gallery-active img { cursor: zoom-in; }
.uhp-ai-obraz-generated-gallery, .uhp-ai-obraz-zoom-button { display:none !important; }


.woocommerce-product-gallery.uhp-ai-obraz-gallery-has-live,
.images.uhp-ai-obraz-gallery-has-live { position: relative; }
.uhp-ai-live-preview {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 25;
    background: #f6f0e7;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}
.uhp-ai-live-preview.is-visible { display: flex; }
.uhp-ai-live-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.woocommerce-product-gallery.uhp-ai-obraz-is-generating .uhp-ai-live-preview img,
.images.uhp-ai-obraz-is-generating .uhp-ai-live-preview img { filter: saturate(.98) brightness(.99); }

.uhp-ai-obraz-product-image { object-fit: contain; background:#fff; }


/* v0.4.7 — animacja generowania nad aktywnym podglądem */
.woocommerce-product-gallery.uhp-ai-obraz-is-generating,
.images.uhp-ai-obraz-is-generating { position: relative; overflow: hidden; }

.woocommerce-product-gallery.uhp-ai-obraz-is-generating .uhp-ai-live-preview,
.images.uhp-ai-obraz-is-generating .uhp-ai-live-preview { overflow: hidden; }

.woocommerce-product-gallery.uhp-ai-obraz-is-generating .uhp-ai-live-preview img,
.images.uhp-ai-obraz-is-generating .uhp-ai-live-preview img {
    animation: uhpAiLiveBreath 2.4s infinite ease-in-out;
}

.uhp-ai-obraz-painting-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(255,246,218,.28), transparent 34%),
        rgba(255,255,255,.03);
}

.uhp-ai-obraz-painting-overlay::before,
.uhp-ai-obraz-painting-overlay::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.uhp-ai-obraz-painting-overlay::before {
    top: 8%;
    left: 8%;
    width: 84%;
    height: 84%;
    border-radius: 18px;
    background:
        radial-gradient(circle at 25% 35%, rgba(255,255,255,.86) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 70% 26%, rgba(217,185,103,.85) 0 1.7px, transparent 3px),
        radial-gradient(circle at 62% 70%, rgba(255,255,255,.7) 0 1.4px, transparent 2.7px),
        radial-gradient(circle at 38% 76%, rgba(217,185,103,.65) 0 1.6px, transparent 3px);
    background-size: 115px 115px, 130px 130px, 150px 150px, 180px 180px;
    animation: uhpAiSparkles 2.8s infinite linear;
    opacity: .75;
}

.uhp-ai-obraz-painting-overlay::after {
    top: 18%;
    left: 50%;
    width: 46%;
    height: 62%;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(ellipse at center, rgba(217,185,103,.34), rgba(255,255,255,.18) 38%, transparent 72%);
    filter: blur(8px);
    animation: uhpAiAuraPulse 2.2s infinite ease-in-out;
}

.uhp-ai-obraz-painting-overlay span {
    position: absolute;
    top: -28%;
    left: -55%;
    width: 48%;
    height: 158%;
    transform: rotate(13deg);
    background: linear-gradient(90deg,
        transparent,
        rgba(255,255,255,.18),
        rgba(255,255,255,.72),
        rgba(217,185,103,.38),
        rgba(255,255,255,.18),
        transparent
    );
    filter: blur(8px);
    animation: uhpAiPaintSweep 1.75s infinite ease-in-out;
}

@keyframes uhpAiLiveBreath {
    0%, 100% { filter: saturate(.96) brightness(.985); transform: scale(1); }
    50% { filter: saturate(1.03) brightness(1.035); transform: scale(1.006); }
}

@keyframes uhpAiSparkles {
    0% { transform: translate3d(0, 0, 0); opacity: .55; }
    50% { opacity: .95; }
    100% { transform: translate3d(16px, -18px, 0); opacity: .55; }
}

@keyframes uhpAiAuraPulse {
    0%, 100% { opacity: .38; transform: translateX(-50%) scale(.96); }
    50% { opacity: .78; transform: translateX(-50%) scale(1.04); }
}
