/**
 * Modern Lightbox Styles for Airbnb Gallery
 * Beautiful, smooth animations with professional design
 */

.airbnb-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.airbnb-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.airbnb-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 60px 60px;
}

/* Header */
.airbnb-lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    z-index: 10;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 100%);
}

/* Close button */
.airbnb-lightbox-close {
    background: transparent;
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    order: 2;
}

.airbnb-lightbox-close svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.airbnb-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.airbnb-lightbox-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Counter */
.airbnb-lightbox-counter {
    color: white;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    order: 1;
}

.airbnb-lightbox-counter .current {
    font-weight: 700;
}

/* Image wrapper */
.airbnb-lightbox-image-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.airbnb-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.airbnb-lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Loader */
.airbnb-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.airbnb-lightbox-loader.visible {
    opacity: 1;
}

.airbnb-lightbox-loader .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Navigation buttons */
.airbnb-lightbox-prev,
.airbnb-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: #222;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    padding: 0;
}

.airbnb-lightbox-prev svg,
.airbnb-lightbox-next svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.airbnb-lightbox-prev {
    left: 32px;
}

.airbnb-lightbox-next {
    right: 32px;
}

.airbnb-lightbox-prev:hover,
.airbnb-lightbox-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.airbnb-lightbox-prev:active,
.airbnb-lightbox-next:active {
    transform: translateY(-50%) scale(1.05);
}

/* Title */
.airbnb-lightbox-title {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    max-width: 80%;
    text-align: center;
    display: none;
}

/* Open animation */
.airbnb-lightbox.is-open .airbnb-lightbox-overlay {
    animation: fadeIn 0.3s ease;
}

.airbnb-lightbox.is-open .airbnb-lightbox-header,
.airbnb-lightbox.is-open .airbnb-lightbox-prev,
.airbnb-lightbox.is-open .airbnb-lightbox-next {
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .airbnb-lightbox-content {
        padding: 70px 40px 50px;
    }
    
    .airbnb-lightbox-header {
        padding: 20px 24px;
    }
    
    .airbnb-lightbox-prev,
    .airbnb-lightbox-next {
        width: 48px;
        height: 48px;
    }
    
    .airbnb-lightbox-prev {
        left: 24px;
    }
    
    .airbnb-lightbox-next {
        right: 24px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .airbnb-lightbox-content {
        padding: 60px 20px 40px;
    }
    
    .airbnb-lightbox-header {
        padding: 16px 16px;
    }
    
    .airbnb-lightbox-close {
        width: 40px;
        height: 40px;
    }
    
    .airbnb-lightbox-close svg {
        width: 20px;
        height: 20px;
    }
    
    .airbnb-lightbox-counter {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .airbnb-lightbox-prev,
    .airbnb-lightbox-next {
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
    }
    
    .airbnb-lightbox-prev svg,
    .airbnb-lightbox-next svg {
        width: 20px;
        height: 20px;
    }
    
    .airbnb-lightbox-prev {
        left: 16px;
    }
    
    .airbnb-lightbox-next {
        right: 16px;
    }
    
    .airbnb-lightbox-title {
        font-size: 13px;
        padding: 10px 20px;
        bottom: 24px;
        max-width: 90%;
    }
    
    .airbnb-lightbox-image {
        border-radius: 8px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .airbnb-lightbox-prev,
    .airbnb-lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .airbnb-lightbox-prev {
        left: 8px;
    }
    
    .airbnb-lightbox-next {
        right: 8px;
    }
}

