/* SuiteFlow Hotel Management Theme */
/* CSS Custom Properties for easy theme management */

:root {
  /* Neutral/Base Colors */
  --theme-bg-primary: #f8f9fa;
  /* Light gray background */
  --theme-bg-secondary: #ffffff;
  /* White for cards/headers */
  --theme-text-primary: #212529;
  /* Dark gray text */
  --theme-text-secondary: #6c757d;
  /* Medium gray text */
  --theme-text-muted: #adb5bd;
  /* Light gray text */
  --theme-border: #dee2e6;
  /* Light border color */

  /* Primary Blue */
  --theme-primary: #0d6efd;
  /* Bootstrap primary blue */
  --theme-primary-dark: #0b5ed7;
  /* Darker blue for hover */
  --theme-primary-light: #e7f1ff;
  /* Light blue background */

  /* Semantic Colors */
  --theme-success: #198754;
  /* Green for available */
  --theme-success-light: #d1edff;
  /* Light green background */
  --theme-danger: #dc3545;
  /* Red for occupied */
  --theme-danger-light: #f8d7da;
  /* Light red background */
  --theme-warning: #ffc107;
  /* Yellow for cleaning */
  --theme-warning-light: #fff3cd;
  /* Light yellow background */

  /* Shadows and Effects */
  --theme-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --theme-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --theme-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Theme Classes */
.theme-bg-primary {
  background-color: var(--theme-bg-primary);
}

.theme-bg-secondary {
  background-color: var(--theme-bg-secondary);
}

.theme-text-primary {
  color: var(--theme-text-primary);
}

.theme-text-secondary {
  color: var(--theme-text-secondary);
}

.theme-text-muted {
  color: var(--theme-text-muted);
}

.theme-border {
  border-color: var(--theme-border);
}

/* Primary Theme Classes */
.theme-primary-bg {
  background-color: var(--theme-primary);
  color: white;
}

.theme-primary-btn {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: white;
}

.theme-primary-btn:hover {
  background-color: var(--theme-primary-dark);
  border-color: var(--theme-primary-dark);
}

/* Semantic Theme Classes */
.theme-success-bg {
  background-color: var(--theme-success);
  color: white;
}

.theme-success-light-bg {
  background-color: var(--theme-success-light);
}

.theme-success-text {
  color: var(--theme-success);
}

.theme-danger-bg {
  background-color: var(--theme-danger);
  color: white;
}

.theme-danger-light-bg {
  background-color: var(--theme-danger-light);
}

.theme-danger-text {
  color: var(--theme-danger);
}

.theme-warning-bg {
  background-color: var(--theme-warning);
  color: white;
}

.theme-warning-light-bg {
  background-color: var(--theme-warning-light);
}

.theme-warning-text {
  color: var(--theme-warning);
}

.theme-card {
  background-color: var(--theme-bg-secondary);
  border: 1px solid var(--theme-border);
  border-radius: 0.375rem;
  box-shadow: var(--theme-shadow);
}

.theme-card-header {
  background-color: var(--theme-primary);
  color: white;
  border-bottom: 1px solid var(--theme-border);
  border-radius: 0.375rem 0.375rem 0 0;
  padding: 1rem;
}

.theme-card-body {
  padding: 1.5rem;
}

.theme-header {
  background-color: var(--theme-primary);
  color: white;
  box-shadow: var(--theme-shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  height: auto;
}

.theme-footer {
  background-color: var(--theme-bg-secondary);
  color: var(--theme-text-secondary);
  border-top: 1px solid var(--theme-border);
  position: relative;
  width: 100%;
  z-index: 1010;
  /* Above main content but below sidebar */
}

/* Utility Classes */
.theme-shadow-sm {
  box-shadow: var(--theme-shadow-sm);
}

.theme-shadow {
  box-shadow: var(--theme-shadow);
}

.theme-shadow-lg {
  box-shadow: var(--theme-shadow-lg);
}

/* Dashboard Specific Styles */
.dashboard-container {
  max-width: 1400px;
}

.stat-icon {
  transition: transform 0.2s ease;
}

.quick-action-card {
  transition: all 0.2s ease;
  cursor: pointer;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-lg);
}

.activity-list .activity-item:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.room-card {
  transition: all 0.2s ease;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.room-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--theme-shadow);
}

.room-number {
  font-weight: 600;
  color: var(--theme-primary);
}

.room-status .badge {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Additional Button Variants */
.theme-success-btn {
  background-color: var(--theme-success);
  border-color: var(--theme-success);
  color: white;
}

.theme-success-btn:hover {
  background-color: #157347;
  border-color: #146c43;
}

.theme-warning-btn {
  background-color: var(--theme-warning);
  border-color: var(--theme-warning);
  color: #000;
}

.theme-warning-btn:hover {
  background-color: #ffca2c;
  border-color: #ffca2c;
}

/* Hover effects */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-lg);
}

/* Navigation Colors - All white for contrast with blue background */
.navbar-nav .nav-link {
  color: #ffffff !important;
}

.navbar-nav .nav-link:hover {
  color: #f8f9fa !important;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  min-height: calc(100vh - 80px);
  position: fixed;
  top: 80px;
  left: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.sidebar-nav {
  height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #dee2e6 transparent;
}

/* Webkit scrollbar styling for Chrome/Safari/Edge */
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

.sidebar-link {
  color: #495057;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar-link:hover {
  background-color: #e9ecef;
  color: #0d6efd;
  text-decoration: none;
}

.sidebar-link.active {
  background-color: #0d6efd;
  color: white;
}

.sidebar-link.active:hover {
  background-color: #0b5ed7;
  color: white;
}

.sidebar-sublink {
  color: #6c757d;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  margin-bottom: 0.125rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-sublink:hover {
  background-color: #f8f9fa;
  color: #0d6efd;
  text-decoration: none;
}

.sidebar-sublink.active {
  background-color: #e7f1ff;
  color: #0d6efd;
  font-weight: 500;
}

.sidebar-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.sidebar-link[aria-expanded="true"] .sidebar-chevron {
  transform: rotate(180deg);
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 80px;
    z-index: 1030;
    height: calc(100vh - 80px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
  }

  .sidebar.show {
    left: 0;
  }

  /* Backdrop for mobile sidebar */
  .sidebar-backdrop {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1020;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar.show+.sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .main-content {
    margin-left: 0 !important;
    margin-top: 0;
  }

  body {
    padding-top: 80px;
  }
}

@media (min-width: 992px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 80px;
    z-index: 1000;
  }

  .has-sidebar .main-content {
    margin-left: 280px;
    margin-top: 0;
  }

  body {
    padding-top: 80px;
  }
}

/* Main Content Adjustments */
main {
  min-height: calc(100vh - 80px - 50px);
  /* viewport minus header and footer */
}

.main-content {
  min-height: calc(100vh - 80px - 50px);
  margin-left: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.main-content>.container-fluid {
  flex: 1;
}

/* Top Band Header Styles */
.top-band {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 50%, #198754 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  height: 80px;
}

.logo-section {
  flex: 1;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.logo-container .bi-building-fill {
  color: #ffc107;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.logo-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-weight: 300;
}

.user-section {
  margin-left: auto;
}

.user-greeting {
  font-weight: 500;
  font-size: 0.95rem;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .top-band {
    height: auto;
    padding: 1rem 0;
  }

  .logo-text {
    font-size: 1.5rem;
  }

  .user-greeting {
    display: none;
  }
}

/* Bookings Table Styles */
.booking-row:hover {
  background-color: var(--theme-primary-light) !important;
}

.avatar-circle {
  font-size: 0.9rem;
}

.table-responsive .dropdown-menu {
  z-index: 1050;
}

.btn-group .dropdown-menu {
  z-index: 1050;
}

/* Enhanced table styling */
.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
  transition: background-color 0.2s ease;
}

.booking-row {
  transition: all 0.2s ease;
}

.booking-row:hover .avatar-circle {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.btn-group .btn {
  transition: all 0.2s ease;
}

.btn-group .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status badge animations */
.badge {
  transition: all 0.2s ease;
}

.badge:hover {
  transform: scale(1.05);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .booking-row .btn-group {
    flex-direction: column;
    gap: 0.25rem;
  }

  .booking-row .btn-group .btn {
    width: 100%;
  }
}

/* Bookings Table Styles */
.booking-row {
  transition: all 0.2s ease;
}

.booking-row:hover {
  background-color: var(--theme-primary-light) !important;
  transform: translateY(-1px);
  box-shadow: var(--theme-shadow);
}

.avatar-circle {
  font-size: 0.9rem;
  font-weight: 600;
}

.table th {
  border-top: none;
  padding: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 1rem;
  vertical-align: middle;
}

.table-responsive {
  border-radius: 0.375rem;
}

.theme-card-body .table {
  margin-bottom: 0;
}

.btn-group .btn {
  border-radius: 0.375rem !important;
}

.dropdown-menu .dropdown-item {
  padding: 0.5rem 1rem;
}

.dropdown-menu .dropdown-item i {
  width: 1rem;
}

/* Fix for dropdowns being clipped by table-responsive - only for tables with action dropdowns */
.table-responsive.has-dropdowns {
  overflow: visible !important;
}

@media (max-width: 768px) {
  .table-responsive.has-dropdowns {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Ensure the action buttons don't block the dropdown */
.booking-row {
  position: relative;
}

.booking-row .btn-group {
  position: static;
}

.booking-row .dropdown-menu {
  z-index: 1100 !important;
}

/* Modern Toast Notifications */
.toast-container {
  z-index: 2050 !important;
  top: 1.5rem !important;
  right: 1.5rem !important;
  left: auto !important;
  transform: none !important;
}

.toast {
  background: rgba(33, 37, 41, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  color: white !important;
  overflow: hidden;
  margin-bottom: 1rem;
  min-width: 350px;
  border-top: 4px solid transparent !important;
  animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.2s ease;
}

.toast:hover {
  transform: translateY(-2px);
}

.toast.bg-success {
  border-top-color: #28a745 !important;
}

.toast.bg-danger {
  border-top-color: #dc3545 !important;
}

.toast.bg-info {
  border-top-color: #17a2b8 !important;
}

.toast.bg-warning {
  border-top-color: #ffc107 !important;
}

.toast-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}

.toast-header strong {
  font-weight: 600;
  font-size: 1rem;
}

.toast-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  margin-left: auto;
}

.toast-body {
  padding: 1.25rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.toast-icon {
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Rich Toast Details */
.toast-details-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-details-label {
  opacity: 0.7;
  font-weight: 500;
  font-size: 0.85rem;
}

/* Pulse Animation for Notifications */
.pulse-danger {
  border-radius: 50%;
  animation: pulse-danger 2s infinite;
  z-index: 10;
}

@keyframes pulse-danger {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}