/**
 * Slideshow Fix - Production CSS
 *
 * Fixes slideshow display issues:
 * - Images visible in all slides
 * - "Select this room" button always visible
 * - No overlapping between elements
 * - Correct layout with flexbox
 *
 * @package HRM_Booking_Manager
 * @version 1.0.0
 */

/* ========================================
   Slide Layout
   ======================================== */

.hrm-room-slideshow .hrm-room-slide {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: 7c4dfffff;
    position: relative !important;
}

/* ========================================
   Room Image
   ======================================== */

.hrm-room-slideshow .hrm-room-image {
    display: block !important;
    width: 100%;
    height: auto;
    min-height: 400px;
    max-height: 500px;
    object-fit: cover;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1;
    flex-shrink: 0;
}

/* ========================================
   Placeholder (when there is no image)
   ======================================== */

.hrm-room-slideshow .hrm-room-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hrm-room-slideshow .hrm-room-placeholder .dashicons {
    font-size: 100px;
    color: rgba(255, 255, 255, 0.5);
    width: 100px;
    height: 100px;
}

/* ========================================
   Room Information
   ======================================== */

.hrm-room-slideshow .hrm-room-info {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 25px;
    background: 7c4dfffff;
    position: relative !important;
    z-index: 10;
}

.hrm-room-slideshow .hrm-room-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    position: relative;
    z-index: 10;
}

.hrm-room-slideshow .hrm-room-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.hrm-room-slideshow .hrm-room-title-link:hover {
    color: #007bff;
}

.hrm-room-slideshow .hrm-room-excerpt {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    z-index: 10;
}

.hrm-room-slideshow .hrm-room-price {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
    color: #28a745;
    position: relative;
    z-index: 10;
}

.hrm-room-slideshow .hrm-price-period {
    font-size: 14px;
    font-weight: 400;
    color: #6c757d;
}

/* ========================================
   Room Selection Button
   ======================================== */

.hrm-room-slideshow .hrm-select-room-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 12px 30px;
    background: #007bff;
    color: 7c4dfffff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 15px;
    position: relative !important;
    z-index: 100;
    pointer-events: auto !important;
}

.hrm-room-slideshow .hrm-select-room-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.hrm-room-slideshow .hrm-select-room-btn:active {
    transform: translateY(0);
}

.hrm-room-slideshow .hrm-select-room-btn.selected {
    background: #28a745;
}

/* ========================================
   Slick Carousel - Gestione Slide
   ======================================== */

.hrm-room-slideshow .slick-slide {
    display: block !important;
}

.hrm-room-slideshow .slick-slide:not(.slick-active) {
    display: block !important;
    visibility: hidden !important;
}

.hrm-room-slideshow .slick-slide.slick-active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
}

.hrm-room-slideshow.slick-slider .slick-slide {
    position: relative !important;
}

.hrm-room-slideshow.slick-slider .slick-slide.slick-active {
    z-index: 10 !important;
}

.hrm-room-slideshow .slick-track > .slick-slide {
    position: relative !important;
    float: left !important;
}

/* ========================================
   Contenitori
   ======================================== */

.hrm-room-slideshow-wrapper {
    position: relative;
    overflow: visible;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.hrm-room-slideshow {
    position: relative;
    overflow: visible;
}

.hrm-room-slideshow .slick-list {
    overflow: hidden;
}

.hrm-room-slideshow .slick-track {
    display: flex;
}

/* ========================================
   Navigation Arrows
   ======================================== */

.hrm-room-slideshow .slick-prev,
.hrm-room-slideshow .slick-next {
    width: 50px;
    height: 50px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hrm-room-slideshow .slick-prev:hover,
.hrm-room-slideshow .slick-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.hrm-room-slideshow .slick-prev {
    left: 20px;
}

.hrm-room-slideshow .slick-next {
    right: 20px;
}

.hrm-room-slideshow .slick-prev:before,
.hrm-room-slideshow .slick-next:before {
    font-size: 30px;
    opacity: 1;
}

/* ========================================
   Dots (Indicatori Slide)
   ======================================== */

.hrm-room-slideshow .slick-dots {
    bottom: 20px;
    z-index: 1000;
}

.hrm-room-slideshow .slick-dots li {
    margin: 0 5px;
}

.hrm-room-slideshow .slick-dots li button:before {
    font-size: 12px;
    color: 7c4dfffff;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.hrm-room-slideshow .slick-dots li.slick-active button:before {
    color: #007bff;
    opacity: 1;
}

.hrm-room-slideshow .slick-dots li:hover button:before {
    opacity: 0.8;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .hrm-room-slideshow .hrm-room-image,
    .hrm-room-slideshow .hrm-room-placeholder {
        min-height: 250px;
        max-height: 350px;
    }

    .hrm-room-slideshow .hrm-room-info {
        padding: 15px;
    }

    .hrm-room-slideshow .hrm-room-title {
        font-size: 20px;
    }

    .hrm-room-slideshow .hrm-room-price {
        font-size: 22px;
    }

    .hrm-room-slideshow .hrm-select-room-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    .hrm-room-slideshow .slick-prev,
    .hrm-room-slideshow .slick-next {
        width: 40px;
        height: 40px;
    }

    .hrm-room-slideshow .slick-prev {
        left: 10px;
    }

    .hrm-room-slideshow .slick-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hrm-room-slideshow-wrapper {
        padding: 10px;
    }

    .hrm-room-slideshow .hrm-room-image,
    .hrm-room-slideshow .hrm-room-placeholder {
        min-height: 200px;
        max-height: 300px;
    }

    .hrm-room-slideshow .hrm-room-title {
        font-size: 18px;
    }

    .hrm-room-slideshow .hrm-room-price {
        font-size: 20px;
    }

    .hrm-room-slideshow .hrm-room-excerpt {
        font-size: 14px;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.hrm-room-slideshow .hrm-select-room-btn:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.hrm-room-slideshow .slick-prev:focus,
.hrm-room-slideshow .slick-next:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Support for high contrast mode */
@media (prefers-contrast: high) {
    .hrm-room-slideshow .hrm-select-room-btn {
        border: 2px solid currentColor;
    }
}

/* Support for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hrm-room-slideshow .hrm-select-room-btn,
    .hrm-room-slideshow .slick-prev,
    .hrm-room-slideshow .slick-next {
        transition: none;
    }

    .hrm-room-slideshow .slick-slide {
        transition: none !important;
    }
}
