/**
 * Profitroom Rooms Integration
 * Frontend Styles - 3 Columns Layout
 */

/* Container */
#profitroom-rooms-widget.profitroom-rooms-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0px !important;
}

/* Grid Layout - 3 columns in one row */
#profitroom-rooms-widget .profitroom-rooms-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    margin-top: 20px !important;
}

/* Room Card */
#profitroom-rooms-widget .profitroom-room-card {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: transform 0.3s ease !important;
}

#profitroom-rooms-widget .profitroom-room-card:hover {
    transform: scale(1.02) !important;
}

/* Room Image */
#profitroom-rooms-widget .profitroom-room-card .room-image {
    position: relative !important;
    width: 100% !important;
    height: 500px !important;
    overflow: hidden !important;
}

#profitroom-rooms-widget .profitroom-room-card .room-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
    display: block !important;
}

#profitroom-rooms-widget .profitroom-room-card:hover .room-image img {
    transform: scale(1.05) !important;
}

/* Room Overlay */
#profitroom-rooms-widget .profitroom-room-card .room-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%) !important;
    padding: 40px 30px 30px !important;
    z-index: 2 !important;
}

#profitroom-rooms-widget .profitroom-room-card .room-overlay-content {
    color: #ffffff !important;
}

/* Room Name */
#profitroom-rooms-widget .profitroom-room-card .room-name {
    font-size: 42px !important;
    font-weight: 400 !important;
    margin: 0 0 10px 0 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Room Price */
#profitroom-rooms-widget .profitroom-room-card .room-price {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

#profitroom-rooms-widget .profitroom-room-card .room-price .price-currency {
    margin-right: 0 !important;
}

/* Book Overlay - Full Card Clickable */
#profitroom-rooms-widget .profitroom-room-card .room-book-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 3 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

#profitroom-rooms-widget .profitroom-room-card .room-book-overlay:focus {
    outline: 2px solid #ffffff !important;
    outline-offset: -5px !important;
}

/* Screen reader text */
#profitroom-rooms-widget .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* Error and Empty States */
#profitroom-rooms-widget.profitroom-rooms-error,
#profitroom-rooms-widget.profitroom-rooms-empty {
    padding: 30px !important;
    text-align: center !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
}

#profitroom-rooms-widget.profitroom-rooms-error p,
#profitroom-rooms-widget.profitroom-rooms-empty p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 16px !important;
}

#profitroom-rooms-widget.profitroom-rooms-error {
    background: #fee !important;
    border-color: #fcc !important;
}

#profitroom-rooms-widget.profitroom-rooms-error p {
    color: #c33 !important;
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
    #profitroom-rooms-widget .profitroom-room-card .room-name {
        font-size: 36px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-image {
        height: 450px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-price {
        font-size: 14px !important;
    }
}

@media (max-width: 1200px) {
    #profitroom-rooms-widget .profitroom-room-card .room-name {
        font-size: 32px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-image {
        height: 400px !important;
    }
}

@media (max-width: 992px) {
    /* 2 columns on tablet */
    #profitroom-rooms-widget .profitroom-rooms-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-name {
        font-size: 30px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-image {
        height: 400px !important;
    }
}

@media (max-width: 768px) {
    /* Single column on mobile */
    #profitroom-rooms-widget .profitroom-rooms-grid {
        grid-template-columns: 1fr !important;
    }
    
    #profitroom-rooms-widget.profitroom-rooms-container {
        padding: 15px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-image {
        height: 350px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-name {
        font-size: 28px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-price {
        font-size: 14px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-overlay {
        padding: 30px 20px 20px !important;
    }
}

@media (max-width: 480px) {
    #profitroom-rooms-widget .profitroom-room-card .room-image {
        height: 300px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-name {
        font-size: 24px !important;
    }
    
    #profitroom-rooms-widget .profitroom-room-card .room-price {
        font-size: 13px !important;
    }
}

/* Loading State */
#profitroom-rooms-widget.profitroom-rooms-loading {
    text-align: center !important;
    padding: 40px !important;
}

#profitroom-rooms-widget.profitroom-rooms-loading::before {
    content: "" !important;
    display: inline-block !important;
    width: 40px !important;
    height: 40px !important;
    border: 4px solid #f3f3f3 !important;
    border-top: 4px solid #333 !important;
    border-radius: 50% !important;
    animation: profitroom-spin 1s linear infinite !important;
}

@keyframes profitroom-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    #profitroom-rooms-widget .profitroom-room-card .room-book-overlay {
        display: none !important;
    }
    
    #profitroom-rooms-widget .profitroom-rooms-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #profitroom-rooms-widget .profitroom-room-card,
    #profitroom-rooms-widget .profitroom-room-card .room-image img {
        transition: none !important;
    }
}