/* public/css/custom.css */

/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    color: #333;
}
.page_header {
    position: fixed;
    z-index: 10;
    background: white;
    top: 0;
    width: 100%;
    height: 72px;
    border-bottom: 1px solid #eee;
}
.text-info {
    color: #17a2b8 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    color: white;
}

/* Navigation */
.navbar-search {
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Filter Buttons */
.filter-button {
    white-space: nowrap;
    border-radius: 20px;
    font-size: 0.9rem;
    padding: 6px 16px;
    color: #444;
    background-color: #f8f9fa;
    margin-right: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-button:hover {
    background-color: #e9f5f3;
    color: #17a2b8;
}

.filter-button.active {
    background-color: #e9f5f3;
    color: #17a2b8;
    border: 1px solid #17a2b8;
}

/* Room Cards */
.card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-img-top {
    min-height: 220px;
    height: 220px;
    object-fit: cover;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background-color: rgba(255,255,255,0.95);
    transform: scale(1.1);
}

.favorite-btn {
    color: #ccc;
}

.favorite-btn.active, .favorite-btn .text-danger {
    color: #ff5a5f;
}

/* Badges */
.badge-corner {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10;
}

.self-checkin-badge {
    background-color: rgba(0, 150, 136, 0.15);
    color: #009688;
}

/* Room Prices */
.price-wrapper {
    display: flex;
    align-items: baseline;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
    font-size: 0.9rem;
}

.discount-tag {
    font-size: 0.8rem;
    padding: 1px 5px;
    border-radius: 4px;
    background-color: #f2f2f2;
    color: #666;
    margin-right: 5px;
}

/* Time Slots */
.time-slot {
    display: inline-block;
    background-color: #e9f5f3;
    color: #17a2b8;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 15px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Icons and Details */
.location-icon {
    color: #777;
    margin-right: 5px;
}

.property-rating {
    display: flex;
    align-items: center;
}

.property-rating .rating-value {
    margin-left: 5px;
    font-weight: 500;
}

.property-details {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9f5f3;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Time Slot Selection */
.time-slots .form-check-label {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slots .form-check-input:checked + .form-check-label {
    background-color: #e9f5f3;
    color: #17a2b8;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .card-img-top {
        min-height: 180px;
        height: 180px;
    }

    .filter-button {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
}
/* CSS cho Filter Tab giống hình ảnh mẫu */

/* Filter Tab Icons phía trên */
.filter-icons-row {
    display: flex;
    overflow-x: auto;
    padding: 8px 0;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.filter-icons-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.filter-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    color: #484848;
    text-decoration: none;
    margin-right: 16px;
}

.filter-icon-item:hover {
    color: #17a2b8;
}

.filter-icon-item.active {
    color: #17a2b8;
}

.filter-icon-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

.filter-icon-item span {
    font-size: 12px;
    text-align: center;
}

/* Filter Buttons kiểu mới */
.filter-button {
    display: inline-block;
    white-space: nowrap;
    border-radius: 20px;
    font-size: 0.9rem;
    padding: 6px 16px;
    color: #484848;
    background-color: #f8f9fa;
    border: 1px solid #e1e1e1;
    margin-right: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.filter-button:hover {
    background-color: #f0f0f0;
    color: #17a2b8;
    border-color: #d0d0d0;
}

.filter-button.active {
    background-color: #e7f6f8;
    color: #17a2b8;
    border-color: #17a2b8;
}

.filter-button i {
    margin-right: 5px;
}

/* Bộ lọc Modal */
.filter-modal .modal-content {
    border-radius: 12px;
}

.filter-modal .modal-header {
    border-bottom: none;
    padding: 20px 24px 0;
}

.filter-modal .modal-body {
    padding: 16px 24px;
}

.filter-modal .modal-footer {
    border-top: none;
    padding: 0 24px 20px;
}

/* Range slider cho giá */
.price-range-slider {
    height: 4px;
    position: relative;
    background-color: #e1e1e1;
    border-radius: 2px;
    margin: 30px 0;
}

.price-range-slider .ui-slider-range {
    height: 4px;
    position: absolute;
    background-color: #17a2b8;
}

.price-range-slider .ui-slider-handle {
    height: 16px;
    width: 16px;
    position: absolute;
    background-color: #17a2b8;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    margin-top: -6px;
    cursor: pointer;
    outline: none;
}

/* Price preset buttons */
.price-preset-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.price-preset-buttons .btn {
    flex: 1;
    margin: 0 5px;
    border-radius: 20px;
}

.price-preset-buttons .btn:first-child {
    margin-left: 0;
}

.price-preset-buttons .btn:last-child {
    margin-right: 0;
}

.price-preset-buttons .btn.active {
    background-color: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

/* Room type selector circles */
.room-count-selector {
    display: flex;
    margin-bottom: 20px;
}

.room-count-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    border: 1px solid #e1e1e1;
    background-color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-count-circle:hover {
    border-color: #17a2b8;
    color: #17a2b8;
}

.room-count-circle.active {
    background-color: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.room-count-circle.any {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

/* Property type checkboxes */
.property-type-check {
    margin-bottom: 15px;
}

.property-type-check .form-check-label {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.property-type-check .form-check-input:checked + .form-check-label {
    color: #17a2b8;
}

.property-type-check i {
    font-size: 18px;
    margin-right: 10px;
    color: #666;
}

.property-type-check .form-check-input:checked + .form-check-label i {
    color: #17a2b8;
}

/* Filter button fixed at bottom for mobile */
@media (max-width: 767.98px) {
    .mobile-filter-button {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        min-width: 200px;
    }
}

/* CSS để điều chỉnh filter icons giống mẫu */

.filter-icons-container {
    border-bottom: 1px solid #e8e8e8;
    padding: 8px 0;
    background-color: #fff;
    position: sticky;
    top: 70px; /* Điều chỉnh theo chiều cao của navbar */
    z-index: 90;
}

.filter-icons-row {
    display: flex;
    overflow-x: auto;
    padding: 4px 0;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.filter-icons-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.filter-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    color: #484848;
    text-decoration: none;
    margin-right: 20px;
    padding: 8px 0;
    position: relative;
}

.filter-icon-item:hover {
    color: #17a2b8;
}

.filter-icon-item.active {
    color: #17a2b8;
}

.filter-icon-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background-color: #17a2b8;
    border-radius: 1px;
}

.filter-icon-item i {
    font-size: 22px;
    margin-bottom: 6px;
}

.filter-icon-item span {
    font-size: 12px;
    text-align: center;
}

/* Điều chỉnh nút Bộ lọc */
.bo-loc-button {
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 8px 16px;
    background-color: #fff;
    color: #484848;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.bo-loc-button i {
    margin-right: 6px;
}

.bo-loc-button:hover {
    background-color: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-icon-item {
        min-width: 60px;
        margin-right: 12px;
    }

    .filter-icon-item i {
        font-size: 20px;
    }

    .filter-icon-item span {
        font-size: 11px;
    }
    #filterModal .modal-content {
        margin-top: 80px;
    }
}
.room-listings-container {
    padding-top: 30px; /* Adjust this value based on the combined height of your header and filter bar */
}
/* CSS cho room cards */
.room-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    height: 200px;
    overflow: hidden;
}

.carousel-container img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.badge-corner {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    color: #17a2b8;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.self-checkin-badge {
    display: flex;
    align-items: center;
}

.room-code {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.amenities-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.time-slots-preview {
    border-top: 1px dashed #e8e8e8;
    padding-top: 8px;
}

.time-slot {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.discount-tag {
    background-color: #ff6b6b;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

.price-wrapper {
    display: inline-flex;
    flex-direction: column;
}

.price-original {
    color: #adb5bd;
    text-decoration: line-through;
    font-size: 12px;
}

/* CSS cho filter và search bar */
.search-bar-container {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.search-input-wrapper {
    border: 1px solid #dee2e6;
    border-radius: 30px;
    padding: 5px 5px 5px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    background-color: white;
}

.filter-dropdown {
    border: none;
    background-color: transparent;
    font-weight: 500;
    color: #343a40;
    padding: 8px 12px;
    transition: background-color 0.2s;
    border-radius: 20px;
}

.filter-dropdown:hover {
    background-color: #f8f9fa;
}

.search-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CSS cho filter icons */
.filter-icons-container {
    position: sticky;
    top: 70px;
    background-color: white;
    z-index: 32;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.filter-icons-row {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: 5px 0;
}

.filter-icons-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.filter-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    margin-right: 15px;
    padding: 8px 0;
    color: #6c757d;
    text-decoration: none;
    font-size: 12px;
    position: relative;
}

.filter-icon-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.filter-icon-item.active {
    color: #17a2b8;
    font-weight: 500;
}

.filter-icon-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: #17a2b8;
    border-radius: 1px;
}

.bo-loc-button {
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    color: #495057;
    display: flex;
    align-items: center;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* CSS cho skeleton loader */
.skeleton-loader {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        background-color: rgba(206, 212, 218, 0.3);
    }
    100% {
        background-color: rgba(206, 212, 218, 0.6);
    }
}

.skeleton-img {
    height: 200px;
    width: 100%;
    border-radius: 12px 12px 0 0;
}

.skeleton-text {
    height: 15px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.sm {
    width: 60%;
}

.skeleton-text.md {
    width: 80%;
}

.skeleton-text.lg {
    width: 100%;
}

/* CSS cho property-details với hover popup */
.property-details {
    position: relative;
}

.property-details-summary {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bed-info-trigger {
    color: #17a2b8;
    cursor: pointer;
}

.bed-info-trigger:hover {
    text-decoration: underline;
}

.property-details-popup {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 1000; /* Tăng z-index để đảm bảo hiển thị trên cùng */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    transform: translateY(10px);
    /* Bỏ pointer-events: none để có thể tương tác với popup */
}

.property-details:hover .property-details-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
    /* Đảm bảo popup có thể tương tác */
    pointer-events: auto;
}

.popup-content h6 {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.popup-content p {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.bed-details-list {
    list-style: none;
    padding-left: 20px;
    margin-bottom: 8px;
}

.bed-details-list li {
    margin-bottom: 4px;
    font-size: 13px;
}

.room-type-desc {
    border-top: 1px dashed #eee;
    padding-top: 6px;
    margin-top: 6px;
}

/* Thêm mũi tên trỏ lên */
.property-details-popup::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background-color: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

/* Responsive cho thiết bị nhỏ */
@media (max-width: 768px) {
    .property-details-popup {
        width: 220px;
    }
}

/* Đảm bảo popup không bị che khuất bởi các phần tử khác */
.property-details {
    z-index: 10;
}

/* Không giới hạn chiều cao của popup */
.property-details-popup {
    max-height: none !important;
    overflow: visible !important;
}

/* CSS cho bed-info-popup trong phương án 2 */
.bed-info-popup {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 12px;
    z-index: 10000;
    max-width: 250px;
    font-size: 13px;
}

.bed-info-content h6 {
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.bed-info-list {
    margin-bottom: 0;
}


/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.loading-spinner .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.3em;
}

/* Prevent scrolling while loading */
body.loading {
    overflow: hidden;
}

/* Enhance skeleton loader */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-img {
    height: 200px;
    border-radius: 6px 6px 0 0;
}

.skeleton-text.sm {
    height: 14px;
    width: 40%;
}

.skeleton-text.md {
    height: 16px;
    width: 70%;
}

.skeleton-text.lg {
    height: 20px;
    width: 90%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Enhance loading indicator */
.loading-indicator {
    padding: 20px;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Custom styles for Select2 multi-select */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    min-height: 58px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.2rem 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 0.375rem;
    cursor: pointer;
    color: #6c757d;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #212529;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #86b7fe;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: #0d6efd;
    color: white;
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.375rem 0.75rem;
}

/* Floating label adjustment for Select2 */
.form-floating > .select2-container {
    padding-top: 1.625rem;
}

.form-floating > .select2-container ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    pointer-events: none;
}
