/* Virtual Tour Button Overlay Styles */

/* Themeable variables (override these in theme/custom CSS as needed) */
:root {
	--vtbo-bg-color: #80191a;
	--vtbo-icon-color: #ffffff;
}

/* --- Button Overlay --- */
.pannellum-viewer .vtbo-button-overlay { 
	position: absolute; 
	z-index: 1000; 
	pointer-events: auto; 
}

/* Positions */
.pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus { 
	top: 9vh !important; 
	right: 3% !important; 
	bottom: auto !important; 
	left: auto !important; 
}
.pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact { 
	bottom: calc(20px + 2vh) !important; 
	right: 3% !important; 
	top: auto !important; 
	left: auto !important; 
}

/* Button core (circle) - MAXIMUM SPECIFICITY */
.pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a,
.pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button,
.pannellum-viewer .vtbo-button-overlay > a,
.pannellum-viewer .vtbo-button-overlay > button,
.pannellum-viewer .vtbo-button-overlay .vtbo-btn,
.vtbo-button-overlay > a,
.vtbo-button-overlay > button,
.vtbo-button-overlay .vtbo-btn { 
    width: 44px !important;
    height: 44px !important;
    border-radius: 99%;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    text-decoration: none;
    border: 0;
    border-width: 0;
    background: var(--vtbo-bg-color) !important;
    background-color: var(--vtbo-bg-color) !important;
    background-image: none !important;
    color: var(--vtbo-icon-color) !important;
    line-height: 1;
    cursor: pointer;
}

/* Icon - MAXIMUM SPECIFICITY */
.pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a > i,
.pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button > i,
.pannellum-viewer .vtbo-button-overlay > a > i,
.pannellum-viewer .vtbo-button-overlay > button > i,
.pannellum-viewer .vtbo-button-overlay .vtbo-icon,
.vtbo-button-overlay > a > i,
.vtbo-button-overlay > button > i,
.vtbo-button-overlay .vtbo-icon { 
	color: var(--vtbo-icon-color) !important;
    background: transparent;
    background-color: transparent;
    background-image: none;
	font-size: 18px;
	line-height: 1;
}

/* Hover (no color change per spec) */
.pannellum-viewer .vtbo-button-overlay > a:hover,
.pannellum-viewer .vtbo-button-overlay > button:hover,
.pannellum-viewer .vtbo-button-overlay .vtbo-btn:hover { 
	transform: translateY(-2px);
	box-shadow: none;
    background: var(--vtbo-bg-color) !important;
    background-color: var(--vtbo-bg-color) !important;
    background-image: none;
}

/* Active state */
.pannellum-viewer .vtbo-button-overlay > a:active,
.pannellum-viewer .vtbo-button-overlay > button:active,
.pannellum-viewer .vtbo-button-overlay .vtbo-btn:active {
    transform: translateY(0);
    background: var(--vtbo-bg-color) !important;
    background-color: var(--vtbo-bg-color) !important;
    background-image: none;
}

/* Remove ALL pseudo-elements that could interfere - CRITICAL */
.pannellum-viewer .vtbo-button-overlay > a::before,
.pannellum-viewer .vtbo-button-overlay > a::after,
.pannellum-viewer .vtbo-button-overlay > button::before,
.pannellum-viewer .vtbo-button-overlay > button::after,
.pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a::before,
.pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a::after,
.pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button::before,
.pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button::after {
    display: none;
    content: none;
    background: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
    border: none;
    width: 0;
    height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* NOTE: Do not hide pseudo-elements on <i> because Font Awesome uses ::before */

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Tablet styles */
    .pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus {
        right: 5% !important;
        left: auto !important;
        top: 11vh !important;
    }

    .pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact {
        right: 6% !important;
        left: auto !important;
        bottom: calc(20px + 2vh) !important;
    }

    .pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a,
    .pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button,
    .pannellum-viewer .vtbo-button-overlay > a,
    .pannellum-viewer .vtbo-button-overlay > button,
    .pannellum-viewer .vtbo-button-overlay .vtbo-btn {
        width: 35px !important;
        height: 35px !important;
        margin: 0 !important;
        transform: none !important;
    }

    .pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a > i,
    .pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button > i,
    .pannellum-viewer .vtbo-button-overlay > a > i,
    .pannellum-viewer .vtbo-button-overlay > button > i,
    .pannellum-viewer .vtbo-button-overlay .vtbo-icon {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    /* Phone styles */
	.pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus {
        right: 8% !important;
        left: auto !important;
        top: 11vh !important;
    }

    .pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact {
        right: 9% !important;
        left: auto !important;
        bottom: calc(20px + 2vh) !important;
    }
	
    .pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a,
    .pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button,
    .pannellum-viewer .vtbo-button-overlay > a,
    .pannellum-viewer .vtbo-button-overlay > button,
    .pannellum-viewer .vtbo-button-overlay .vtbo-btn {
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
        transform: none !important;
    }

    .pannellum-viewer .vtbo-button-overlay.vtbo-download-prospectus > a > i,
    .pannellum-viewer .vtbo-button-overlay.vtbo-fun-fact > button > i,
    .pannellum-viewer .vtbo-button-overlay > a > i,
    .pannellum-viewer .vtbo-button-overlay > button > i,
    .pannellum-viewer .vtbo-button-overlay .vtbo-icon {
        font-size: 18px !important;
    }
}

/* Hidden state */
.vtbo-button-overlay.hidden {
    display: none;
}

/* Modal overlay styles */
.vtbo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.vtbo-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.vtbo-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.vtbo-modal-overlay.active .vtbo-modal-content {
    transform: scale(1);
}
.vtbo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}
.vtbo-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}
.vtbo-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.vtbo-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}
.vtbo-modal-body {
    color: #555;
    line-height: 1.6;
    font-size: 16px;
}

/* Loading state */
.vtbo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}
.vtbo-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: vtbo-spin 1s linear infinite;
    margin-right: 10px;
}
@keyframes vtbo-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.vtbo-error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    background: #fdf2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* Debug styles */
.vtbo-debug {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
}

/* Responsive design for modal */
@media (max-width: 768px) {
    .vtbo-modal-content {
        padding: 20px;
        width: 95%;
    }
    .vtbo-modal-title {
        font-size: 20px;
    }
}

/* VTBO color overrides (scoped to pannellum viewer) */
.pannellum-viewer {
	--vtbo-bg-color: #80191a;   /* background */
	--vtbo-icon-color: #ffffff; /* icon */
}