/* ═══════════════════════════════════════
   AlchemyPot15 – Widget Styles
   ═══════════════════════════════════════ */

.ap15-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
    margin: 0 auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.ap15-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* ── Spark container (injected by JS) ── */
.ap15-spark-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

/* ── Lightbox overlay ── */
.ap15-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 2, 12, 0.88);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.ap15-lightbox[aria-hidden="false"] {
    opacity: 1;
    pointer-events: all;
}

.ap15-lb-inner {
    position: relative;
    max-width: min(90vw, 760px);
    width: 100%;
}

.ap15-lb-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #e8c96a;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: transform 0.2s;
}
.ap15-lb-close:hover { transform: scale(1.3) rotate(90deg); }

.ap15-lb-vessel {
    position: relative;
    border: 3px solid #c8982a;
    border-radius: 12px;
    background: radial-gradient(ellipse at 50% 30%, #1a0a2e 0%, #0a0510 100%);
    box-shadow:
        0 0 40px rgba(200,152,42,0.45),
        inset 0 0 60px rgba(200,152,42,0.1);
    overflow: hidden;
    padding: 24px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* golden corner ornaments */
.ap15-lb-vessel::before,
.ap15-lb-vessel::after {
    content: '✦';
    position: absolute;
    color: #c8982a;
    font-size: 20px;
    opacity: 0.7;
}
.ap15-lb-vessel::before { top: 8px;  left: 12px; }
.ap15-lb-vessel::after  { top: 8px;  right: 12px; }

.ap15-lb-smoke {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180,140,255,0.18) 0%, transparent 70%);
    animation: ap15-smoke 5s ease-in-out infinite;
    pointer-events: none;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}
.ap15-lb-smoke--2 {
    width: 80px;
    height: 80px;
    animation-delay: -2.5s;
    left: 30%;
}

@keyframes ap15-smoke {
    0%   { opacity: 0; transform: translateX(-50%) translateY(0)   scale(0.8); }
    50%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-80px) scale(1.6); }
}

.ap15-lb-media-wrap {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
    position: relative;
    z-index: 1;
}
.ap15-lb-media-wrap img,
.ap15-lb-media-wrap video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.ap15-lb-title {
    font-family: Georgia, serif;
    color: #e8c96a;
    font-size: clamp(14px, 2.5vw, 22px);
    letter-spacing: 0.08em;
    text-align: center;
    text-shadow: 0 0 12px rgba(232,201,106,0.7);
    z-index: 1;
}

/* ── Mobile tweaks ── */
@media (max-width: 640px) {
    .ap15-wrapper {
        width: min(88vw, 340px) !important;
        height: min(88vw, 340px) !important;
    }
}

/* ── Reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
    .ap15-lb-smoke { animation: none; }
    .ap15-lightbox { transition: none; }
}
