/* Enhanced Calendar Styles - Comprehensive Merged Version */

/* Calendar Animation */
@keyframes calendarSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calendar View Container - Remove extra padding */
#calendarView .fluent-card {
    padding: 0 !important;
    margin: 0;
}

/* Ensure calendar view takes full width */
#calendarView {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ENHANCED: Row Layout for Calendar - Desktop Minimal */
.calendar-row-layout {
    display: flex;
    gap: 0.375rem;
    min-height: 280px;
    max-height: 340px;
    padding: 0.375rem;
    /* Comment #19: Flat design - no gradients */
    background-color: #f8f9fa;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin: 0;
    transition: max-height 0.3s ease-in-out;
}

/* Extended view - allow more height for extra weeks */
.calendar-row-layout.extended-view {
    max-height: 480px;
    min-height: 420px;
}

/* Left Panel: Calendar Grid (SWAPPED) - Desktop Minimal */
.calendar-grid-panel {
    flex: 0 0 280px;
    /* Minimal width for ultra-compact fit */
    width: 280px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--bs-white, #ffffff);
    border-radius: var(--radius-sm);
    padding: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(85, 107, 47, 0.08); /* Comment #19: Muted olive green */
}

/* Calendar View inside grid panel */
.calendar-grid-panel .calendar-view {
    flex: 1;
}

/* Calendar Legend at top of calendar - Ultra Compact */
.calendar-grid-panel .calendar-legend {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.375rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: var(--radius-sm);
    border: 1px solid #e9ecef;
    margin-bottom: 0.375rem;
}

/* Right Panel: Details and Legend (SWAPPED) - Desktop Minimal */
.calendar-details-panel {
    flex: 1;
    /* Take up remaining space */
    min-width: 200px;
    max-width: calc(100% - 280px - 0.375rem);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    background: var(--bs-white, #ffffff);
    border-radius: var(--radius-sm);
    padding: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(85, 107, 47, 0.08); /* Comment #19: Muted olive green */
}

/* Enhanced Calendar Navigation - Ultra Compact */
.calendar-navigation {
    padding: 0.375rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

.calendar-title-section h5 {
    color: #2c3e50;
    font-weight: 600;
}

.calendar-controls-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-month-year-display {
    min-width: 140px;
    text-align: center;
}

.calendar-month-year-display .fw-semibold {
    font-size: 1.1rem;
    color: #0d6efd;
}

/* Calendar navigation buttons styling */
.calendar-navigation .btn-group .btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    min-width: 44px;
}

.calendar-navigation .btn-group .btn:hover {
    /* Comment #19: Flat design - no transforms or shadows */
    transform: none;
    box-shadow: none;
}

/* Ultra compact mobile calendar navigation */
@media (max-width: 768px) {
    .calendar-navigation {
        padding: 0.25rem;
    }

    .calendar-navigation .d-flex {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.25rem !important;
    }

    .calendar-title-section h5 {
        font-size: 0.9rem !important;
        margin: 0 !important;
    }

    .calendar-month-year-display {
        min-width: auto !important;
        flex: 1 !important;
        text-align: center !important;
        font-size: 0.85rem !important;
    }

    .calendar-navigation .btn-group {
        gap: 0.125rem !important;
    }

    .calendar-navigation .btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
        min-width: 32px !important;
        height: 32px !important;
    }

    .calendar-controls-section {
        justify-content: space-between;
        width: 100%;
    }

    .calendar-month-year-display {
        min-width: auto;
        flex: 1;
    }
}

/* Selected Date Panel Styling - Desktop Minimal */
.selected-date-panel {
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    padding: 0.375rem;
    border: 1px solid #e9ecef;
}

.selected-date-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.375rem;
    margin-bottom: 0.5rem;
}

.selected-date-header h6 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* Room Types List - Desktop Minimal */
.room-types-list {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.room-type-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-sm);
    padding: 0.375rem;
    margin-bottom: 0.375rem;
    transition: all 0.2s ease;
}

.room-type-item:hover {
    border-color: #556B2F; /* Comment #19: Muted olive green */
    box-shadow: none; /* Comment #19: Flat design - no shadows */
}

.room-type-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.room-type-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
}

.room-type-subtitle {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.2;
}

.room-type-availability {
    text-align: right;
    font-size: 0.75rem;
}

.availability-count {
    font-weight: 600;
    color: #28a745;
}

.rate-packages-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rate-package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0.3rem;
    background: #f8f9fa;
    border-radius: var(--radius-xs);
    border: 1px solid #e9ecef;
}

.rate-package-name {
    font-size: 0.75rem;
    color: #495057;
    line-height: 1.2;
}

.rate-package-price {
    font-weight: 600;
    color: #556B2F; /* Comment #19: Muted olive green */
    font-size: 0.75rem;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .calendar-row-layout {
        flex-direction: column;
        gap: 1rem;
        min-height: auto;
        max-height: none;
        padding: 0.5rem;
    }

    .calendar-details-panel {
        order: 2;
        /* Show details below calendar on mobile */
    }

    .calendar-grid-panel {
        flex: none;
        order: 1;
        /* Show calendar first on mobile */
        width: 100% !important;
        min-width: auto !important;
    }
}

@media (max-width: 576px) {
    .calendar-row-layout {
        gap: 0.5rem;
        padding: 0.375rem;
    }

    .calendar-details-panel {
        flex-basis: auto;
    }
}

/* Small Height Screens (Desktop/Laptop) - Prevent scrolling */
@media (max-height: 800px) {
    .calendar-row-layout {
        min-height: 240px;
        max-height: 280px;
        padding: 0.25rem;
    }

    .calendar-grid-panel {
        padding: 0.25rem;
        width: 250px;
        flex: 0 0 250px;
    }

    .calendar-details-panel {
        padding: 0.25rem;
        max-width: calc(100% - 250px - 0.25rem);
    }

    .calendar-grid-panel .calendar-legend {
        padding: 0.2rem;
        margin-bottom: 0.2rem;
        gap: 0.375rem;
    }

    .room-types-list {
        max-height: 140px;
    }

    .selected-date-panel {
        padding: 0.25rem;
    }

    .calendar-day {
        min-height: 18px;
        min-width: 24px;
        padding: 0.05rem 0.025rem;
    }

    .day-number {
        font-size: 0.6rem;
        margin-bottom: 0.01rem;
        line-height: 0.8;
    }

    .availability-text {
        font-size: 0.5rem;
        line-height: 0.9;
    }

    .availability-indicator {
        width: 6px;
        height: 6px;
        margin: 0.5px 0;
    }

    .calendar-header {
        padding: 0.2rem 0.1rem;
        font-size: 0.55rem;
        min-width: 24px;
    }
}

@media (max-height: 700px) {
    .calendar-row-layout {
        min-height: 200px;
        max-height: 240px;
        padding: 0.2rem;
    }

    .calendar-grid-panel {
        width: 220px;
        flex: 0 0 220px;
        padding: 0.2rem;
    }

    .calendar-details-panel {
        padding: 0.2rem;
        max-width: calc(100% - 220px - 0.2rem);
    }

    .calendar-day {
        min-height: 16px;
        min-width: 22px;
        padding: 0.03rem 0.02rem;
    }

    .day-number {
        font-size: 0.55rem;
        margin-bottom: 0;
        line-height: 0.7;
    }

    .calendar-header {
        padding: 0.15rem 0.05rem;
        font-size: 0.5rem;
        min-width: 22px;
    }

    .room-types-list {
        max-height: 100px;
    }

    .room-type-item {
        padding: 0.2rem;
        margin-bottom: 0.2rem;
    }

    .rate-package-item {
        padding: 0.1rem 0.2rem;
    }

    .availability-text {
        font-size: 0.45rem;
        line-height: 0.8;
    }

    .availability-indicator {
        width: 5px;
        height: 5px;
        margin: 0;
    }

    .calendar-grid-panel .calendar-legend {
        padding: 0.15rem;
        margin-bottom: 0.15rem;
        gap: 0.25rem;
    }

    .selected-date-panel {
        padding: 0.2rem;
    }
}

/* Ultra small height screens - maximum compactness */
@media (max-height: 600px) {
    .calendar-row-layout {
        min-height: 160px;
        max-height: 200px;
        padding: 0.1rem;
    }

    .calendar-grid-panel {
        width: 200px;
        flex: 0 0 200px;
        padding: 0.15rem;
    }

    .calendar-details-panel {
        padding: 0.15rem;
        max-width: calc(100% - 200px - 0.1rem);
    }

    .calendar-day {
        min-height: 14px;
        min-width: 20px;
        padding: 0.02rem 0.01rem;
    }

    .day-number {
        font-size: 0.5rem;
        margin-bottom: 0;
        line-height: 0.6;
    }

    .calendar-header {
        padding: 0.1rem 0.03rem;
        font-size: 0.45rem;
        min-width: 20px;
    }

    .room-types-list {
        max-height: 80px;
    }

    .room-type-item {
        padding: 0.15rem;
        margin-bottom: 0.15rem;
    }

    .rate-package-item {
        padding: 0.08rem 0.15rem;
    }

    .availability-text {
        font-size: 0.4rem;
        line-height: 0.7;
    }

    .availability-indicator {
        width: 4px;
        height: 4px;
        margin: 0;
    }

    .calendar-grid-panel .calendar-legend {
        padding: 0.1rem;
        margin-bottom: 0.1rem;
        gap: 0.2rem;
    }

    .selected-date-panel {
        padding: 0.15rem;
    }

    .room-type-title {
        font-size: 0.8rem;
    }

    .room-type-subtitle {
        font-size: 0.7rem;
    }

    .rate-package-name,
    .rate-package-price {
        font-size: 0.7rem;
    }
}

/* Calendar Grid Layout - Ultra Compact */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border: 1px solid rgba(85, 107, 47, 0.1); /* Comment #19: Muted olive green */
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    backdrop-filter: blur(5px);
}

/* Calendar Headers - Desktop Ultra Compact */
.calendar-header {
    /* Comment #19: Flat design - solid olive green, no gradients */
    background-color: #556B2F; /* Comment #19: Muted olive green */
    color: white;
    padding: 0.3rem 0.15rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.1px;
    min-width: 32px;
    /* Match calendar day minimum width */
    line-height: 1.1;
}

/* Enhanced Calendar Day Cells - Desktop Ultra Compact */
.calendar-day {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 22px;
    min-width: 28px;
    padding: 0.1rem 0.05rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(3px);
    overflow: hidden;
}

.calendar-day:hover {
    /* Comment #19: Flat design - no gradients or transforms */
    background-color: #f8f9fa;
    transform: none; /* Flat design - no transforms */
    box-shadow: none; /* Comment #19: Flat design - no shadows */
    border-color: rgba(85, 107, 47, 0.3); /* Comment #19: Muted olive green */
    z-index: 5;
}

.calendar-day.hover {
    background-color: #e3f2fd;
    border-color: #556B2F; /* Comment #19: Muted olive green */
}

/* Enhanced Day Number Styling - Desktop Ultra Compact */
.day-number {
    font-weight: 600;
    font-size: 0.65rem;
    color: #2c3e50;
    margin-bottom: 0.02rem;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    line-height: 0.9;
}

/* Calendar Day States */
.calendar-day.other-month {
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    color: #9ca3af;
    opacity: 0.7;
}

.calendar-day.other-month .day-number {
    color: #9ca3af;
}

.calendar-day.other-month:hover {
    background-color: #e5e7eb;
}

.calendar-day.past-date {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

.calendar-day.past-date::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 4px,
            rgba(148, 163, 184, 0.1) 4px,
            rgba(148, 163, 184, 0.1) 8px);
    pointer-events: none;
}

.calendar-day.past-date:hover {
    transform: none;
    box-shadow: none;
    background-color: #f1f5f9;
}

.calendar-day.past-date .day-number {
    color: #94a3b8;
}

.calendar-day.today {
    /* FIXED Comment #6: Today is unavailable (same-day bookings disabled) - grey styling */
    border: 2px solid #9ca3af !important;
    background: #e5e7eb !important;
    box-shadow: none !important;
    opacity: 0.6;
    cursor: not-allowed !important;
    animation: none !important;
}

@keyframes todayPulse {

    0%,
    100% {
        box-shadow: none; /* Comment #19: Flat design - no shadows */
    }

    50% {
        box-shadow: none; /* Comment #19: Flat design - no shadows */
    }
}

.calendar-day.today .day-number {
    color: #6b7280 !important;
    font-weight: 500;
}

.calendar-day.today.past-date {
    /* Ensure today is treated as unavailable */
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
}

.calendar-day.selected {
    /* Comment #19: Medium olive green for selected/picked state - flat design */
    background-color: #7A9F35;
    color: white;
    border: 3px solid #ffffff;
    box-shadow: none; /* Flat design - no shadows */
    transform: none; /* Flat design - no transforms */
    z-index: 10;
}

/* Light theme range styling - Sandy brown for selected range */
.calendar-day.in-range {
    background-color: rgba(210, 180, 140, 0.4) !important; /* Sandy brown with transparency */
    color: #ffffff !important;
    border: 2px solid #D2B48C !important; /* Sandy brown */
    box-shadow: none !important; /* Flat design - no shadows */
    transform: none !important; /* Flat design - no transforms */
}

/* CHECK-IN DATE - Dark and prominent (where stay begins) */
.calendar-day.range-start,
.calendar-day.range-start.selected {
    /* Comment #19: Medium olive green for selected/picked state - flat design */
    background-color: #7A9F35 !important;
    color: #ffffff !important;
    border: 3px solid #ffffff !important;
    box-shadow: none !important; /* Comment #19: Flat design - no shadows */
    font-weight: 700 !important;
    transform: none !important; /* Flat design - no transforms */
    z-index: 20 !important;
}

/* CHECKOUT DATE - Light and subtle (just departure date, not a stay night) */
.calendar-day.range-end,
.calendar-day.range-end.selected {
    /* Comment #19: Flat design - sandy brown for checkout, no gradients */
    background-color: rgba(210, 180, 140, 0.6) !important; /* Lighter sandy brown */
    color: #5a4a3a !important; /* Dark brown text for contrast */
    border: 2px solid #D2B48C !important; /* Sandy brown */
    box-shadow: none !important; /* Flat design - no shadows */
    font-weight: 600 !important;
    transform: none !important; /* Flat design - no transforms */
    z-index: 19 !important;
}

.calendar-day.in-range .day-number {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.calendar-day.range-start .day-number,
.calendar-day.range-start.selected .day-number {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.calendar-day.range-end .day-number,
.calendar-day.range-end.selected .day-number {
    color: #5a4a3a !important; /* Dark brown for contrast */
    font-weight: 600 !important;
}

.calendar-day.selected .day-number {
    color: white;
}

.calendar-day.selected .availability-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Enhanced Availability Indicators */
.availability-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 1px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    position: relative;
}

.availability-indicator::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    z-index: -1;
    transition: all 0.2s ease;
}

.calendar-day:hover .availability-indicator::before {
    opacity: 0.5;
    transform: scale(1.2);
}

.availability-indicator.available {
    background-color: #28a745;
}

.availability-indicator.limited {
    background-color: #ffc107;
}

.availability-indicator.unavailable {
    background-color: #dc3545;
}

.availability-text {
    font-size: 0.55rem;
    font-weight: 500;
    text-align: center;
    line-height: 1;
    margin-top: 1px;
    opacity: 0.8;
}

/* Availability-based day styling */
.calendar-day.availability-available {
    border-left: 4px solid #28a745;
}

.calendar-day.availability-limited {
    border-left: 4px solid #ffc107;
}

.calendar-day.availability-unavailable {
    border-left: 4px solid #dc3545;
    cursor: not-allowed;
}

.calendar-day.availability-unavailable:hover {
    transform: none;
    background-color: #fff5f5;
    box-shadow: none;
}

/* Selected Date Info Panel */
#selectedDateInfo {
    margin-top: 1.5rem;
}

.selected-date-actions {
    margin-top: 1rem;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: var(--radius-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-legend .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
}

/* Loading and Error States */
.calendar-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.calendar-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
}

.calendar-error {
    text-align: center;
    padding: 3rem 1rem;
    color: #dc3545;
    background: #fff5f5;
    border-radius: var(--radius-md);
    border: 1px solid #f5c6cb;
}

.calendar-error .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Enhanced mobile layout */
    .calendar-row-layout {
        flex-direction: column;
        gap: 1rem;
        min-height: auto;
        padding: 1rem;
        background: linear-gradient(135deg, #f8f9fa 0%, rgba(0, 120, 212, 0.01) 100%);
        border-radius: 12px;
    }

    /* Mobile-specific checkout date styling to ensure visibility */
    .calendar-day.range-end,
    .calendar-day.range-end.selected {
        /* Comment #19: Flat design - sandy brown for checkout, no gradients */
        background-color: rgba(210, 180, 140, 0.6) !important; /* Lighter sandy brown */
        color: #5a4a3a !important; /* Dark brown text for contrast */
        border: 2px solid #D2B48C !important; /* Sandy brown */
        box-shadow: none !important; /* Flat design - no shadows */
        font-weight: 600 !important;
        transform: none !important; /* Flat design - no transforms */
        z-index: 19 !important;
    }

    /* Mobile dark theme checkout date */
    [data-theme="dark"] .calendar-day.range-end,
    [data-theme="dark"] .calendar-day.range-end.selected {
        /* Comment #19: Flat design - sandy brown for checkout, no gradients */
        background-color: rgba(210, 180, 140, 0.6) !important; /* Lighter sandy brown */
        color: #5a4a3a !important; /* Dark brown text for contrast */
        border: 2px solid #D2B48C !important; /* Sandy brown */
        box-shadow: none !important; /* Flat design - no shadows */
        font-weight: 600 !important;
        transform: none !important; /* Flat design - no transforms */
        z-index: 19 !important;
    }

    /* Both panels take full width on mobile */
    .calendar-grid-panel,
    .calendar-details-panel {
        flex: none;
        width: 100%;
        min-width: 280px;
        padding: 1rem;
        border-radius: var(--radius-md);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    /* Calendar on mobile - override fixed width */
    .calendar-grid-panel {
        order: 1;
        /* Calendar first on mobile */
        width: 100% !important;
        flex: none !important;
    }

    /* Details panel on mobile */
    .calendar-details-panel {
        order: 2;
        /* Details second on mobile */
        flex-basis: auto;
    }

    /* Enhanced calendar grid for mobile */
    .calendar-grid {
        gap: 1px;
        border-radius: var(--radius-md);
        max-width: 100% !important;
        border-width: 1px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    /* ENHANCED MOBILE CALENDAR CELLS - Much larger and more readable */
    .calendar-day {
        min-height: 80px !important;
        min-width: 70px !important;
        padding: 0.5rem 0.25rem !important;
        border-radius: var(--radius-sm);
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .day-number {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .availability-text {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
        font-weight: 600 !important;
    }

    .availability-indicator {
        width: 12px !important;
        height: 12px !important;
        margin: 3px 0 !important;
        border-radius: 50% !important;
    }

    /* Legend adjustments for mobile */
    .calendar-grid-panel .calendar-legend {
        gap: 1rem;
        justify-content: space-around;
        padding: 0.75rem;
    }

    .legend-item {
        font-size: 0.85rem;
    }

    .availability-text {
        font-size: 0.6rem;
    }

    /* ENHANCED MOBILE CALENDAR HEADERS - Much more readable */
    .calendar-header {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.9rem !important;
        min-height: 60px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        font-weight: 700 !important;
    }

    /* ENHANCED MOBILE WEEKEND HEADERS - More prominent styling */
    .calendar-header.weekend {
        background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
        color: white !important;
        font-weight: 800 !important;
        border: 2px solid #e65100 !important;
        box-shadow: 0 3px 8px rgba(255, 152, 0, 0.3) !important;
        transform: scale(1.02) !important;
    }

    /* ENHANCED MOBILE HOLIDAY HEADERS - More prominent styling */
    .calendar-header.holiday {
        background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
        color: white !important;
        font-weight: 800 !important;
        border: 2px solid #c62828 !important;
        box-shadow: 0 3px 8px rgba(244, 67, 54, 0.3) !important;
        transform: scale(1.02) !important;
    }

    .availability-indicator {
        width: 6px;
        height: 6px;
    }

    .selected-date-panel {
        padding: 0.75rem;
    }

    .room-type-item {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {

    /* ENHANCED SMALL MOBILE CALENDAR - Still readable */
    .calendar-day {
        min-height: 70px !important;
        min-width: 60px !important;
        padding: 0.4rem 0.2rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .day-number {
        font-size: 1rem !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .availability-text {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        line-height: 1.3 !important;
    }

    .calendar-legend {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .legend-item {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .calendar-header {
        min-height: 50px !important;
        padding: 0.6rem 0.4rem !important;
        font-size: 0.8rem !important;
    }

    /* Enhanced small mobile weekend headers */
    .calendar-header.weekend {
        background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
        color: white !important;
        font-weight: 800 !important;
        border: 2px solid #e65100 !important;
        transform: scale(1.01) !important;
    }

    .calendar-header.holiday {
        background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
        color: white !important;
        font-weight: 800 !important;
        border: 2px solid #c62828 !important;
        transform: scale(1.01) !important;
    }
}

/* Enhanced Dark Theme Support */
[data-theme="dark"] .calendar-row-layout {
    /* Comment #19: Flat design - no gradients */
    background-color: #1e1e1e;
}

[data-theme="dark"] .calendar-grid-panel,
[data-theme="dark"] .calendar-details-panel {
    background: #2d2d30;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .calendar-grid {
    /* Comment #19: Flat design - no gradients */
    background-color: #374151;
    border-color: rgba(85, 107, 47, 0.2); /* Muted olive green border */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar-day {
    /* Comment #19: Flat design - no gradients */
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: rgba(85, 107, 47, 0.1); /* Muted olive green border */
}

[data-theme="dark"] .calendar-day .day-number {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .calendar-day:hover {
    /* Comment #19: Flat design - lighter green on hover, no gradients */
    background-color: #2d3748;
    border-color: rgba(106, 142, 35, 0.4); /* Medium olive green border */
    box-shadow: none !important; /* Flat design - no shadows */
}

[data-theme="dark"] .calendar-day.other-month {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #64748b;
    opacity: 0.6;
}

[data-theme="dark"] .calendar-day.other-month .day-number {
    color: #64748b;
}

[data-theme="dark"] .calendar-day.past-date {
    background: linear-gradient(135deg, #0f1419 0%, #1a202c 100%);
    color: #475569;
    opacity: 0.5;
}

[data-theme="dark"] .calendar-day.past-date::after {
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 4px,
            rgba(71, 85, 105, 0.15) 4px,
            rgba(71, 85, 105, 0.15) 8px);
}

[data-theme="dark"] .calendar-day.today {
    /* Comment #19: Flat design - grey for today, no gradients */
    background-color: #e5e7eb !important;
    border-color: #9ca3af !important;
    box-shadow: none !important; /* Flat design - no shadows */
}

[data-theme="dark"] .calendar-day.today .day-number {
    color: #ffffff;
    font-weight: 800;
}

[data-theme="dark"] .calendar-day.selected {
    /* Comment #19: Medium olive green for selected/picked state - flat design */
    background-color: #7A9F35 !important;
    color: #ffffff !important;
    border: 3px solid #ffffff !important;
    box-shadow: none !important; /* Flat design - no shadows */
    transform: none !important; /* Flat design - no transforms */
    z-index: 15 !important;
}

[data-theme="dark"] .calendar-day.selected .day-number {
    color: #ffffff !important;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

/* Dark theme selected range styling - Sandy brown */
[data-theme="dark"] .calendar-day.in-range {
    /* Comment #19: Flat design - sandy brown for selected range, no gradients */
    background-color: rgba(210, 180, 140, 0.5) !important; /* Sandy brown with transparency */
    color: #ffffff !important;
    border: 2px solid #D2B48C !important; /* Sandy brown */
    box-shadow: none !important; /* Flat design - no shadows */
    transform: none !important; /* Flat design - no transforms */
}

/* DARK THEME - CHECK-IN DATE */
[data-theme="dark"] .calendar-day.range-start,
[data-theme="dark"] .calendar-day.range-start.selected {
    /* Comment #19: Medium olive green for check-in - flat design */
    background-color: #7A9F35 !important;
    color: #ffffff !important;
    border: 3px solid #ffffff !important;
    box-shadow: none !important; /* Flat design - no shadows */
    font-weight: 700 !important;
    transform: none !important; /* Flat design - no transforms */
    z-index: 20 !important;
}

/* DARK THEME - CHECKOUT DATE */
[data-theme="dark"] .calendar-day.range-end,
[data-theme="dark"] .calendar-day.range-end.selected {
    /* Comment #19: Flat design - sandy brown for checkout, no gradients */
    background-color: rgba(210, 180, 140, 0.6) !important; /* Lighter sandy brown */
    color: #5a4a3a !important; /* Dark brown text for contrast */
    border: 2px solid #D2B48C !important; /* Sandy brown */
    box-shadow: none !important; /* Flat design - no shadows */
    font-weight: 600 !important;
    transform: none !important; /* Flat design - no transforms */
    z-index: 19 !important;
}

[data-theme="dark"] .calendar-day.range-start .day-number,
[data-theme="dark"] .calendar-day.range-start.selected .day-number {
    color: #ffffff !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .calendar-day.range-end .day-number,
[data-theme="dark"] .calendar-day.range-end.selected .day-number {
    color: #5a4a3a !important; /* Dark brown for contrast */
    font-weight: 600 !important;
}

/* Enhanced visibility for range dates */
[data-theme="dark"] .calendar-day.in-range .day-number {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] .calendar-day.in-range .availability-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
}

[data-theme="dark"] .calendar-navigation {
    background: linear-gradient(135deg, #2d2d30 0%, rgba(88, 166, 255, 0.05) 100%);
    border-color: rgba(88, 166, 255, 0.15);
}

[data-theme="dark"] .calendar-legend {
    background: rgba(45, 45, 48, 0.9);
    border-color: rgba(88, 166, 255, 0.15);
}

[data-theme="dark"] .selected-date-panel {
    background: linear-gradient(135deg, #2d2d30 0%, #374151 100%);
    border-color: rgba(88, 166, 255, 0.15);
}

[data-theme="dark"] .room-type-item {
    background: linear-gradient(135deg, #1e293b 0%, #2d3748 100%);
    border-color: rgba(88, 166, 255, 0.15);
    color: #e2e8f0;
}

[data-theme="dark"] .availability-indicator.available {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .availability-indicator.limited {
    background-color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .availability-indicator.unavailable {
    background-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] #selectedDateInfo .alert {
    background: linear-gradient(135deg, #1e293b 0%, #2d3748 100%);
    color: #e2e8f0;
    border-left-color: #556B2F; /* Comment #19: Muted olive green */
}

[data-theme="dark"] #selectedDateTitle {
    color: #e2e8f0;
}

[data-theme="dark"] .selected-date-panel {
    background-color: #1e293b;
    border-color: #374151;
    color: #e2e8f0;
}

[data-theme="dark"] .room-type-item {
    background-color: #1e293b;
    border-color: #374151;
    color: #e2e8f0;
}

[data-theme="dark"] .calendar-legend {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: #374151;
}

[data-theme="dark"] .calendar-navigation {
    background-color: #1e293b;
    border-color: #374151;
}

/* Optimization Suggestions Styles */
.optimization-suggestions {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #0078d4;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
    box-shadow: none; /* Comment #19: Flat design - no shadows */
}

.optimization-suggestions h6 {
    color: #556B2F; /* Comment #19: Muted olive green */
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.optimization-suggestions .alert {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.recommendations {
    margin-bottom: 0.75rem;
}

.recommendation-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 120, 212, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.recommendation-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #556B2F; /* Comment #19: Muted olive green */
    transform: translateY(-1px);
    box-shadow: none; /* Comment #19: Flat design - no shadows */
}

.alternatives {
    margin-top: 0.75rem;
}

.alternatives .btn {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Dark Theme Support for Optimization Suggestions */
[data-theme="dark"] .optimization-suggestions {
    background: linear-gradient(135deg, #1e3a8a 0%, #2d1b69 100%);
    border-color: #58a6ff;
    color: #e2e8f0;
}

[data-theme="dark"] .optimization-suggestions h6 {
    color: #58a6ff;
}

[data-theme="dark"] .recommendation-item {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(88, 166, 255, 0.3);
    color: #e2e8f0;
}

[data-theme="dark"] .recommendation-item:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: #58a6ff;
}

/* Force visibility for debugging */
.optimization-suggestions {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* Print Styles */
@media print {

    .calendar-navigation,
    .selected-date-actions {
        display: none !important;
    }

    .calendar-row-layout {
        flex-direction: column;
        page-break-inside: avoid;
    }

    .calendar-grid {
        box-shadow: none;
        border: 2px solid #000;
    }

    .calendar-day {
        border: 1px solid #ccc;
        min-height: 60px;
    }

    .availability-indicator {
        border: 1px solid #000;
    }

    .legend-dot {
        border: 1px solid #000;
    }
}

/* Accessibility Enhancements */
.calendar-day:focus {
    outline: 3px solid #0078d4;
    outline-offset: 2px;
    z-index: 3;
}

.calendar-day[aria-selected="true"] {
    /* Comment #19: Flat design - solid olive green, no gradients */
    background-color: #556B2F; /* Comment #19: Muted olive green */
    color: white;
}

/* Animation for calendar transitions */
.calendar-transition {
    animation: calendarSlide 0.3s ease-in-out;
}

@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Tooltip styles for calendar days */
.calendar-day[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 5px;
}

.calendar-day[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 10;
}

/* Success state for completed bookings */
.calendar-day.booking-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    animation: successPulse 1s ease-out;
}

/* ===== INTEGRATED SEARCH PANEL STYLES ===== */

/* Integrated search panel within availability header - More visible */
.integrated-search-panel {
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.08) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 2px solid rgba(0, 120, 212, 0.2);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin: 0.75rem 0 1rem 0;
    backdrop-filter: blur(10px);
    box-shadow: none; /* Comment #19: Flat design - no shadows */
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

.integrated-search-panel:hover {
    box-shadow: none; /* Comment #19: Flat design - no shadows */
    border-color: rgba(0, 120, 212, 0.2);
}

/* Search controls layout - Left aligned */
.search-controls {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 2rem;
    max-width: 100%;
    margin: 0;
    flex-wrap: wrap;
    width: 100%;
}

/* Date Range Display Panel */
.date-range-display {
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.08) 0%, rgba(0, 120, 212, 0.02) 100%);
    border: 1px solid rgba(0, 120, 212, 0.15);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin: 0;
    box-shadow: none; /* Comment #19: Flat design - no shadows */
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    position: relative;
    z-index: var(--z-search-controls, 420);
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    box-sizing: border-box;
    order: 2;
}

.date-range-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}

.date-range-item {
    text-align: center;
    min-width: 80px;
}

.date-range-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.date-range-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.date-range-nights {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.2;
}

.date-range-separator {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin: 0 0.5rem;
}

.date-range-separator i {
    opacity: 0.7;
}

/* Hover effect for date range display */
.date-range-display:hover {
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.12) 0%, rgba(0, 120, 212, 0.04) 100%);
    border-color: rgba(0, 120, 212, 0.25);
    box-shadow: none; /* Comment #19: Flat design - no shadows */
}

/* Dark Theme Support for Date Range Display */
[data-theme="dark"] .date-range-display {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08) 0%, rgba(88, 166, 255, 0.02) 100%);
    border-color: rgba(88, 166, 255, 0.15);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.08);
}

[data-theme="dark"] .date-range-display:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.12) 0%, rgba(88, 166, 255, 0.04) 100%);
    border-color: rgba(88, 166, 255, 0.25);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.12);
}

[data-theme="dark"] .date-range-label {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .date-range-date {
    color: #58a6ff;
}

[data-theme="dark"] .date-range-nights {
    color: #7c3aed;
}

[data-theme="dark"] .date-range-separator {
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Responsive Design for Date Range Display */
@media (max-width: 768px) {
    .search-controls {
        gap: 1rem;
    }

    .date-inputs-group {
        min-width: 100%;
        max-width: 100%;
        flex-basis: 100%;
        order: 1;
    }

    .date-range-display {
        padding: 0.75rem 1rem;
        margin: 0.75rem 0 0 0;
        border-radius: 8px;
        min-width: 100%;
        max-width: 100%;
        flex-basis: 100%;
        order: 2;
    }

    .date-range-content {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .date-range-item {
        min-width: 70px;
        flex: 1;
        max-width: 120px;
    }

    .date-range-label {
        font-size: 0.6rem;
    }

    .date-range-date,
    .date-range-nights {
        font-size: 1rem;
    }

    .date-range-separator {
        font-size: 1rem;
        margin: 0 0.25rem;
    }
}

@media (max-width: 480px) {
    .date-range-display {
        padding: 0.5rem 0.75rem;
        margin-top: 0.5rem;
        border-radius: 6px;
    }

    .date-range-content {
        gap: 0.75rem;
        flex-direction: row;
        justify-content: space-between;
    }

    .date-range-item {
        min-width: 60px;
        flex: 1;
    }

    .date-range-label {
        font-size: 0.55rem;
        margin-bottom: 0.2rem;
    }

    .date-range-date,
    .date-range-nights {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .date-range-separator {
        font-size: 0.9rem;
        margin: 0 0.2rem;
    }

    .date-range-separator i {
        font-size: 0.8rem;
    }
}

/* Date inputs group - Better spacing and layout */
.date-inputs-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex: 0 0 auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: 200px;
    max-width: 450px;
    order: 1;
}

/* Individual date input containers - Fixed width to prevent overlap */
.date-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 180px;
    max-width: 200px;
    flex: 0 0 auto;
}

/* Form labels - Compact horizontal layout */
.date-input-container .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    min-width: fit-content;
}

/* Date inputs - Proper input field styling with full width */
.date-input-container .date-input {
    border: 2px solid rgba(0, 120, 212, 0.2);
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    width: 100%;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.date-input-container .date-input:focus {
    border-color: var(--bs-primary);
    box-shadow: none; /* Comment #19: Flat design - no shadows */
    background: white;
    outline: none;
}

.date-input-container .date-input:hover {
    border-color: rgba(0, 120, 212, 0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.date-input-container .date-input::placeholder {
    color: #999;
    font-style: italic;
}

/* Dark theme support */
[data-theme="dark"] .integrated-search-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .date-input-container .date-input {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .date-input-container .date-input:focus {
    background: rgba(40, 40, 40, 1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .date-input-container .date-input:hover {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .date-input-container .date-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .date-input-container .form-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile responsive design - Ultra compact */
@media (max-width: 768px) {
    .integrated-search-panel {
        margin: 0.25rem 0 0.5rem 0;
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
    }

    .search-controls {
        gap: 0.5rem;
    }

    .date-inputs-group {
        flex-direction: row;
        gap: 0.5rem;
        align-items: stretch;
        justify-content: space-between;
    }

    .date-input-container {
        min-width: 0;
        max-width: none;
        gap: 0.125rem;
        flex-direction: column;
        flex: 1;
    }

    .date-input-container .form-label {
        font-size: 0.65rem !important;
        margin-bottom: 0.1rem;
        min-width: auto;
        flex-shrink: 0;
        line-height: 1.1;
    }

    .date-input-container .date-input {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.8rem !important;
        min-height: auto;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .integrated-search-panel {
        padding: 0.25rem 0.5rem;
        margin: 0.125rem 0 0.25rem 0;
    }

    .date-inputs-group {
        gap: 0.375rem;
    }

    .date-input-container .form-label {
        font-size: 0.6rem !important;
        margin-bottom: 0.075rem;
        line-height: 1;
    }

    .date-input-container .date-input {
        padding: 0.25rem 0.375rem !important;
        font-size: 0.75rem !important;
        line-height: 1.1;
    }
}

/* ===== ENHANCED SPACING AND LAYOUT OPTIMIZATIONS ===== */

/* Availability header spacing improvements - Ultra compact */
.availability-header-redesigned {
    margin-bottom: 0.25rem;
    padding-bottom: 0;
}

/* Ultra-compact title section with flex layout */
.availability-title-section {
    margin-bottom: 0.125rem;
    padding-bottom: 0.125rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Compact title styling - Smaller font size */
.availability-title {
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
    font-weight: 600;
    flex: 0 0 auto;
    line-height: 1.2;
}

/* Legend and Min Stay Group - positioned on right, 2 lines */
.legend-minstay-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    margin-left: auto;
}

/* Inline legend styling */
.availability-legend-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 0 0 auto;
}

.legend-item-inline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-gray-700);
}

.legend-item-inline .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Legend dot colors */
.legend-dot.available {
    background-color: #28a745;
}

.legend-dot.unavailable {
    background-color: #6c757d;
}

.legend-dot.selected {
    background-color: #007bff;
}

/* Dark theme legend colors */
[data-theme="dark"] .legend-item-inline {
    color: rgba(255, 255, 255, 0.8);
}

/* Minimum Stay Indicator - smaller font, second line */
.min-stay-indicator {
    padding: 0.25rem 0.5rem;
    background: rgba(13, 110, 253, 0.08);
    border-left: 3px solid #0d6efd;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #0d6efd;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
}

.min-stay-indicator i {
    font-size: 0.7rem;
}

/* Dark theme for min stay indicator */
[data-theme="dark"] .min-stay-indicator {
    background: rgba(13, 110, 253, 0.15);
    color: #6ea8fe;
    border-left-color: #6ea8fe;
}

/* Improved navigation spacing with view selector */
.availability-navigation {
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Legend positioned below view selector */
.availability-navigation .legend-minstay-group {
    order: 2;
    margin-left: 0;
    align-items: flex-start;
    flex-direction: column;
    flex-wrap: wrap;
}

.availability-navigation .view-selector {
    order: 1;
}

.availability-navigation .date-navigation {
    order: 3;
}

/* Legend spacing optimization */
.availability-legend-redesigned {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
}

/* Calendar grid spacing */
.calendar-grid-redesigned {
    margin: 0 0 1.5rem 0;
}

/* Action footer spacing */
.availability-actions-redesigned {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(85, 107, 47, 0.08); /* Comment #19: Muted olive green */
}

/* Better spacing for the overall container */
#availabilityTableSection {
    padding-bottom: 2rem;
}

/* Optimized spacing between sections */
.container.mt-4 {
    margin-top: 2rem !important;
}

/* Dark theme enhancements */
[data-theme="dark"] .availability-title-section {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .availability-actions-redesigned {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile spacing optimizations */
@media (max-width: 768px) {
    .availability-header-redesigned {
        margin-bottom: 0.5rem;
    }

    .availability-title-section {
        margin-bottom: 0.25rem;
        padding-bottom: 0.125rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }

    .availability-title {
        font-size: 1rem !important;
    }

    .legend-minstay-group {
        align-items: flex-start;
        width: 100%;
        margin-left: 0;
    }

    .availability-legend-inline {
        gap: 0.5rem;
        width: 100%;
        justify-content: flex-start;
    }

    .legend-item-inline {
        font-size: 0.7rem;
        gap: 0.2rem;
    }

    .min-stay-indicator {
        padding: 0.25rem 0.5rem;
        font-size: 0.6rem;
        width: 100%;
    }

    .min-stay-indicator i {
        font-size: 0.65rem;
    }

    .availability-navigation {
        margin: 0.5rem 0;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .view-selector {
        order: 1;
        display: flex;
        justify-content: center;
        margin-bottom: 0.25rem;
    }

    .date-navigation {
        order: 2;
        justify-content: center;
    }

    .availability-actions-redesigned {
        margin-top: 1rem;
        padding: 1rem;
    }

    #availabilityTableSection {
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .availability-legend-redesigned {
        margin: 0.75rem 0;
        padding: 0.5rem;
    }

    .availability-actions-redesigned {
        padding: 0.75rem;
    }
}

/* ===== CLEAR SELECTION BUTTON STYLING ===== */

.btn-clear {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 0.75rem;
}

.btn-clear:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-clear:active {
    transform: translateY(0);
}

.btn-clear i {
    opacity: 0.9;
}