/**
 * Frontend CSS for S360 Facility Manager
 * Styles for image carousel functionality
 */

/* Carousel Overlay */
.s360-carousel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Prevent body scroll when carousel is open */
body.s360-carousel-open {
    overflow: hidden;
}

/* Carousel Container */
.s360-carousel-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Close Button */
.s360-carousel-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.s360-carousel-close:hover {
    opacity: 0.7;
}

/* Carousel Content */
.s360-carousel-content {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-height: calc(90vh - 80px);
}

/* Navigation Buttons */
.s360-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10001;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    padding: 0;
    margin: 0;
    font-size: 0;
}

/* Navigation content is now handled dynamically via JavaScript */
.s360-carousel-prev,
.s360-carousel-next {
    font-size: 40px !important;
    line-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
}

.s360-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.s360-carousel-prev {
    left: 20px;
    height: auto;
}

.s360-carousel-next {
    right: 20px;
    height: auto;
}

/* Remove font-size override from nav base class since content is now dynamic */

/* Images Container */
.s360-carousel-images {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Individual Slides */
.s360-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.s360-carousel-slide.active {
    opacity: 1;
}

.s360-carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Counter */
.s360-carousel-counter {
    margin-top: 20px;
    color: white;
    font-size: 16px;
    text-align: center;
}

/* Hero Image Container */
.hero-image-container {
    position: relative;
    width: 100%;
    height: auto;
}

.hero-image-container img {
    display: block;
    width: 100%;
    height: auto;
}

/* Hero Image Button Styles */
.hero-image-button {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease;
}

.hero-image-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

.hero-image-button .camera-icon {
    font-size: 16px;
}

/* Position classes for hero button */
.position-bottom-right {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .s360-carousel-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .s360-carousel-close {
        top: -40px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .s360-carousel-nav {
        font-size: 40px;
        width: 50px;
        height: 50px;
    }
    
    .s360-carousel-prev {
        left: 10px;
    }
    
    .s360-carousel-next {
        right: 10px;
    }
    
    .hero-image-button {
        font-size: 12px;
        padding: 6px 10px;
    }
}
