/* ============================================
   OUTLET CAROUSEL STYLES - FINAL VERSION (DENGAN EVENT CAROUSEL)
   Untuk carousel gambar di outlet selection termasuk Event
============================================ */

/* Container untuk carousel di dalam outlet card */
.outlet-card .card-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    height: 450px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    cursor: pointer;
}

/* Event carousel khusus - bisa dikustomisasi */
#eventCarousel .card-img-container {
    /* Warna background khusus untuk event jika diperlukan */
    background: linear-gradient(45deg, #fff5f5, #ffe3e3);
}

/* Carousel wrapper */
.outlet-carousel {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Carousel item */
.outlet-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.outlet-carousel-item.active {
    opacity: 1;
    z-index: 2;
}

/* Carousel image */
.outlet-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    user-select: none;
    -webkit-user-select: none;
}

.outlet-carousel:hover .outlet-carousel-img {
    transform: scale(1.05);
}

/* ===== DESKTOP NAVIGATION CONTROLS ===== */

/* Navigation controls - Desktop only */
.outlet-carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.outlet-carousel-controls .outlet-carousel-btn {
    pointer-events: all;
}

.outlet-card:hover .outlet-carousel-controls {
    opacity: 1;
}

.outlet-carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    outline: none;
}

.outlet-carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.outlet-carousel-btn:active {
    transform: scale(0.95);
}

.outlet-carousel-btn.prev::before {
    content: "←";
    font-weight: bold;
    transform: translateX(-1px);
}

.outlet-carousel-btn.next::before {
    content: "→";
    font-weight: bold;
    transform: translateX(1px);
}

/* ===== MOBILE NAVIGATION BUTTONS ===== */

/* Mobile controls - Always visible on mobile */
.outlet-mobile-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: none;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
    pointer-events: none;
}

.outlet-mobile-controls .outlet-mobile-btn {
    pointer-events: all;
}

.outlet-mobile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    outline: none;
}

.outlet-mobile-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.outlet-mobile-btn:active {
    transform: scale(0.95);
}

/* Indicators - Desktop only */
.outlet-carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    padding: 5px;
}

.outlet-carousel-indicators .outlet-carousel-indicator {
    pointer-events: all;
}

.outlet-card:hover .outlet-carousel-indicators {
    opacity: 1;
}

.outlet-carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    outline: none;
}

.outlet-carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.outlet-carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* Slide info text */
.outlet-slide-info {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.outlet-card:hover .outlet-slide-info {
    opacity: 1;
}

/* Event carousel khusus - style untuk info slide event */
#eventCarousel .outlet-slide-info {
    background: rgba(231, 76, 60, 0.8); /* Warna merah untuk event */
    font-weight: 600;
}

/* Auto-slide indicator */
.outlet-auto-slide-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(2px);
}

.outlet-card:hover .outlet-auto-slide-indicator {
    opacity: 1;
}

.outlet-auto-slide-indicator:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Event carousel auto-slide indicator */
#eventCarousel .outlet-auto-slide-indicator {
    background: rgba(231, 76, 60, 0.7);
}

#eventCarousel .outlet-auto-slide-indicator:hover {
    background: rgba(231, 76, 60, 0.9);
}

/* Loading state */
.outlet-carousel-img.loading {
    filter: blur(5px);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
}

/* Error state */
.outlet-carousel-item.error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f5f5f5, #e0e0e0);
}

.outlet-carousel-item.error::before {
    content: "Gambar tidak tersedia";
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    padding: 20px;
}

/* ===== ANIMASI DAN TRANSISI ===== */
.outlet-carousel-item {
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Animasi untuk fade in/out */
@keyframes carouselFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.outlet-carousel-item.active {
    animation: carouselFadeIn 0.5s ease;
}

/* ===== TOUCH SUPPORT ===== */
.outlet-carousel {
    touch-action: pan-y pinch-zoom;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .outlet-card .card-img-container {
        background: linear-gradient(45deg, #2d3748, #4a5568);
    }
    
    .outlet-carousel-btn {
        background: rgba(45, 55, 72, 0.9);
        color: #e2e8f0;
    }
    
    .outlet-carousel-indicator {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .outlet-carousel-indicator.active {
        background: rgba(255, 255, 255, 0.8);
    }
    
    .outlet-slide-info {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */
@media (max-width: 767.98px) {
    /* Show mobile controls and hide desktop controls */
    .outlet-mobile-controls {
        display: flex !important;
    }
    
    .outlet-carousel-controls {
        display: none !important;
    }
    
    /* Always show slide info and auto-slide indicator on mobile */
    .outlet-slide-info,
    .outlet-auto-slide-indicator {
        opacity: 1 !important;
        display: block !important;
    }
    
    .outlet-slide-info {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .outlet-auto-slide-indicator {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    
    /* Hide desktop indicators on mobile */
    .outlet-carousel-indicators {
        display: none !important;
    }
    
    /* Adjust image container height for mobile */
    .outlet-card .card-img-container {
        height: 200px;
    }
    
    /* Mobile buttons styling */
    .outlet-mobile-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    /* Prevent hover effects on touch devices */
    @media (hover: none) and (pointer: coarse) {
        .outlet-carousel:hover .outlet-carousel-img {
            transform: none;
        }
        
        .outlet-card:hover .outlet-carousel-controls,
        .outlet-card:hover .outlet-carousel-indicators,
        .outlet-card:hover .outlet-slide-info,
        .outlet-card:hover .outlet-auto-slide-indicator {
            opacity: 0 !important;
        }
        
        .outlet-mobile-controls {
            opacity: 0.8 !important;
        }
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .outlet-card .card-img-container {
        height: 240px;
    }
    
    .outlet-mobile-controls {
        display: none;
    }
    
    .outlet-carousel-controls {
        display: flex;
    }
    
    /* Show indicators on tablet hover */
    .outlet-card:hover .outlet-carousel-indicators {
        opacity: 1;
    }
}

/* Desktop hover effects */
@media (min-width: 1025px) {
    .outlet-carousel-controls {
        display: flex;
    }
    
    .outlet-mobile-controls {
        display: none;
    }
    
    /* Smooth hover transitions */
    .outlet-card {
        transition: transform 0.3s ease;
    }
    
    .outlet-card:hover {
        transform: translateY(-2px);
    }
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */

/* Prevent text selection */
.outlet-carousel,
.outlet-carousel-btn,
.outlet-mobile-btn,
.outlet-carousel-indicator {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Accessibility improvements */
.outlet-carousel-btn:focus,
.outlet-mobile-btn:focus,
.outlet-carousel-indicator:focus,
.outlet-auto-slide-indicator:focus {
    outline: 2px solid #4d90fe;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(77, 144, 254, 0.3);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .outlet-carousel-btn {
        background: rgba(255, 255, 255, 1);
        border: 2px solid #000;
    }
    
    .outlet-carousel-indicator {
        border: 2px solid #000;
    }
    
    .outlet-carousel-indicator.active {
        background: #000;
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .outlet-carousel-item,
    .outlet-carousel-img,
    .outlet-carousel-btn,
    .outlet-mobile-btn,
    .outlet-carousel-indicator {
        transition: none !important;
        animation: none !important;
    }
    
    .outlet-carousel:hover .outlet-carousel-img {
        transform: none;
    }
    
    .outlet-carousel-item.active {
        animation: none;
    }
}

/* Performance optimization */
.outlet-carousel-img {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
}

/* Loading skeleton */
.outlet-carousel-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    display: none;
}

.outlet-carousel.loading .outlet-carousel-skeleton {
    display: block;
}

.outlet-carousel.loading .outlet-carousel-item {
    display: none;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print styles */
@media print {
    .outlet-carousel-controls,
    .outlet-mobile-controls,
    .outlet-carousel-indicators,
    .outlet-slide-info,
    .outlet-auto-slide-indicator {
        display: none !important;
    }
    
    .outlet-carousel-item {
        position: relative !important;
        opacity: 1 !important;
        page-break-inside: avoid;
    }
    
    .outlet-carousel-item:not(.active) {
        display: none !important;
    }
}

/* ============================================
   CUSTOM SCROLLBAR FOR OUTLET BOOKING PAGE
   Warna: #FFD700 (Gold) dengan tema yang relevan
   Hanya untuk halaman booking outlet
============================================ */

/* ===== 1. RIGHT PANEL SCROLLBAR ===== */

/* Container untuk right panel yang scrollable */
.outlets-container {
    scroll-behavior: smooth;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #FFD700 rgba(255, 215, 0, 0.1); /* Firefox */
}

/* WebKit Scrollbar (Chrome, Safari, Edge) */
.outlets-container::-webkit-scrollbar {
    width: 10px;
}

.outlets-container::-webkit-scrollbar-track {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    margin: 5px 0;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.outlets-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-clip: padding-box;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        0 2px 8px rgba(255, 215, 0, 0.4);
}

.outlets-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFE44D 0%, #FFB733 100%);
    transform: scale(1.05);
    box-shadow: 
        inset 0 2px 6px rgba(255, 255, 255, 0.4),
        0 4px 12px rgba(255, 215, 0, 0.5);
}

.outlets-container::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: scale(0.98);
}

/* Animation untuk scrollbar thumb */
@keyframes scrollbarGlow {
    0% { 
        box-shadow: 
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% { 
        box-shadow: 
            inset 0 2px 6px rgba(255, 255, 255, 0.4),
            0 4px 15px rgba(255, 215, 0, 0.6);
    }
    100% { 
        box-shadow: 
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            0 2px 8px rgba(255, 215, 0, 0.4);
    }
}

.outlets-container::-webkit-scrollbar-thumb {
    animation: scrollbarGlow 3s infinite ease-in-out;
}

/* Smooth fade-in untuk scrollbar */
.outlets-container {
    transition: scrollbar-color 0.3s ease;
}

/* ===== 2. MOBILE OPTIMIZATION ===== */
@media (max-width: 767.98px) {
    /* Hide custom scrollbar on mobile (gunakan default) */
    .outlets-container::-webkit-scrollbar {
        width: 6px;
        display: none; /* Sembunyikan di mobile untuk UI yang lebih bersih */
    }
    
    .outlets-container {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .outlets-container::-webkit-scrollbar-track,
    .outlets-container::-webkit-scrollbar-thumb {
        display: none;
    }
}

/* ===== 3. ACCESSIBILITY ===== */
/* Pastikan scrollbar tetap terlihat dengan baik untuk aksesibilitas */
@media (prefers-reduced-motion: reduce) {
    .outlets-container::-webkit-scrollbar-thumb {
        animation: none;
    }
    
    .outlets-container {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .outlets-container::-webkit-scrollbar-thumb {
        background: #FFD700;
        border: 2px solid #000000;
    }
    
    .outlets-container::-webkit-scrollbar-track {
        background: #000000;
        border: 1px solid #FFFFFF;
    }
}

/* ===== 4. SCROLL INDICATOR STYLING ===== */
/* Pastikan scroll indicator tetap terlihat */
.scroll-indicator {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    padding: 0.5rem 1rem;
    margin: 0 0 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #cccccc;
    text-align: center;
    z-index: 10;
    width: 100%;
}

.scroll-indicator i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* ===== 5. ENHANCED SCROLLING EXPERIENCE ===== */
/* Smooth scrolling untuk konten */
.outlets-container {
    -webkit-overflow-scrolling: touch; /* Untuk smooth scrolling di iOS */
    overflow-anchor: auto; /* Mencegah konten melompat saat scroll */
}

/* ===== 6. SCROLLBAR POSITION FIX ===== */
/* Pastikan scrollbar tidak menutupi konten */
@media (min-width: 768px) {
    .outlets-container {
        padding-right: 5px; /* Memberi ruang untuk scrollbar */
    }
    
    /* Saat hover, beri padding lebih untuk scrollbar yang membesar */
    .outlets-container:hover {
        padding-right: 8px;
    }
}

/* ===== 7. OUTLET CONTAINER LAYOUT ENHANCEMENT ===== */
/* Pastikan container outlet memiliki layout yang tepat */
.outlets-container {
    height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding: 0 15px 20px 0;
    max-height: 100%;
}

/* ===== 8. OUTLET CARD STYLING (Jika belum ada) ===== */
.outlet-card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.outlet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
}

.outlet-card .card-body {
    padding: 1.5rem;
}

.outlet-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.outlet-address {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.booking-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.booking-btn:hover {
    background: linear-gradient(135deg, #FFE44D, #FFB733);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* ===== 9. RESPONSIVE ADJUSTMENTS ===== */
@media (min-width: 768px) {
    .main-content .container-fluid > .row {
        display: flex;
        align-items: stretch;
        min-height: 600px;
    }
    
    .col-lg-6 {
        display: flex;
        flex-direction: column;
    }
    
    .left-panel {
        height: 750px;
        max-height: 750px;
    }
    
    .left-panel .carousel-container {
        height: 100%;
        flex: 1;
    }
    
    .right-panel {
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        height: 750px;
        max-height: 750px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding-left: 15px !important;
    }
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 5px 0 0 0 !important;
        min-height: calc(100vh - 120px);
    }
    
    .main-content .container-fluid > .row {
        display: block;
    }
    
    .col-lg-6 {
        display: block;
    }
    
    .left-panel {
        padding: 0 !important;
        margin: 0 !important;
        width: 100%;
        height: auto !important;
        max-height: none !important;
    }
    
    .left-panel .carousel-container {
        border-radius: 0 !important;
        margin: 0 !important;
        width: 100%;
        height: 500px;
    }
    
    .right-panel {
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        border-left: none !important;
        padding: 1rem 0.5rem !important;
        margin-top: 0 !important;
        display: block;
    }
    
    .outlets-container {
        height: auto !important;
        overflow-y: visible !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
    
    .outlet-card {
        margin-bottom: 1.2rem;
    }
    
    .outlet-name {
        font-size: 1.2rem;
    }
    
    .outlet-address {
        font-size: 0.9rem;
    }
}