/* Custom styles for the Hotel Platform */

/* Status colors */
.bg-pending {
    background-color: #f6c23e !important; /* yellow */
}

.bg-approved, .bg-confirmed {
    background-color: #36b9cc !important; /* info blue */
}

.bg-processing, .bg-preparing {
    background-color: #4e73df !important; /* primary blue */
}

.bg-delivering, .bg-ready {
    background-color: #f8f9fc !important; /* light blue-gray */
    color: #4e73df !important;
    border: 1px solid #4e73df;
}

.bg-completed, .bg-delivered {
    background-color: #1cc88a !important; /* green */
}

.bg-cancelled, .bg-rejected {
    background-color: #e74a3b !important; /* red */
}

/* General styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}

/* Custom colors */
.bg-hotel-primary {
    background-color: #1a73e8;
}

.text-hotel-primary {
    color: #1a73e8;
}

/* Card styling */
.card {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Button styling */
.btn-hotel {
    background-color: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

.btn-hotel:hover {
    background-color: #0d47a1;
    border-color: #0d47a1;
}

/* Form styling */
.form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 0.25rem rgba(26, 115, 232, 0.25);
}

/* QR code container */
.qr-code-container {
    display: inline-block;
    padding: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Hotel card styling */
.hotel-card {
    height: 100%;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hotel-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Hotel detail page */
.hotel-header {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    color: white;
}

.hotel-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin panel styling */
.admin-sidebar {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
    padding-top: 20px;
}

.admin-sidebar .nav-link {
    color: #495057;
}

.admin-sidebar .nav-link:hover {
    background-color: #e9ecef;
}

.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: #1a73e8;
}

/* Basic styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Profile styles */
.profile-icon img {
  max-width: 40px;
  max-height: 40px;
}

.content-header-area {
  padding: 0.5rem;
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
}

/* ======= GALLERY STYLES (ANTI-FLICKERING) ======= */

/* Gallery container */
.gallery-container {
    margin: 0 -5px;
}

/* Gallery item container */
.gallery-item {
    height: 160px;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 5px;
}

/* Gallery image styling */
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    will-change: transform;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* Prevent image flickering */
img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
}

/* Modal improvements */
#galleryModal {
    background-color: rgba(0,0,0,0.85);
}

.modal-backdrop {
    display: none !important;
}

.modal.fade .modal-dialog {
    transition: transform 0.2s ease-out !important;
    transform: translate(0, 0) !important;
}

.modal-content {
    background-color: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
}

.modal-body {
    padding: 20px;
}

.modal-body img {
    max-height: 70vh;
    border-radius: 4px;
}

/* Fix for card hover from affecting gallery */
.card:has(.gallery-container):hover {
    transform: none;
}

/* Add these CSS rules to fix dropdown menus being constrained within parent containers */

/* Ensure the dropdown menu isn't clipped by parent containers */
.dropdown-menu {
    position: absolute;
    z-index: 1050 !important;
    overflow: visible;
}

/* Fix for any parent containers that might be constraining the dropdown */
.card,
.table-responsive,
.container,
.container-fluid {
    overflow: visible !important;
}

/* For tables with dropdown actions */
.table-actions .dropdown-menu {
    transform: none !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
}

/* Fix for dropdown button triggering the menu */
.dropdown-toggle {
    position: relative;
}

/* Add this class to your table rows if needed */
.table tr {
    overflow: visible !important;
}

/* For status dropdown specifically */
.status-dropdown .dropdown-menu {
    max-height: none;
    overflow: visible;
}