/* Visor Anatómico 3D Pro - Clean Light Theme */

.visor3d-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
    color: #1e293b;
    transition: all 0.3s ease;
}

.visor3d-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 15px;
}

.visor3d-title {
    font-weight: 600;
    font-size: 16px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visor3d-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.visor3d-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff !important;
    color: #0284c7 !important;
    border: 1px solid #0284c7 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
    outline: none !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.visor3d-fullscreen-btn:hover {
    background: #f0f9ff !important;
    border-color: #0369a1 !important;
    color: #0369a1 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.2);
}

.visor3d-fullscreen-btn:active {
    transform: translateY(0);
}

.visor3d-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    outline: none !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.visor3d-toggle-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.visor3d-toggle-btn:active {
    transform: translateY(0);
}

.visor3d-toggle-btn.is-active {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.visor3d-toggle-btn.is-loading {
    opacity: 0.75;
    cursor: wait;
}

.visor3d-btn-icon {
    font-size: 16px;
}

/* Fullscreen Mode Container & View Wrapper Adjustments */
.visor3d-container:fullscreen,
.visor3d-container:-webkit-full-screen,
.visor3d-container:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
}

.visor3d-container:fullscreen .visor3d-view-wrapper,
.visor3d-container:-webkit-full-screen .visor3d-view-wrapper,
.visor3d-container:-moz-full-screen .visor3d-view-wrapper {
    flex: 1;
    height: calc(100vh - 60px) !important;
    min-height: auto !important;
    aspect-ratio: auto !important;
}

.visor3d-view-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 380px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.visor3d-2d-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    background: #f8fafc;
}

.visor3d-poster-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Prevents image cropping for any resolution */
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: block;
    transition: transform 0.3s ease;
}

.visor3d-container:hover .visor3d-poster-img {
    transform: scale(1.01);
}

.visor3d-3d-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.visor3d-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Restriction Notice Banner */
.visor3d-notice-banner {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 550px;
    background: rgba(254, 242, 242, 0.95);
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 14px 20px;
    color: #991b1b;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    z-index: 10;
    animation: fadeInUp 0.3s ease-out;
}

.visor3d-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 10px 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 15px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (max-width: 600px) {
    .visor3d-header-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .visor3d-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}
