/* ==========================================================================
   Ring Showcase Custom Layer: 3D Anchored Pins (Metal, Switcher 1-5, Gem)
   ========================================================================== */

.ring-custom-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 30;
    overflow: visible;
}

/* Base Hotspot Pin */

.ring-hotspot-pin {
    position: absolute;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    pointer-events: auto;
    user-select: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.12s ease-out;
    will-change: transform;
}

/* Pin Trigger Button */

.pin-trigger {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    color: #191826;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, background-color 0.2s ease;
}

.pin-trigger:hover,
.ring-hotspot-pin.is-open .pin-trigger {
    transform: scale(1.12);
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(99, 102, 241, 0.4);
}

.pin-trigger:focus-visible {
    outline: 2px solid #006FEE;
    outline-offset: 2px;
}

/* Ping pulse animation on trigger */

.pin-trigger::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 1.5px solid rgba(99, 102, 241, 0.6);
    opacity: 0;
    pointer-events: none;
    animation: pin-pulse 3s ease-out infinite;
}

.ring-hotspot-pin.is-open .pin-trigger::after {
    animation: none;
}

@keyframes pin-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    60%,
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Icon inside Metal & Gem Pins */

.pin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #191826;
    line-height: 1;
}

.pin-icon svg {
    display: block;
}

/* Switcher Pin Number Badge (1-5) */

.switcher-num {
    font-family: var(--sans, 'Sora', sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: #191826;
    line-height: 1;
}

/* Hide webgj default conflicting buttons so only our unified pins show */

button[aria-label="Change Gem"],
button[aria-label="Change Metal"] {
    display: none !important;
}

/* Horizontal Popup Pill for options */

.pin-popup {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(6px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.2s;
    z-index: 50;
    white-space: nowrap;
}

.ring-hotspot-pin.is-open .pin-popup {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* When pin is near the top edge, open popup below instead of above */

.ring-hotspot-pin.popup-below .pin-popup {
    bottom: auto;
    top: calc(100% + 12px);
    transform: translateX(-50%) translateY(-6px);
}

.ring-hotspot-pin.popup-below.is-open .pin-popup {
    transform: translateX(-50%) translateY(0);
}

.ring-hotspot-pin.popup-below .pin-popup::after {
    top: auto;
    bottom: 100%;
    border-width: 0 5px 5px 5px;
    border-color: transparent transparent rgba(255, 255, 255, 0.96) transparent;
}

/* Arrow pointer on popup bottom */

.pin-popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.96) transparent transparent transparent;
}

/* Swatch Buttons (Metal & Gemstone) */

.swatch-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex: none;
    transition: transform 0.18s ease;
}

.swatch-btn:hover {
    transform: scale(1.12);
}

.swatch-circle {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f3f4f6;
}

.swatch-gem-btn[data-gem="4"] .swatch-circle {
    background-color: #f8bbd0;
}

.swatch-btn.is-active .swatch-circle {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px #191826, inset 0 0 0 1px rgba(0, 0, 0, 0.12);
    transform: scale(1.06);
}

/* Ring Switcher Option Buttons (1 2 3 4 5) */

.ring-opt-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    background: #f4f4f7;
    color: #4b5563;
    font-family: var(--sans, 'Sora', sans-serif);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    padding: 0;
}

.ring-opt-btn:hover {
    background: #e5e7eb;
    color: #111827;
    transform: scale(1.08);
}

.ring-opt-btn.is-active {
    background: #191826;
    color: #ffffff;
    border-color: #191826;
    box-shadow: 0 2px 8px rgba(25, 24, 38, 0.35);
}

/* Ensure native spots stay visible */

.spots {
    display: block;
}

/* Hide any unneeded shadow/native configurator tabs */

[id*="tab-Gem-materialConfiguratorPlugin"],
[id*="tab-Metal-materialConfiguratorPlugin"],
.hero3d .configurator-tabs,
.hero3d [role="tablist"] {
    display: none !important;
}

/* ==========================================================================
   Clean Unified Switcher Dock (Eliminates redundant floating number circle)
   ========================================================================== */

/* Switcher Pin clean segmented dock */

#pin-switcher {
    position: absolute !important;
    left: 50% !important;
    bottom: 16px !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    opacity: 1 !important;
    z-index: 50 !important;
}

#pin-switcher .pin-trigger.switcher-trigger {
    display: none !important;
    /* Hides duplicate floating number circle below switcher */
}

#pin-switcher .pin-popup {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.12), 0 2px 8px -2px rgba(15, 23, 42, 0.06) !important;
    border-radius: 999px !important;
    padding: 4px 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

#pin-switcher .pin-popup::after {
    display: none !important;
}

.ring-opt-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: none !important;
    background: transparent !important;
    font-family: 'Sora', -apple-system, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ring-opt-btn:hover {
    background: rgba(241, 245, 249, 0.9) !important;
    color: #0f172a !important;
}

.ring-opt-btn.is-active {
    background: #0f172a !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25) !important;
    transform: scale(1.05) !important;
}

@media (max-width: 640px) {
    #pin-switcher {
        bottom: 8px !important;
    }
    #pin-switcher .pin-popup {
        padding: 3px 5px !important;
        gap: 3px !important;
    }
    .ring-opt-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    .ring-hotspot-pin,
    .pin-trigger {
        width: 34px;
        height: 34px;
    }
    .ring-hotspot-pin {
        margin: -17px 0 0 -17px;
    }
    .pin-popup {
        max-width: calc(100vw - 28px);
        overflow-x: auto;
    }
}