/**
 * Ella Carousel Styles
 * Univerzálne štýly pre carousel komponent
 */

.ella-carousel {
    width: 100%;
    margin: 16px 0;
}

.carousel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.carousel-track-container {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling na iOS */
    scroll-behavior: smooth;
}

.carousel-track-container:active {
    cursor: grabbing;
}

.carousel-track-container.dragging {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    width: fit-content;
    padding: 20px;
}

.carousel-item {
    flex: 0 0 320px;
    width: 320px;
    max-width: 90vw;
}

.carousel-navigation {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 0;
    justify-content: center;
}

.carousel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--c3, #e3e6ec);
    background: var(--w, #ffffff);
    color: var(--c1, #0c1742);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--c1, #0c1742);
    color: var(--w, #ffffff);
    transform: scale(1.05);
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.carousel-btn svg {
    width: 16px;
    height: 16px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.carousel-arrows {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.carousel-dot {
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c3, #e3e6ec);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-dot.active {
    background: var(--c1, #0c1742);
    transform: scale(1.2);
}


.room-card {
    background: var(--w, #ffffff);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--c3, #e3e6ec);
}

.room-image {
    position: relative;
    width: 100%;
    height: 200px; 
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.63s ease;
}

.room-image.has-image {
    background-color: #f3f4f6; 
}

.room-image.no-image {
    background: linear-gradient(135deg, var(--c3, #e3e6ec) 0%, #f9fafb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-image.no-image::before {
    content: '🏨';
    font-size: 48px;
    color: var(--c1, #0c1742);
    opacity: 0.7;
}

.room-card:hover .room-image {
    transform: scale(1.05);
}

.room-price {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--c1);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-weight: 600;
    z-index: 3;
}

.price-amount {
    font-size: 13px;
    font-weight: 500;
}

.price-period {
    font-size: 12px;
    opacity: 0.8;
    margin-left: 4px;
    display: none;
}

.room-content {
    padding: 16px;
}

.room-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--c1, #0c1742);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.room-package {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--c2, #ffbf00);
    font-weight: 600;
    margin-bottom: 8px;
}

.room-package svg {
    width: 16px;
    height: 16px;
    stroke: var(--c2, #ffbf00);
}

.room-includes {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 16px;
}

.room-includes svg {
    width: 16px;
    height: 16px;
    stroke: #22c55e;
    flex-shrink: 0;
    margin-top: 1px;
}

.room-select-btn {
    width: 100%;
    background: var(--c2, #ffbf00);
    color: var(--c1, #0c1742);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-select-btn:hover {
    background: var(--c1, #0c1742);
    color: var(--w, #ffffff);
}

.room-select-btn:active {
    transform: translateY(0);
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--c3, #e3e6ec);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-indicator.active {
    background: var(--c2, #ffbf00);
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background: var(--c1, #0c1742);
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 90vw;
        width: 90vw;
        max-width: 90vw;
    }
    
    .carousel-navigation {
        gap: 10px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
    }
    
    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .room-image {
        height: 175px; /* Zachováva 16:10 ratio */
    }
    
    .room-content {
        padding: 12px;
    }
    
    .room-name {
        font-size: 16px;
    }
    
    /* Mobile optimalizácie pre varianty */
    .variant-name {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .variant-price {
        font-size: 13px;
    }
    
    .variant-select-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .variants-toggle {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .variant-info-btn-inline {
        padding: 1px;
    }
    
    .variant-info-btn-inline svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {

    .carousel-track {
        padding: 0px;
    }

    .carousel-item {
        flex: 0 0 80vw;
        width: 80vw;
        max-width: 80vw;
    }
    
    .carousel-navigation {
        gap: 8px;
    }
    
    .carousel-arrows {
        gap: 15px;
    }
    
    .room-image {
        height: 162px; /* Zachováva 16:10 ratio */
    }
    
    .carousel-container {
        gap: 8px;
    }
    
    .carousel-btn {
        width: 32px;
        height: 32px;
    }
    
    .carousel-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Extra mobile optimalizácie */
    .variant-name {
        font-size: 12px;
    }
    
    .variant-price {
        font-size: 12px;
    }
    
    .variant-select-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .variant-price-select {
        gap: 6px;
    }
    
    .variant-info-btn-inline svg {
        width: 15px;
        height: 15px;
    }
}

/* Extra malé obrazovky */
@media (max-width: 360px) {
    .carousel-item {
        flex: 0 0 90vw;
        width: 90vw;
        max-width: 90vw;
    }
    
    .room-image {
        height: 150px;
    }
    
    .carousel-track {
        gap: 12px;
    }
}

/* Loading State */
.carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--c1, #0c1742);
}

.carousel-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--c3, #e3e6ec);
    border-top: 2px solid var(--c2, #ffbf00);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Error State */
.carousel-error {
    text-align: center;
    padding: 32px 16px;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 8px;
    margin: 16px 0;
}

/* Room Variants */
.room-variants {
    margin: 12px 0;
}

.variants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Room Select Container */
.room-select-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Variant Price Select Container */
.variant-price-select {
    display: flex
;
    justify-content: right;
    align-items: center;
    gap: 8px;
    flex: 1;
    width: 96%;
}

.variant-name-with-info {
    display: flex;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 4px;
}

.variant-info-btn-inline {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.variant-info-btn-inline:hover {
    background: rgba(0, 0, 0, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

.variant-info-btn-inline svg {
    display: block;
}

.variant-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 191, 0, 0.1);
    border: 1px solid var(--c2, #ffbf00);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.variant-option:hover {
    background: var(--c2, #ffbf00);
    color: var(--c1, #0c1742);
}

.variant-name {
    font-weight: 500;
    flex: 1;
    line-height: 1.3;
    margin: 0;
    font-size: 14px;
}

.variant-price {
    font-weight: 700;
    font-size: 14px;
}

.variant-item {
    padding: 10px 0 0 0;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    background: var(--c3);
}

.variants-hidden {
    position: relative;
    z-index: 15; /* Vyššie z-index ako variants-toggle */
    pointer-events: auto; /* Zabezpečí že kliky fungujú */
    touch-action: manipulation; /* Optimalizácia pre touch */
}

.variants-hidden .variant-item {
    margin-bottom: 10px;
    position: relative;
    z-index: 16; /* Najvyššie z-index pre variant items */
}

.carousel-dot {
    border: none !important;
}

.variant-item:last-child {
    border-bottom: none;
}

.variant-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.variant-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 0 10px;
}

.variant-select-btn {
    background: var(--c2, #ffbf00);
    color: var(--c1, #0c1742);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    width: 100px;
}

.variant-select-btn:hover {
    background: var(--c1, #0c1742);
    color: var(--w, #ffffff);
    transform: translateY(-1px);
}

.variants-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: 1px solid var(--c3, #e3e6ec);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--c1, #0c1742);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    position: relative;
    z-index: 10; /* Vyššie z-index pre priority nad carousel drag */
    user-select: none; /* Zabráni označovaniu textu pri drag */
    touch-action: manipulation; /* Optimalizácia pre touch zariadenia */
}

.variants-toggle:hover {
    background: var(--c3, #e3e6ec);
}

.variants-toggle svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}


/* Empty State */
.carousel-empty {
    text-align: center;
    padding: 32px 16px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    margin: 16px 0;
}

/* === NOVÝ ROOMS CAROUSEL === */
.ella-rooms-carousel-new {
    width: 100%;
    margin: 16px 0;
}

.ella-rooms-carousel-new .carousel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ella-rooms-carousel-new .carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    padding: 8px;
}

.ella-rooms-carousel-new .carousel-item.new-room-card {
    flex: 0 0 280px;
    width: 280px;
    max-width: 90vw;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Room Gallery Container */
.room-gallery-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.room-gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Navigation - vždy viditeľné */
.gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    opacity: 1; /* Vždy viditeľné */
    z-index: 10; /* Nad obrázkom */
}

.capacity-info {
    color: var(--w, #ffffff);
}

.gallery-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease; /* Len background, nie transform */
    backdrop-filter: blur(4px);
}

.gallery-btn:hover {
    background: rgba(255, 255, 255, 1);
    /* Odstránené transform: scale(1.1); */
}

.gallery-btn svg {
    width: 16px;
    height: 16px;
    color: #333;
}

/* Gallery Indicators - vždy viditeľné */
.gallery-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    opacity: 1; /* Vždy viditeľné */
    z-index: 10; /* Nad obrázkom */
}

.gallery-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Room Info */
.room-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--c1, #0c1742);
    margin: 0;
    line-height: 1.3;
}

.room-capacity {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.room-capacity svg {
    width: 16px;
    height: 16px;
    color: var(--c2, #4f46e5);
}

.room-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.room-more-info-btn,
.room-availability-btn {
    background: var(--c1);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
}

/* === ROOM POPUP ŠTÝLY === */
.ella-room-popup {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
}

.ella-room-popup .ella-popup-content {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Popup Gallery */
.popup-gallery {
    margin-bottom: 24px;
}

.popup-gallery-placeholder {
    height: 300px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-gallery-placeholder img {
    max-width: 200px;
    opacity: 0.5;
}

.popup-gallery-main {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.popup-gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.popup-gallery-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.popup-gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-gallery-slide.active {
    opacity: 1;
}

.popup-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Popup Gallery Navigation */
.popup-gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
}

.popup-gallery-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.popup-gallery-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.popup-gallery-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Popup Gallery Thumbs */
.popup-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.popup-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.popup-gallery-thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.popup-gallery-thumb.active {
    opacity: 1;
    border-color: var(--c2, #4f46e5);
}

.popup-gallery-thumb:hover {
    opacity: 0.8;
}

.popup-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Popup Room Info */
.popup-room-info {
    padding: 24px;
}

.info-section {
    margin-bottom: 24px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--c1, #0c1742);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section h4 svg {
    width: 16px;
    height: 16px;
    color: var(--c2, #4f46e5);
}

.info-section p {
    color: var(--c1);
    line-height: 1.5;
    margin: 0;
    font-size: 14px;
    margin: 10px 0;
}

/* Amenities List */
.amenities-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.amenity-name {
    color: #374151;
    font-size: 14px;
}

.amenity-value {
    color: #6b7280;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .ella-rooms-carousel-new .carousel-item.new-room-card {
        flex: 0 0 260px;
        width: 260px;
    }
    
    .room-gallery-container {
        height: 180px;
    }
    
    .ella-room-popup {
        width: 98%;
        max-height: 95vh;
    }
    
    .popup-gallery-main {
        height: 250px;
    }
    
    .amenities-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ella-rooms-carousel-new .carousel-item.new-room-card {
        flex: 0 0 240px;
        width: 240px;
    }
    
    .room-gallery-container {
        height: 160px;
    }
    
    .popup-gallery-main {
        height: 200px;
    }
}
