/* ============================================
   Elementor YoYo Gallery - Main Styles
   ============================================ */

/* ---- Wrapper & Scene ---- */
.eyg-wrapper {
    position: relative;
    width: 100%;
    min-height: 420px;
    overflow: hidden;
    border-radius: 8px;
    user-select: none;
}

/* ---- Background Styles ---- */
.eyg-bg-wood {
    background-color: #3d2b1f;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.03) 2px,
            rgba(255,255,255,0.03) 4px
        ),
        repeating-linear-gradient(
            180deg,
            transparent,
            transparent 20px,
            rgba(0,0,0,0.06) 20px,
            rgba(0,0,0,0.06) 22px
        ),
        linear-gradient(
            180deg,
            #4a3020 0%,
            #3d2b1f 30%,
            #5a3825 60%,
            #3d2b1f 100%
        );
}

.eyg-bg-fabric {
    background-color: #2c3e50;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 3px,
            rgba(255,255,255,0.04) 3px,
            rgba(255,255,255,0.04) 6px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 3px,
            rgba(255,255,255,0.04) 3px,
            rgba(255,255,255,0.04) 6px
        ),
        linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
}

.eyg-bg-plain {
    /* Color set inline by widget */
}

.eyg-bg-custom {
    /* Color set inline by widget */
}

/* ---- Scene Container ---- */
.eyg-scene {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 10px 30px;
    box-sizing: border-box;
    gap: 20px;
}

/* ---- YoYo Wrapper ---- */
.eyg-yoyo-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transform-origin: top center;
    will-change: transform;
    transition: filter 0.2s ease;
    /* Default size, overridden by JS */
    width: var(--eyg-yoyo-size, 150px);
    flex-shrink: 0;
}

.eyg-yoyo-wrap:hover {
    filter: brightness(1.12);
}

/* ---- String ---- */
.eyg-string-container {
    position: relative;
    width: 20px;
    /* Height set by JS based on yoyo size */
    height: var(--eyg-string-height, 100px);
    overflow: visible;
    flex-shrink: 0;
}

.eyg-string {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.eyg-string-path {
    transition: d 0.3s ease;
}

/* ---- YoYo Body ---- */
.eyg-yoyo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--eyg-yoyo-size, 150px);
    flex-shrink: 0;
}

/* ---- Discs ---- */
.eyg-disc {
    width: var(--eyg-yoyo-size, 150px);
    height: calc(var(--eyg-yoyo-size, 150px) * 0.3);
    border-radius: 50%;
    position: relative;
    box-shadow:
        0 4px 15px rgba(0,0,0,0.5),
        inset 0 -4px 8px rgba(0,0,0,0.3),
        inset 0 4px 8px rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.eyg-disc-top {
    border-radius: 50% 50% 40% 40%;
    box-shadow:
        0 6px 20px rgba(0,0,0,0.5),
        inset 0 -6px 12px rgba(0,0,0,0.35),
        inset 0 4px 8px rgba(255,255,255,0.2);
}

.eyg-disc-bottom {
    border-radius: 40% 40% 50% 50%;
    box-shadow:
        0 8px 20px rgba(0,0,0,0.5),
        inset 0 4px 12px rgba(0,0,0,0.25),
        inset 0 -4px 6px rgba(255,255,255,0.1);
}

/* Decorative notch detail on disc */
.eyg-disc::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

/* ---- Center Image ---- */
.eyg-center-image {
    width: calc(var(--eyg-yoyo-size, 150px) * 0.55);
    height: calc(var(--eyg-yoyo-size, 150px) * 0.55);
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.25);
    box-shadow:
        0 0 0 2px rgba(0,0,0,0.3),
        0 4px 12px rgba(0,0,0,0.5);
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    background: #222;
    margin: -4px 0;
}

.eyg-center-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    pointer-events: none;
}

/* ---- Lightbox ---- */
.eyg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.eyg-lightbox.eyg-lightbox-open {
    opacity: 1;
    pointer-events: all;
}

.eyg-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.eyg-lightbox.eyg-lightbox-open .eyg-lightbox-inner {
    transform: scale(1);
}

.eyg-lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    display: block;
}

.eyg-lightbox-caption {
    text-align: center;
    padding: 16px 20px 0;
    max-width: 600px;
}

.eyg-lightbox-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.eyg-lightbox-desc {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.eyg-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
    line-height: 1;
    padding: 0;
    backdrop-filter: blur(4px);
}

.eyg-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* ---- Depth variants ---- */
.eyg-yoyo-wrap[data-depth="1"] {
    opacity: 1;
    transform-origin: top center;
}

.eyg-yoyo-wrap[data-depth="2"] {
    opacity: 0.92;
}

.eyg-yoyo-wrap[data-depth="3"] {
    opacity: 0.82;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .eyg-scene {
        gap: 12px;
        padding: 12px 6px 20px;
    }

    .eyg-yoyo-wrap {
        max-width: calc(33.333% - 12px);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .eyg-yoyo-wrap {
        max-width: calc(25% - 16px);
    }
}

@media (min-width: 769px) {
    .eyg-yoyo-wrap {
        max-width: calc(20% - 20px);
    }
}

/* ---- Click animation ---- */
.eyg-yoyo-wrap.eyg-click-anim {
    animation: eyg-pull-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes eyg-pull-up {
    0%   { transform: translateY(0) rotate(0deg); }
    30%  { transform: translateY(-30px) rotate(-5deg); }
    60%  { transform: translateY(-15px) rotate(3deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
