/**
 * Immersive Tours PRO - Viewer Styles
 * Main viewer and interface styling
 *
 * @package ImmersiveToursPro
 * @since 1.0.0
 */

/* ===== Viewer Container ===== */
.itp-viewer-container {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.itp-panorama {
    width: 100%;
    background: #000;
    position: relative;
}

/* ===== Loading Screen ===== */
.itp-loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.itp-loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.itp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: itp-spin 0.8s linear infinite;
}

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

.itp-loading-text {
    color: #fff;
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
}

/* ===== Controls ===== */
.itp-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.itp-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.itp-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.itp-btn:active {
    transform: scale(0.95);
}

.itp-btn.active {
    background: rgba(0, 115, 170, 0.9);
}

.itp-btn svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.itp-btn-calibrate {
    display: none;
}

/* ===== Side Panel ===== */
.itp-side-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow-y: auto;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
}

.itp-side-panel.itp-panel-visible {
    transform: translateX(0);
}

.itp-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    transition: all 0.2s ease;
}

.itp-panel-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.itp-panel-close svg {
    width: 20px;
    height: 20px;
}

.itp-panel-content {
    padding: 20px;
    padding-top: 60px;
}

/* ===== Map Container ===== */
.itp-map-container {
    position: relative;
    width: 100%;
}

.itp-map-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.itp-map-pins-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.itp-map-pin {
    position: absolute;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    background: rgba(0, 115, 170, 0.9);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: all;
}

.itp-map-pin:hover {
    transform: scale(1.2);
    background: rgba(0, 115, 170, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.itp-map-pin.active {
    background: rgba(218, 165, 32, 0.9);
    border-color: #fff;
    animation: itp-pin-pulse 2s ease-in-out infinite;
}

@keyframes itp-pin-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.itp-pin-number {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

/* ===== Overlays ===== */
.itp-overlay-content {
    color: #333;
}

.itp-overlay-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #111;
}

.itp-overlay-body {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.itp-overlay-body p {
    margin: 0 0 15px 0;
}

.itp-overlay-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

/* ===== Error Messages ===== */
.itp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #f5c6cb;
    font-size: 14px;
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
    .itp-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }

    .itp-btn {
        width: 40px;
        height: 40px;
    }

    .itp-btn svg {
        width: 20px;
        height: 20px;
    }

    .itp-side-panel {
        width: 100%;
        max-width: 100%;
    }

    .itp-panel-content {
        padding: 15px;
        padding-top: 50px;
    }

    .itp-overlay-title {
        font-size: 20px;
    }

    .itp-overlay-body {
        font-size: 14px;
    }
}

/* ===== Fullscreen Mode ===== */
.itp-viewer-container:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.itp-viewer-container:-webkit-full-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.itp-viewer-container:-moz-full-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.itp-viewer-container:-ms-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
}
/**
 * Immersive Tours PRO - Hotspots Styles
 * Hotspot markers and overlay content
 *
 * @package ImmersiveToursPro
 * @since 1.0.0
 */

/* ===== Hotspot Markers ===== */
.itp-hotspot {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: itp-hotspot-pulse 2s ease-in-out infinite;
}

.itp-hotspot:hover {
    transform: scale(1.2);
    animation: none;
}

.itp-hotspot svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes itp-hotspot-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ===== Hotspot Type Specific Colors ===== */
.itp-hotspot-info svg circle {
    fill: rgba(0, 115, 170, 0.9);
}

.itp-hotspot-media svg circle {
    fill: rgba(139, 0, 139, 0.9);
}

.itp-hotspot-video svg circle {
    fill: rgba(220, 20, 60, 0.9);
}

.itp-hotspot-audio svg circle {
    fill: rgba(255, 140, 0, 0.9);
}

.itp-hotspot-link svg circle {
    fill: rgba(0, 128, 0, 0.9);
}

.itp-hotspot-go_to_room svg circle {
    fill: rgba(218, 165, 32, 0.9);
}

/* ===== Gallery Overlay ===== */
.itp-overlay-media {
    padding: 0;
}

.itp-gallery-carousel {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.itp-gallery-slide {
    display: none;
    width: 100%;
}

.itp-gallery-slide.active {
    display: block;
}

.itp-gallery-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.itp-gallery-caption {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px 20px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.itp-gallery-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f5f5f5;
}

.itp-gallery-prev,
.itp-gallery-next {
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.itp-gallery-prev:hover,
.itp-gallery-next:hover {
    background: rgba(0, 0, 0, 0.1);
}

.itp-gallery-prev svg,
.itp-gallery-next svg {
    width: 24px;
    height: 24px;
    display: block;
}

.itp-gallery-counter {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.itp-gallery-current {
    color: #0073aa;
}

/* ===== Video Overlay ===== */
.itp-overlay-video {
    padding: 0;
}

.itp-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.itp-video-container iframe,
.itp-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Audio Overlay ===== */
.itp-overlay-audio {
    padding: 20px;
}

.itp-audio-player {
    margin-top: 20px;
}

.itp-audio-player audio {
    width: 100%;
    border-radius: 8px;
}

/* ===== Info Overlay ===== */
.itp-overlay-info {
    padding: 20px;
}

.itp-overlay-info h3 {
    margin-top: 0;
}

/* ===== Responsive Hotspots ===== */
@media screen and (max-width: 768px) {
    .itp-hotspot {
        width: 35px;
        height: 35px;
    }

    .itp-gallery-carousel {
        min-height: 200px;
    }

    .itp-gallery-nav {
        padding: 10px 15px;
    }

    .itp-gallery-caption {
        padding: 12px 15px;
        font-size: 13px;
    }

    .itp-overlay-audio,
    .itp-overlay-info {
        padding: 15px;
    }
}

/* ===== Gyroscope Notification ===== */
.itp-gyro-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
}
