/* Floor Plan Tabs - Compact Display Styles */

/* Tab Styles */
.floor-plan-tab {
    position: relative;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}

.floor-plan-tab:hover {
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

.floor-plan-tab.active {
    color: #10B981;
    border-bottom-color: #10B981;
    background-color: rgba(16, 185, 129, 0.05);
    font-weight: 600;
}

/* Compact Floor Plan Card Styles */
.compact-floor-card {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-floor-card:hover {
    transform: translateY(-2px);
}

.compact-floor-card.selected {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1), 
                0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background-color: rgba(16, 185, 129, 0.02);
}

/* Hide class for tab filtering */
.compact-floor-card.hidden {
    display: none;
}

/* Floor Plan Detail Panel Styles */
#floor-plan-detail-panel {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carousel container */
#floor-plan-carousel {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
}

#floor-plan-carousel::-webkit-scrollbar {
    height: 6px;
}

#floor-plan-carousel::-webkit-scrollbar-track {
    background: transparent;
}

#floor-plan-carousel::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

#floor-plan-carousel::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* Carousel navigation buttons */
#floor-plan-carousel-prev,
#floor-plan-carousel-next {
    transition: opacity 0.3s ease, transform 0.2s ease;
}

#floor-plan-carousel-prev:hover,
#floor-plan-carousel-next:hover {
    transform: scale(1.05);
}

#floor-plan-carousel-prev:active,
#floor-plan-carousel-next:active {
    transform: scale(0.95);
}

/* Horizontal card layout - more compact */
.compact-floor-card {
    min-height: 96px;
    height: 96px;
}

.compact-floor-card img {
    min-height: 96px;
    height: 96px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .floor-plan-tab {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .compact-floor-card {
        min-height: 90px;
        height: 90px;
        width: 280px;
    }
    
    .compact-floor-card img {
        min-height: 90px;
        height: 90px;
        width: 80px;
    }
    
    .compact-floor-card > div:first-child {
        width: 80px;
    }
    
    /* Smaller navigation buttons on mobile */
    #floor-plan-carousel-prev,
    #floor-plan-carousel-next {
        padding: 0.375rem;
    }
    
    #floor-plan-carousel-prev svg,
    #floor-plan-carousel-next svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .compact-floor-card {
        min-height: 96px;
        height: 96px;
        width: 300px;
    }
    
    .compact-floor-card img {
        min-height: 96px;
        height: 96px;
    }
}

@media (min-width: 769px) {
    .compact-floor-card {
        min-height: 96px;
        height: 96px;
    }
    
    .compact-floor-card img {
        min-height: 96px;
        height: 96px;
    }
}

/* Ensure smooth scrolling for tab container */
.floor-plan-tab-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.floor-plan-tab-container::-webkit-scrollbar {
    height: 4px;
}

.floor-plan-tab-container::-webkit-scrollbar-track {
    background: transparent;
}

.floor-plan-tab-container::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 2px;
}

.floor-plan-tab-container::-webkit-scrollbar-thumb:hover {
    background-color: #d1d5db;
}

/* Detail panel image hover effect */
#floor-plan-detail-panel img {
    transition: transform 0.5s ease;
}

#floor-plan-detail-panel img:hover {
    transform: scale(1.02);
}

/* Smooth transitions for dynamic content */
#floor-plan-detail-panel > div {
    transition: opacity 0.3s ease;
}

/* Loading state for cards */
.compact-floor-card:not([data-floor-plan]) {
    opacity: 0.6;
    pointer-events: none;
}

/* Badge styling for BHK type on cards */
.compact-floor-card .bg-white\/90 {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure proper aspect ratio for card images */
.compact-floor-card img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Horizontal card image container */
.compact-floor-card > div:first-child {
    position: relative;
}

/* Ensure content doesn't overflow in horizontal layout */
.compact-floor-card .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Detail panel section spacing */
#floor-plan-detail-panel h4 {
    letter-spacing: -0.01em;
}

/* Price highlighting in detail panel */
#floor-plan-detail-panel .text-primary-600 {
    text-shadow: 0 1px 2px rgba(16, 185, 129, 0.1);
}

/* Area detail cards in panel */
#floor-plan-detail-panel .rounded-xl.border {
    transition: all 0.2s ease;
}

#floor-plan-detail-panel .rounded-xl.border:hover {
    border-color: #10B981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

/* Ensure proper grid gaps on mobile */
@media (max-width: 640px) {
    #floor-plan-detail-panel .grid {
        gap: 0.75rem;
    }
}

/* Focus states for accessibility */
.floor-plan-tab:focus,
.compact-floor-card:focus {
    outline: 2px solid #10B981;
    outline-offset: 2px;
}

.floor-plan-tab:focus:not(:focus-visible),
.compact-floor-card:focus:not(:focus-visible) {
    outline: none;
}

/* Prevent layout shift during loading */
.compact-floor-card::before {
    content: '';
    display: block;
    padding-top: 0;
}
