/* Popular Destinations Component - Circular Cards with Rainbow Gradient Borders and Hover Detail Panel */

/* Rainbow Gradient Backgrounds (for cards without images) */
.rainbow-gradient-1 {
    background: linear-gradient(135deg, #ff6b9d 0%, #ffc371 50%, #4ecdc4 100%);
}

.rainbow-gradient-2 {
    background: linear-gradient(135deg, #c471ed 0%, #f64f59 50%, #ffc371 100%);
}

.rainbow-gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #43e97b 100%);
}

.rainbow-gradient-4 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 50%, #fa709a 100%);
}

.rainbow-gradient-5 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 50%, #ff6b9d 100%);
}

.rainbow-gradient-6 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #ffecd2 100%);
}

/* Rainbow Gradient Borders */
.rainbow-gradient-border-1 {
    background: linear-gradient(135deg, #ff6b9d, #ffc371, #4ecdc4, #ff6b9d);
    background-size: 200% 200%;
    animation: gradient-rotate 3s ease infinite;
}

.rainbow-gradient-border-2 {
    background: linear-gradient(135deg, #c471ed, #f64f59, #ffc371, #c471ed);
    background-size: 200% 200%;
    animation: gradient-rotate 3s ease infinite;
}

.rainbow-gradient-border-3 {
    background: linear-gradient(135deg, #4facfe, #00f2fe, #43e97b, #4facfe);
    background-size: 200% 200%;
    animation: gradient-rotate 3s ease infinite;
}

.rainbow-gradient-border-4 {
    background: linear-gradient(135deg, #fa709a, #fee140, #fa709a, #fee140);
    background-size: 200% 200%;
    animation: gradient-rotate 3s ease infinite;
}

.rainbow-gradient-border-5 {
    background: linear-gradient(135deg, #30cfd0, #330867, #ff6b9d, #30cfd0);
    background-size: 200% 200%;
    animation: gradient-rotate 3s ease infinite;
}

.rainbow-gradient-border-6 {
    background: linear-gradient(135deg, #a8edea, #fed6e3, #ffecd2, #a8edea);
    background-size: 200% 200%;
    animation: gradient-rotate 3s ease infinite;
}

@keyframes gradient-rotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Horizontal Scrollable Container */
.popular-destinations-section .overflow-x-auto {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar-track {
    background: transparent;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.popular-destinations-section .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Circular Card Styles - Matching User's Image Example */
.popular-destinations-section .rounded-full {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.popular-destinations-section .rounded-full:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.popular-destinations-section .w-\[140px\] {
    width: 140px;
    height: 140px;
}

/* Detail Panel Styles - Second Image Style */
.popular-destinations-section .absolute.left-full,
.popular-destinations-section .absolute.right-full {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    backdrop-filter: blur(10px);
}

.popular-destinations-section .absolute.left-full {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.1);
}

.popular-destinations-section .absolute.right-full {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Text Content in Cards */
.popular-destinations-section h3 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Detail Panel Arrow Indicator */
.popular-destinations-section [x-show="showDetail"] {
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Button Style */
.popular-destinations-section a[href*="hotels.index"] {
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.popular-destinations-section a[href*="hotels.index"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* Card size is fixed at 140x140px circular - matching image example */
.popular-destinations-section a.rounded-full {
    width: 140px !important;
    height: 140px !important;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .popular-destinations-section .absolute.left-full {
        width: 240px !important;
        padding: 1rem;
        left: 50% !important;
        transform: translateX(-50%) translateY(1rem) !important;
        top: 100% !important;
        margin: 0 !important;
    }
    
    .popular-destinations-section h3 {
        font-size: 0.875rem;
        line-height: 1.3;
    }
}

/* Tablet and Desktop */
@media (min-width: 641px) {
    .popular-destinations-section .absolute.left-full {
        width: 280px !important;
    }
}

/* Prevent panel from going off-screen on the right */
@media (min-width: 1025px) {
    .popular-destinations-section .group:last-child .absolute.left-full {
        left: auto;
        right: 100%;
        margin-left: 0;
        margin-right: 1.5rem;
    }
    
    .popular-destinations-section .group:last-child .absolute.left-full::before {
        left: auto;
        right: -8px;
        border-width: 8px 0 8px 8px;
        border-color: transparent transparent transparent white;
    }
}

/* Smooth Animations */
.popular-destinations-section .rounded-full {
    will-change: transform;
}

/* Accessibility */
.popular-destinations-section a:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 4px;
    border-radius: 50%;
}

/* Text below circles */
.popular-destinations-section .mt-3 {
    margin-top: 0.75rem;
}

.popular-destinations-section .w-\[160px\] {
    width: 160px;
}

/* Ensure detail panel is clickable */
.popular-destinations-section .absolute.left-full a {
    pointer-events: auto;
}
