/* Стили для гибких цен */

.flex-price-toggle {
    background: transparent;
    color: #383a3f;
    text-decoration: underline;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.2s ease;
    user-select: none;
}

.flex-price-toggle:hover {
    color: #228B22;
    text-decoration: underline;
}

.flex-price-table {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0;
    margin-top: 10px;
    overflow: hidden;
}

.flex-price-table-header {
    background: none;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 400;
}

.flex-price-close-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1;
}

.flex-price-close-btn:hover {
    background: #dee2e6;
    color: #495057;
}

.flex-price-close-btn i {
    font-size: 16px;
}

.flex-price-table table {
    width: 100%;
    margin-bottom: 0;
    padding: 15px;
    background: white;
}

.flex-price-table tbody tr:last-child td {
    border-bottom: none;
}


/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .booking-price {
        gap: 6px !important;
    }
    
    .flex-price-table-header {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .flex-price-table th,
    .flex-price-table td {
        padding: 6px 8px;
        font-size: 14px;
    }
    
    .flex-price-close-btn {
        padding: 3px 6px;
        font-size: 14px;
    }
    
    .flex-price-close-btn i {
        font-size: 14px;
    }
}

.flex-toggle-btn, .single-price-btn {
    background: transparent;
    color: #383a3f;
    text-decoration: underline;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.flex-price-table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 8px 12px;
    font-weight: 400;
    text-align: left;
    font-size: 16px;
}

.flex-price-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 16px;
    font-weight: 400;
    border: none;
}

.flex-price-table tr:last-child td {
    border-bottom: none;
}

/* Принудительное колончатое отображение для блока цен */
.booking-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

.booking-price .flex-price-toggle {
    margin-top: 4px;
}

/* Стили для основного текста цены */
.booking-price .flex-price-table {
    width: 100%;
    margin-top: 8px;
}

/* Анимация появления/скрытия таблицы */
.flex-price-table {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
}

.flex-price-table[style*="display: none"] {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
}

/* Плавное появление таблицы */
.flex-price-table.show {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}
