/* Custom styles for Booking website */

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Review score badges */
.score-excellent { background-color: #003580; }
.score-very-good { background-color: #0071c2; }
.score-good { background-color: #008009; }
.score-pleasant { background-color: #febb02; color: #262626; }
.score-fair { background-color: #6b6b6b; }

/* Star ratings */
.star-rating {
    color: #febb02;
}

/* Property card hover effects */
.property-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

/* Search form styling */
.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #febb02;
}

/* Filter checkbox styling */
.filter-checkbox {
    accent-color: #003580;
}

/* Price range slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #003580;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #003580;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Gallery lightbox */
.gallery-overlay {
    background: rgba(0, 0, 0, 0.9);
}

/* Booking.com blue gradient for header */
.header-gradient {
    background: linear-gradient(180deg, #003580 0%, #00224f 100%);
}

/* Featured badge */
.featured-badge {
    background: linear-gradient(135deg, #febb02 0%, #f5a623 100%);
}

/* Genius badge styling */
.genius-badge {
    background: linear-gradient(135deg, #004cb8 0%, #003580 100%);
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Slide up animation */
.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 50;
        overflow-y: auto;
    }
}

/* Date picker overrides */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

/* Room table styling */
.room-row:hover {
    background-color: #f5f5f5;
}

/* Sticky elements */
.sticky-sidebar {
    position: sticky;
    top: 20px;
}

/* Hidden by default, shown only in print */
.print-only {
    display: none;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }

    header, footer, nav {
        display: none !important;
    }

    body {
        font-size: 11pt;
        color: #000;
        background: #fff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Reset layout — single column, no max-width constraints */
    .print-single-col {
        display: block !important;
        max-width: 100% !important;
    }
    .print-single-col > * {
        width: 100% !important;
        max-width: 100% !important;
        flex-shrink: unset !important;
    }

    /* Ensure page breaks don't split cards */
    .print-no-break {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Hide bg colors on status banners but keep text */
    [class*="bg-green-50"],
    [class*="bg-yellow-50"],
    [class*="bg-blue-50"] {
        background: #fff !important;
        border: 1px solid #ccc !important;
    }

    /* Links: show as text, don't underline */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Property image: constrain for print */
    .print-img-small {
        max-height: 120px !important;
        object-fit: cover;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .property-card {
        border: 2px solid #000;
    }

    button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
