/* ============================================ */
/* WEBROTATE360 LAZY LOADING VIEWER STYLES     */
/* Used by: Osteology bone pages with 360° viewers */
/* ============================================ */

/* WebRotate360 Lazy Loading Styles */
.wr360-lazy-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    background-color: #f1f1f1;
}

.wr360-preview {
    position: relative;
    width: 100%;
    height: 388px;
    background-color: #f1f1f1;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.wr360-preview:hover {
    transform: scale(1.01);
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wr360-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 0;
    z-index: 10;
}

.wr360-play-button:hover {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.9;
}

.play-text {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wr360-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.wr360-loading p {
    margin-top: 1.5rem;
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.wr360-viewer {
    background-color: #f1f1f1;
    border-radius: 15px;
    width: 100%;
    min-height: 388px;
}

/* Custom sizing for pelvic surface viewer - fits 600x388px images exactly */
.wr360-pelvic-surface .wr360-preview,
.wr360-pelvic-surface .wr360-viewer {
    height: 388px;
    max-width: 600px;
    margin: 0 auto;
}

.wr360-pelvic-surface .wr360-preview {
    padding: 0;
}

.wr360-pelvic-surface .preview-image {
    object-fit: contain;
    object-position: center;
}

@media (max-width: 768px) {
    .wr360-preview,
    .wr360-viewer {
        height: 245px;
    }

    .wr360-play-button svg {
        width: 60px;
        height: 60px;
    }

    .play-text {
        font-size: 12px;
        bottom: -38px;
        padding: 8px 16px;
    }
}

/* Override WebRotate360 library default white background */
.wr360_player {
    background-color: #f1f1f1 !important;
}

/* Force system fonts for 360 viewer elements */
.play-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
