/* Multi-Room Booking Styles */

/* Room Grid Layout */
.rooms-section {
    padding: 2rem 0;
    background: #f8f9fa;
}

.rooms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.room-limit-indicator {
    flex: 1;
    max-width: 300px;
}

.limit-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.limit-progress {
    height: 100%;
    background: #3498db;
    transition: width 0.3s ease;
}

.limit-text {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
}

/* Room Card Styles */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .rooms-grid {
        grid-template-columns: 1fr;
    }
}

.room-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.room-card.selected {
    border: 2px solid #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* Room Image */
.room-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Room Details */
.room-details {
    padding: 1.5rem;
    flex: 1;
}

.room-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.room-description {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.room-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.room-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #495057;
}

.room-features i {
    color: #3498db;
}

.room-availability {
    font-size: 0.875rem;
    color: #28a745;
    font-weight: 500;
}

/* Room Pricing */
.room-pricing {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.price-per-night {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.currency {
    font-size: 1rem;
    color: #6c757d;
}

.amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
}

.period {
    font-size: 0.875rem;
    color: #6c757d;
}

.total-price {
    font-size: 0.875rem;
    color: #495057;
    margin-bottom: 1rem;
}

/* Room Controls */
.room-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.room-quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.room-quantity-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.room-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    font-weight: 600;
    font-size: 1.125rem;
    min-width: 30px;
    text-align: center;
}

.room-select-btn,
.remove-room-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.room-select-btn {
    background: #3498db;
    color: white;
}

.room-select-btn:hover:not(:disabled) {
    background: #2980b9;
}

.room-select-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.remove-room-btn {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.remove-room-btn:hover {
    background: #dc3545;
    color: white;
}

/* Booking Summary */
.booking-summary-container {
    position: sticky;
    top: 1rem;
}

#bookingSummary {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.summary-header h3 {
    font-size: 1.125rem;
    margin: 0;
}

.room-count {
    background: #e7f3ff;
    color: #3498db;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.selected-rooms {
    margin-bottom: 1.5rem;
}

.summary-room {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-room:last-child {
    border-bottom: none;
}

.summary-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.summary-room-price {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-room-price .subtotal {
    font-weight: 600;
    color: #2c3e50;
}

.summary-totals {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.summary-line.total {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2c3e50;
    padding-top: 0.75rem;
    border-top: 2px solid #e9ecef;
}

.empty-summary {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-summary i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-summary p {
    margin: 0.5rem 0;
}

.text-muted {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Loading and Error States */
.loading-state,
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.loading-state i,
.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-state i {
    color: #dc3545;
}

/* Responsive Layout */
@media (min-width: 992px) {
    .rooms-container {
        display: grid;
        grid-template-columns: 1fr 350px;
        gap: 2rem;
        align-items: start;
    }
}

@media (max-width: 991px) {
    .booking-summary-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        max-height: 50vh;
        overflow-y: auto;
    }
    
    #bookingSummary {
        border-radius: 0;
        box-shadow: none;
    }
    
    .rooms-section {
        padding-bottom: 100px; /* Account for fixed summary */
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Utility Classes */
.btn-block {
    width: 100%;
}

.btn-primary {
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-text {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.5rem;
}

/* Accessibility */
.room-card:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}