@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   Base Structure
   ========================================================================== */
.aafe-image-sphere-wrapper {
    position: relative;
    width: var(--aafe-container-size, 600px);
    height: var(--aafe-container-size, 600px);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.aafe-image-sphere__container {
    position: relative;
    user-select: none;
    cursor: grab;
    width: 100%;
    height: 100%;
    max-width: 100%;
    touch-action: none;
}

.aafe-image-sphere__container:active {
    cursor: grabbing;
}

.aafe-image-sphere__scene {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* ==========================================================================
   Image Nodes
   ========================================================================== */
.aafe-image-sphere__node {
    position: absolute;
    cursor: pointer;
    user-select: none;
    transition: transform var(--aafe-transition, 200ms) ease-out;
    transform-origin: center center;
    /* initial transform is handled by JS */
}

.aafe-image-sphere__img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--aafe-image-radius, 50%);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: var(--aafe-image-border-width, 2px) solid var(--aafe-image-border-color, rgba(255,255,255,0.2));
    background-color: #f3f4f6;
}

.aafe-image-sphere__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ==========================================================================
   Spotlight Modal
   ========================================================================== */
.aafe-image-sphere__modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background-color: var(--aafe-modal-overlay-bg, rgba(0, 0, 0, 0.8));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.aafe-image-sphere__modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.aafe-image-sphere__modal-content {
    background-color: var(--aafe-modal-bg, #ffffff);
    border-radius: var(--aafe-modal-radius, 12px);
    max-width: 28rem;
    width: 100%;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.aafe-image-sphere__modal-overlay.is-active .aafe-image-sphere__modal-content {
    transform: scale(1);
    opacity: 1;
}

.aafe-image-sphere__modal-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
}

.aafe-image-sphere__modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aafe-image-sphere__modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6); /* Fallback */
    color: #ffffff; /* Fallback */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.2); /* Fallback */
    padding: 10px;
    margin: 0;
    outline: none;
    z-index: 99;
    box-sizing: content-box;
    line-height: 1;
}

.aafe-image-sphere__modal-close:hover {
    transform: scale(1.05);
}

.aafe-image-sphere__modal-close svg,
.aafe-image-sphere__modal-close i {
    width: 1em;
    height: 1em;
    font-size: 20px;
    fill: currentColor;
    display: block;
    flex-shrink: 0;
}

.aafe-image-sphere__modal-info {
    padding: 24px;
}

.aafe-image-sphere__modal-title {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.aafe-image-sphere__modal-desc {
    margin: 0;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.aafe-image-sphere__empty {
    border: 2px dashed #d1d5db;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}
