/**
 * Room Selection Popup Styles
 * Hotel & Guest House Management System
 * Version: 1.0.0
 */

/* ============================================================================
   MODAL STYLES
   ============================================================================ */

#roomSelectionModal .modal-dialog {
    max-width: 95vw;
    width: 95vw;
    margin: 2vh auto;
}

#roomSelectionModal .modal-content {
    height: 96vh;
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#roomSelectionModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

#roomSelectionModal .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

#roomSelectionModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#roomSelectionModal .btn-close:hover {
    opacity: 1;
}

/* ============================================================================
   NAVIGATION TABS
   ============================================================================ */

#roomTabs {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

#roomTabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    border: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

#roomTabs .nav-link:hover {
    color: #495057;
    background: rgba(102, 126, 234, 0.1);
}

#roomTabs .nav-link.active {
    color: #667eea;
    background: white;
    border-bottom: 3px solid #667eea;
}

#roomTabs .nav-link i {
    font-size: 1.1rem;
}

/* ============================================================================
   ROOM CARDS
   ============================================================================ */

.room-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 10px;
    border-width: 2px;
    height: 100%;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.room-card.border-success {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.room-card.border-danger {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
}

.room-card.border-warning {
    border-color: #ffc107 !important;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.room-card.border-info {
    border-color: #17a2b8 !important;
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
}

.room-card .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

.room-card .badge.border-success {
    background: #28a745;
    color: white;
}

.room-card .badge.border-danger {
    background: #dc3545;
    color: white;
}

.room-card .badge.border-warning {
    background: #ffc107;
    color: #212529;
}

.room-card .badge.border-info {
    background: #17a2b8;
    color: white;
}

/* ============================================================================
   SEARCH AND FILTER CONTROLS
   ============================================================================ */

.input-group .input-group-text {
    background: #f8f9fa;
    border-color: #ced4da;
    color: #6c757d;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ============================================================================
   BOOKING AND CHECKIN CARDS
   ============================================================================ */

.booking-card,
.checkin-card {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.booking-card:hover,
.checkin-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.booking-card .badge,
.checkin-card .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

/* ============================================================================
   MENU AND ORDER SECTION
   ============================================================================ */

#menuCategories .list-group-item {
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
}

#menuCategories .list-group-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

#menuCategories .list-group-item.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.menu-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.menu-item .item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.menu-item .item-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.menu-item .item-price {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

.menu-item .add-to-order {
    background: #667eea;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-item .add-to-order:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

/* ============================================================================
   ORDER SUMMARY CARD
   ============================================================================ */

.order-summary {
    background: white;
    border-radius: 10px;
    border: 2px solid #667eea;
}

.order-summary .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px 8px 0 0;
}

.order-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item .item-info {
    flex: 1;
}

.order-item .item-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.order-item .item-quantity {
    color: #6c757d;
    font-size: 0.8rem;
}

.order-item .item-price {
    font-weight: 600;
    color: #28a745;
    font-size: 0.9rem;
}

.order-item .remove-item {
    background: none;
    border: none;
    color: #dc3545;
    padding: 0.25rem;
    margin-left: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.order-item .remove-item:hover {
    background: #dc3545;
    color: white;
}

/* ============================================================================
   BUTTONS AND ACTIONS
   ============================================================================ */

.btn-room-action {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-room-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #ea6666 0%, #ee0505 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    border: none;
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e85d04 100%);
    color: #212529;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc2626 100%);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%);
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #2980b9 100%);
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

#roomLoadingOverlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    #roomSelectionModal .modal-dialog {
        max-width: 98vw;
        width: 98vw;
        margin: 1vh auto;
    }
    
    #roomSelectionModal .modal-content {
        height: 98vh;
    }
    
    .room-card {
        margin-bottom: 1rem;
    }
    
    #roomTabs .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    #roomTabs .nav-link span {
        display: none;
    }
    
    #roomTabs .nav-link i {
        font-size: 1.2rem;
    }
    
    .room-card .card-body {
        padding: 1rem !important;
    }
    
    .booking-card .row,
    .checkin-card .row {
        flex-direction: column;
    }
    
    .booking-card .text-end,
    .checkin-card .text-end {
        text-align: left !important;
        margin-top: 1rem;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.border-radius-lg {
    border-radius: 12px;
}

.border-radius-xl {
    border-radius: 16px;
}

/* ============================================================================
   SCROLLBAR STYLING
   ============================================================================ */

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#menuItems,
#orderItems {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* ============================================================================
   DARK MODE SUPPORT (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .room-card.border-success {
        background: linear-gradient(135deg, #1e4b28 0%, #22543d 100%);
        color: #f7fafc;
    }
    
    .room-card.border-danger {
        background: linear-gradient(135deg, #4a1e1e 0%, #742a2a 100%);
        color: #f7fafc;
    }
    
    .room-card.border-warning {
        background: linear-gradient(135deg, #4a3619 0%, #744210 100%);
        color: #f7fafc;
    }
    
    .room-card.border-info {
        background: linear-gradient(135deg, #1a2332 0%, #2c5282 100%);
        color: #f7fafc;
    }
}
