/**
 * Virtual Tour 360° - Viewer Styles
 */

/* CSS Variables */
:root {
    --vt360-primary-color: #667eea;
    --vt360-secondary-color: #764ba2;
    --vt360-text-color: #333;
    --vt360-bg-color: #f8f9fa;
    --vt360-border-radius: 12px;
    --vt360-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Container */
.vt360-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.vt360-container * {
    box-sizing: border-box;
}

/* Login Wrapper */
.vt360-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background: linear-gradient(135deg, var(--vt360-primary-color) 0%, var(--vt360-secondary-color) 100%);
    border-radius: var(--vt360-border-radius);
    padding: 40px 20px;
}

/* Login layout: flex container for side photos + center login */
.vt360-login-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1100px;
}

/* Center column holding login box + free text */
.vt360-login-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

/* Side photos */
.vt360-login-side-photo {
    flex: 1;
    max-width: 280px;
    min-width: 160px;
}

.vt360-login-side-photo img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--vt360-border-radius);
}

/* Free text below the login box */
.vt360-login-free-text {
    margin-top: 20px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.vt360-login-free-text a {
    color: #fff;
    text-decoration: underline;
}

.vt360-login-free-text a:hover {
    opacity: 0.85;
}

.vt360-login-box {
    background: #fff;
    border-radius: var(--vt360-border-radius);
    box-shadow: var(--vt360-shadow);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.vt360-login-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    color: var(--vt360-text-color);
}

.vt360-tour-title {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
}

/* Login cover image */
.vt360-login-cover {
    margin-bottom: 25px;
    text-align: center;
}

.vt360-login-cover img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.vt360-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.vt360-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--vt360-text-color);
}

.vt360-form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.vt360-form-group input:focus {
    outline: none;
    border-color: var(--vt360-primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vt360-form-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.vt360-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--vt360-primary-color) 0%, var(--vt360-secondary-color) 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.vt360-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.vt360-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.vt360-spinner {
    width: 24px;
    height: 24px;
    animation: vt360-spin 1s linear infinite;
}

@keyframes vt360-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Viewer Wrapper */
.vt360-viewer-wrapper {
    position: relative;
    background: #000;
    border-radius: var(--vt360-border-radius);
    overflow: hidden;
}

.vt360-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    color: #fff;
}

.vt360-visitor-info {
    font-size: 14px;
}

.vt360-visitor-name {
    font-weight: 600;
}

.vt360-fullscreen-btn {
    width: 40px;
    height: 40px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.vt360-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.vt360-fullscreen-btn svg {
    width: 100%;
    height: 100%;
    stroke: #fff;
}

/* Viewer */
.vt360-viewer {
    width: 100%;
    height: 500px;
}

.vt360-fullscreen .vt360-viewer {
    height: calc(100vh - 120px);
}

/* Current zone indicator */
.vt360-current-zone {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}

.vt360-welcome-message {
    max-width: 300px;
    text-align: center;
    line-height: 1.5;
}

/* Photos Navigation */
.vt360-photos-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.vt360-photos-nav::-webkit-scrollbar {
    height: 6px;
}

.vt360-photos-nav::-webkit-scrollbar-track {
    background: transparent;
}

.vt360-photos-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.vt360-nav-item {
    flex-shrink: 0;
    width: 80px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.7;
}

.vt360-nav-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.vt360-nav-item.active {
    opacity: 1;
}

.vt360-nav-item.active img {
    border-color: var(--vt360-primary-color);
}

.vt360-nav-item img {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.vt360-nav-item-name {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hotspots */
.vt360-hotspot {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: vt360-pulse 2s infinite;
}

.vt360-hotspot:hover {
    transform: scale(1.2);
}

.vt360-hotspot-zone {
    background: #00b4ec;
    box-shadow: 0 4px 15px rgba(0, 180, 236, 0.5);
}

.vt360-hotspot-info {
    background: #fff;
    border: 3px solid #00b4ec;
    box-shadow: 0 4px 15px rgba(0, 180, 236, 0.4);
}

.vt360-hotspot-zone .vt360-hotspot-icon {
    color: #fff;
    font-size: 22px;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
}

.vt360-hotspot-info .vt360-hotspot-icon {
    color: #00b4ec;
    font-size: 20px;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
}

/* Walking person SVG icon for zone hotspots */
.vt360-hotspot-zone .vt360-hotspot-icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

@keyframes vt360-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 180, 236, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(0, 180, 236, 0);
    }
}

/* Info Popup */
.vt360-info-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
}

.vt360-info-popup-content {
    position: relative;
    background: #fff;
    border-radius: var(--vt360-border-radius);
    padding: 30px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.vt360-info-popup-content h4 {
    margin: 0 0 15px;
    font-size: 18px;
    color: var(--vt360-text-color);
}

.vt360-info-popup-body {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.vt360-info-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.vt360-info-popup-close:hover {
    color: #333;
}

/* Media in info popup */
.vt360-info-popup-media {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.vt360-info-popup-media img,
.vt360-info-popup-media video {
    width: 100%;
    height: auto;
    display: block;
}

/* Watermark */
.vt360-watermark {
    position: absolute;
    bottom: 100px;
    right: 20px;
    z-index: 90;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.8);
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
}

.vt360-watermark:hover {
    opacity: 1;
    transform: scale(1.05);
}

.vt360-watermark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Watermark without circle */
.vt360-watermark.vt360-watermark-square {
    border-radius: 8px;
    border: none;
    width: auto;
    height: auto;
    max-width: 100px;
}

.vt360-watermark.vt360-watermark-square img {
    width: auto;
    height: auto;
    max-width: 100px;
    max-height: 100px;
}

/* Fullscreen mode */
.vt360-container.vt360-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    max-width: none;
    border-radius: 0;
}

.vt360-container.vt360-fullscreen .vt360-viewer-wrapper {
    height: 100%;
    border-radius: 0;
}

.vt360-container.vt360-fullscreen .vt360-viewer {
    height: calc(100vh - 100px);
}

/* Error message */
.vt360-error {
    padding: 20px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    text-align: center;
}

/* Responsive */
@media (max-width: 960px) {
    .vt360-login-layout {
        gap: 20px;
    }

    .vt360-login-side-photo {
        max-width: 200px;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .vt360-login-layout {
        flex-direction: column;
        gap: 20px;
    }

    .vt360-login-layout.vt360-login-layout--with-photos {
        flex-direction: column;
    }

    .vt360-login-side-photo {
        max-width: 280px;
        width: 100%;
        order: 0;
    }

    .vt360-login-side-photo--left {
        order: -1;
    }

    .vt360-login-side-photo--right {
        order: 1;
    }

    .vt360-login-center {
        order: 0;
    }

    .vt360-login-side-photo img {
        max-height: 200px;
        width: 100%;
    }

    .vt360-login-box {
        padding: 30px 20px;
    }

    .vt360-login-header h2 {
        font-size: 20px;
    }

    .vt360-viewer {
        height: 400px;
    }

    .vt360-viewer-header {
        padding: 10px 15px;
    }

    .vt360-current-zone {
        bottom: 90px;
        font-size: 12px;
        padding: 8px 16px;
    }

    .vt360-nav-item {
        width: 60px;
    }

    .vt360-nav-item img {
        height: 40px;
    }

    .vt360-nav-item-name {
        font-size: 10px;
    }

    .vt360-hotspot {
        width: 35px;
        height: 35px;
    }

    .vt360-hotspot-icon {
        font-size: 14px;
    }
}