/* Hero Section */
.hero-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://q-xx.bstatic.com/xdata/images/hotel/1204x910/530039663.webp?k=86e5750fa690b73fb1acf0f88dcb3bf4ba52dcea5681dcae5228448f50bcaccd&o=https://q-xx.bstatic.com/xdata/images/hotel/1204x910/530039663.webp?k=86e5750fa690b73fb1acf0f88dcb3bf4ba52dcea5681dcae5228448f50bcaccd&o=');
    background-size: cover;
    background-position: center;
}

/* Property Cards */
.property-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.property-card:hover {
    transform: translateY(-8px);
}

.property-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, transparent 0%, rgba(217, 119, 6, 0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Don't block clicks on buttons */
}

.property-card:hover::before {
    opacity: 1;
}

/* Ensure buttons in property cards are clickable */
.property-card button {
    position: relative;
    z-index: 10;
}

.property-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-image:hover {
    transform: scale(1.1);
}

/* Favorite button animation */
.favorite-btn {
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background-color: white !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.favorite-btn:active {
    transform: scale(0.95);
}

/* Badge animations */
.badge {
    animation: slideInLeft 0.5s ease;
    backdrop-filter: blur(8px);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Destination Cards */
.destination-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.destination-card img {
    transition: transform 0.5s ease;
}

.destination-card:hover img {
    transform: scale(1.05);
}

.destination-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 20px;
    color: white;
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #f59e0b;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.active::after {
    width: 100%;
}

/* Booking Modal */
.booking-modal {
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.booking-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto
}

.booking-modal.minimized {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 20px;
    left: auto;
    width: 300px;
    height: 60px;
    background: transparent;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.booking-modal.minimized .booking-content {
    width: 100%;
    height: 60px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: white;
    border: 2px solid #d97706;
}

.booking-modal.minimized .booking-form-content {
    display: none;
}

.booking-modal.minimized .minimized-content {
    display: flex !important;
}

.minimize-button {
    transition: transform 0.2s ease;
}

.minimize-button:hover {
    transform: scale(1.1);
}

.minimized-content {
    display: none;
}

/* Property Details Reservation Card Minimize */
.reservation-card {
    transition: all 0.3s ease;
    transform-origin: top right;
}

.reservation-card.minimized {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 280px;
    height: 50px;
    z-index: 1000;
    transform: scale(1);
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid #d97706;
    background: white;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.reservation-card.minimized .reservation-content {
    display: none;
}

.reservation-card.minimized .minimized-tab {
    display: flex !important;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.minimized-tab {
    display: none;
}

.reservation-card .minimize-x-button,
.reservation-card .restore-button {
    transition: all 0.2s ease;
    cursor: pointer;
}

.reservation-card .minimize-x-button:hover,
.reservation-card .restore-button:hover {
    transform: scale(1.1);
}

/* Property Image Management */
.image-upload-section {
    border: 2px dashed #d97706;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #fef3c7;
}

.image-upload-section:hover {
    border-color: #b45309;
    background: #fde68a;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.image-preview-item:hover {
    transform: scale(1.02);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.image-preview-item:hover .image-preview-overlay {
    opacity: 1;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* Authentication Modal */
.auth-modal {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-modal.hidden {
    pointer-events: none;
}

.auth-modal:not(.hidden) {
    pointer-events: auto;
}

.auth-form-active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.auth-form-hidden {
    display: none;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Messages */
.error-message {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.success-message {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Auth Modal Scrolling */
.auth-modal-content {
    max-height: 85vh;
    overflow-y: auto;
    /* Firefox scrollbar styling */
    scrollbar-width: thin; /* Modern Firefox */
    scrollbar-color: #d97706 #f3f4f6; /* Modern Firefox */
}

.auth-modal-content::-webkit-scrollbar {
    width: 6px;
}

.auth-modal-content::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.auth-modal-content::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 3px;
}

.auth-modal-content::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

.auth-form-container {
    padding-bottom: 20px;
}

/* Scroll Shadow Effect */
.auth-modal-content {
    position: relative;
}

.auth-modal-content::before {
    content: '';
    position: sticky;
    top: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 20;
    pointer-events: none;
}

.auth-modal-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    height: 10px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 20;
    pointer-events: none;
}

/* Property Details Gallery */
.property-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 400px;
}

.gallery-main {
    grid-row: 1 / 3;
}

.gallery-thumb {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

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

/* Amenities */
.amenity-icon {
    background-color: #fef3c7;
    color: #f59e0b;
}

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

.amenity-item i {
    width: 20px;
    margin-right: 12px;
    color: #d97706;
}

/* User Menu Dropdown */
.user-menu-container {
    position: relative;
}

#user-dropdown-menu {
    animation: slideDown 0.2s ease-out;
    transform-origin: top right;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#user-dropdown-menu a {
    transition: all 0.2s ease;
}

#user-dropdown-menu a:hover {
    background-color: #f3f4f6;
    padding-left: 1.25rem;
}

#user-dropdown-menu a:active {
    background-color: #e5e7eb;
}

/* Mobile User Menu */
.mobile-user-menu {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Notification Badge */
.notification-badge {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Profile Avatar Upload */
#profile-avatar {
    transition: transform 0.3s ease;
}

#profile-avatar:hover {
    transform: scale(1.05);
}

/* Toggle Switch */
input[type="checkbox"].sr-only:checked + div {
    background-color: #d97706;
}

input[type="checkbox"].sr-only:checked + div:after {
    transform: translateX(100%);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .auth-modal-content {
        max-height: 80vh;
    }
}

@media (max-width: 768px) {
    .property-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 300px;
        height: 300px;
    }
    
    .gallery-main {
        grid-row: 1;
    }
    
    .gallery-thumb {
        display: none;
    }
}

/* Fade In Animation for Modals */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* Advanced Search Components - Booking.com Style */

/* Autocomplete Dropdown */
.autocomplete-item {
    transition: background-color 0.2s ease;
}

.autocomplete-item:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.autocomplete-item:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Property Card Enhancements */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

/* Slide In Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slideIn {
    animation: slideIn 0.3s ease-out;
}

/* Sticky Elements */
.sticky {
    position: -webkit-sticky;
    position: sticky;
}

/* Scrollbar Styling */
.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

/* Guest Selector Dropdown */
#guest-selector-dropdown {
    min-width: 280px;
}

/* Sort Button Active State */
.sort-btn {
    transition: all 0.2s ease;
}

.sort-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Price Histogram Bars */
#price-histogram > div {
    transition: all 0.3s ease;
}

#price-histogram > div:hover {
    opacity: 0.8;
}

/* Results Grid Responsive */
@media (max-width: 768px) {
    .property-card {
        margin-bottom: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Skeleton Animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Hover effects for property cards */
.property-card img {
    will-change: transform;
}

/* Focus states for accessibility */
.property-card:focus-within {
    box-shadow: 0 0 0 2px #d97706;
    transform: translateY(-2px);
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

/* Enhanced button hover states */
.bg-gradient-to-r:hover {
    box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.4);
}

/* Filter Section Animations */
.filter-section {
    transition: max-height 0.3s ease;
}

/* Search Input Visibility Fix */
#advanced-search-input {
    color: #1f2937 !important; /* gray-900 */
    background-color: #ffffff !important;
    -webkit-text-fill-color: #1f2937 !important; /* Safari fix */
}

#advanced-search-input::placeholder {
    color: #9ca3af !important; /* gray-400 */
    opacity: 1 !important;
}

/* Date Input Styling */
#search-checkin,
#search-checkout {
    color: #1f2937 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #1f2937 !important;
    cursor: pointer;
}

#search-checkin::-webkit-calendar-picker-indicator,
#search-checkout::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    color: #d97706; /* amber-600 */
}

/* Guest Selector Button */
#guests-display {
    color: #1f2937 !important;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    #guest-selector-dropdown {
        left: auto;
        right: 0;
        min-width: 260px;
    }
}