:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;
  --secondary-button-color: #866cee;
}

/* Modal backdrop with blur effect */
.modal-backdrop-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  //  backdrop-filter: blur(3px);
  //  -webkit-backdrop-filter: blur(3px);
  z-index: 999999 !important;
  display: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem;
}

/* Centered modal - Made fully responsive */
.modal-centered {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: none;
  padding: 1rem;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  z-index: 1000000 !important;
}

.modal-centered.show {
  display: flex;
}

/* Modal content styling - Responsive */
.modal-content {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 28rem;
  margin: auto;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.dark .modal-content {
  background-color: #1f2937;
}

/* Enhanced input styling for better visibility */
.modal-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  background-color: #ffffff;
  color: #1f2937;
}

.modal-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* Dark mode input styling */
.dark .modal-input {
  background-color: #374151;
  border-color: #4b5563;
  color: #ffffff;
}

.dark .modal-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.dark .modal-input::placeholder {
  color: #9ca3af;
}

/* Responsive button styling */
.modal-button {
  padding: 0.75rem 1.5rem;
  // border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
}

.modal-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-button-cancel {
  background-color: #f3f4f6;
  color: #374151;
}

.modal-button-cancel:hover:not(:disabled) {
  background-color: #e5e7eb;
}

.modal-button-delete {
  background-color: #dc2626;
  color: white;
}

.modal-button-delete:hover:not(:disabled) {
  background-color: #b91c1c;
}

.dark .modal-button-cancel {
  background-color: transparent;
  border-color: #218838;
  color: #218838;
}

.btn-secondary-solid {
  background-color: transparent;
  border-color: #218838;
  color: #218838;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.btn-secondary-solid:hover {
  background-color: #f3f4f6;
  border-color: #29ab87;
  // color: white;
}

.b-solid {
  border-width: 1px;
  border-style: solid;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 0 !important;
  transition: all 0.2s ease-in-out;
}

.dark .modal-button-cancel:hover:not(:disabled) {
  background-color: #4b5563;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .modal-centered {
    padding: 0.5rem;
  }

  .modal-content {
    max-width: 100%;
    margin: 0.5rem;
  }

  .modal-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .modal-centered {
    padding: 0.25rem;
  }

  .modal-content {
    margin: 0.25rem;
    border-radius: 0.375rem;
  }

  .modal-button {
    padding: 0.5rem 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .modal-buttons-container {
    flex-direction: column;
  }
}

.main-content {
  margin-left: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 1.5rem !important;
  //padding-top: 90px !important;
  padding-top: 1rem !important;
}

.group-data-\\[sidebar-size\\="lg\\"]\\:xl\\:ml-\\[calc\\(theme\\(\\'spacing\\.app-menu\\' \\)_\\+_16px\\)\\] {
  margin-left: 0 !important;
}

.group-data-\\[sidebar-size\\="sm\\"]\\:xl\\:ml-\\[calc\\(theme\\(\\'spacing\\.app-menu-sm\\' \\)_\\+_16px\\)\\] {
  margin-left: 0 !important;
}

.px-3,
.xl\\:px-4 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.topbar,
.main-content {
  box-shadow: none !important;
}

.main-content > div {
  max-width: 100% !important;
  padding: 0 1rem;
}

.topbar {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  // position: fixed !important;
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  height: 80px !important;
  /* fixed height */
  padding: 0 32px !important;
  /* fixed left/right spacing */
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.dark .topbar {
  background-color: #1f2937;
  border-bottom: 1px solid #374151;
}

/* Add some spacing for the main content area */
.main-content {
  margin-top: 0rem;
  margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .topbar {
    padding: 0 1rem !important;
  }

  .main-content {
    padding: 0 1rem !important;
    padding-top: 0.5rem !important;
    /* Reduced top padding for mobile */
  }

  .main-content > div {
    padding: 0 0.5rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 0.75rem !important;
  }

  .main-content {
    padding: 0 0.75rem !important;
  }
}

/* Close Button Styles */
.btn-close-menu {
  background-color: transparent;
  border: 3px solid var(--secondary-button-color);
  border-color: var(--secondary-button-color);
  color: var(--secondary-button-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.btn-close-menu:hover {
  background-color: #f3f4f6;
  border-color: var(--secondary-button-color);
  border: 3px solid var(--secondary-button-color);
}

/* Add this CSS to your stylesheet */

/* For small devices (keep current styles) */
@media (max-width: 1023px) {
  header {
    height: 60px !important;
    padding: 0 8px !important;
  }

  /* Keep current sizes for small devices */
  header img {
    max-height: 24px !important;
  }

  header h1 {
    font-size: 14px !important;
  }

  header button {
    width: 24px !important;
    height: 24px !important;
  }

  header button i {
    font-size: 18px !important;
  }

  header .notification-badge {
    width: 12px !important;
    height: 12px !important;
    font-size: 10px !important;
  }
}

/* For large devices (increase sizes) */
@media (min-width: 1024px) {
  header {
    height: 90px !important;
    /* Increased from 60px to 90px */
    padding: 0 16px !important;
    /* Increased padding */
  }

  /* Increase logo size */
  header img {
    max-height: 40px !important;
    /* Increased from 24px to 40px */
  }

  /* Increase restaurant name font size */
  header h1 {
    font-size: 20px !important;
    /* Increased from 14px to 20px */
  }

  /* Increase button sizes */
  header button {
    width: 40px !important;
    /* Increased from 24px to 40px */
    height: 40px !important;
    /* Increased from 24px to 40px */
  }

  /* Increase icon sizes */
  header button i {
    font-size: 24px !important;
    /* Increased from 18px to 24px */
  }

  /* Increase notification badge size */
  header .notification-badge {
    width: 18px !important;
    /* Increased from 12px to 18px */
    height: 18px !important;
    /* Increased from 12px to 18px */
    font-size: 12px !important;
    /* Increased from 10px to 12px */
  }

  /* Increase user avatar size */
  header .user-avatar {
    width: 40px !important;
    /* Increased from 24px to 40px */
    height: 40px !important;
    /* Increased from 24px to 40px */
  }

  /* Increase user name font size */
  header .user-name {
    font-size: 16px !important;
    /* Increased from 14px to 16px */
  }
}

/* Add this to your existing styles in the <style> section */

/* For large devices (min-width: 1024px) */
@media (min-width: 1024px) {
  /* Adjust header container padding */
  header > div {
    padding: 0 48px !important;
    /* Increase padding to center content */
  }

  /* Increase logo size significantly */
  header img {
    height: 48px !important;
    /* Increased from h-9 (36px) to 48px */
    max-width: 180px !important;
    /* Allow logo to be wider */
  }

  /* Increase restaurant name size */
  header h1 {
    font-size: 24px !important;
    /* Increased from xl:text-lg (20px) to 24px */
  }

  /* Increase button sizes */
  header button {
    width: 48px !important;
    /* Increased from lg:size-10 (40px) to 48px */
    height: 48px !important;
  }

  /* Increase icon sizes */
  header button i {
    font-size: 28px !important;
    /* Increased from lg:text-[26px] to 28px */
  }

  /* Increase notification badge size */
  header .notification-badge {
    width: 20px !important;
    height: 20px !important;
    font-size: 14px !important;
  }

  /* Increase user avatar size */
  header .user-avatar {
    width: 48px !important;
    height: 48px !important;
  }

  /* Increase user name font size */
  header .user-name {
    font-size: 18px !important;
  }

  /* Adjust spacing between items */
  header .flex.gap-2 {
    gap: 1.5rem !important;
    /* Increase gap between items */
  }

  header .flex.gap-3 {
    gap: 2rem !important;
  }

  header .flex.gap-4 {
    gap: 2.5rem !important;
  }

  header .flex.gap-5 {
    gap: 3rem !important;
  }
}

/* For large devices (min-width: 1024px) */
@media (min-width: 1024px) {
  header {
    height: 100px !important;
    /* Increased height */
    padding: 0 24px !important;
    /* Increased horizontal padding */
  }

  header > div {
    padding: 0 24px !important;
    /* Increased container padding */
  }

  /* Logo image */
  header img {
    height: 56px !important;
    /* Increased logo height */
    max-width: 200px !important;
    /* Allow logo to be wider */
  }

  /* Restaurant name */
  header h1 {
    font-size: 26px !important;
    /* Increased font size */
  }

  /* Header buttons */
  header button {
    width: 52px !important;
    /* Increased button size */
    height: 52px !important;
  }

  /* Header icons */
  header button i {
    font-size: 30px !important;
    /* Increased icon size */
  }

  /* Separator line */
  header .w-[1px] {
    height: 52px !important;
    /* Match button height */
  }

  /* Spacing between header elements */
  header .gap-2 {
    gap: 1.5rem !important;
  }

  header .gap-3 {
    gap: 2rem !important;
  }

  header .gap-4 {
    gap: 2.5rem !important;
  }

  header .gap-5 {
    gap: 3rem !important;
  }
}

/* Add this to your existing styles in the <style> section */

/* For large devices (min-width: 1024px) */
@media (min-width: 1024px) {
  /* Notification dropdown styling */
  #dropdownNotification {
    width: 450px !important;
    /* Increased width */
    margin-top: 12px !important;
    /* Add some space below the button */
    border-radius: 12px !important;
    /* Softer corners */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    /* Enhanced shadow */
  }

  /* Notification header */
  #dropdownNotification > div:first-child {
    padding: 16px 20px !important;
    /* Increased padding */
    font-size: 18px !important;
    /* Larger font */
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
  }

  /* Notification items */
  #notificationList > div {
    padding: 16px 20px !important;
    /* Increased padding */
    font-size: 16px !important;
    /* Larger text */
  }

  /* Notification item images */
  #notificationList img {
    width: 48px !important;
    /* Larger avatar */
    height: 48px !important;
  }

  /* Notification timestamps */
  #notificationList .text-xs {
    font-size: 14px !important;
    /* Larger timestamp */
  }

  /* Clear notifications button */
  #dropdownNotification > button {
    padding: 14px 20px !important;
    /* Increased padding */
    font-size: 16px !important;
    /* Larger font */
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
  }

  /* Profile dropdown styling */
  #dropdownProfile {
    width: 280px !important;
    /* Increased width */
    margin-top: 12px !important;
    /* Add some space below the button */
    border-radius: 12px !important;
    /* Softer corners */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    /* Enhanced shadow */
    right: 0 !important;
    /* Align to the right edge */
  }

  /* Profile dropdown header */
  #dropdownProfile > div:first-child {
    padding: 16px 20px !important;
    /* Increased padding */
    font-size: 16px !important;
    /* Larger font */
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
  }

  /* Profile dropdown list items */
  #dropdownProfile ul li {
    font-size: 16px !important;
    /* Larger font */
  }

  /* Profile dropdown buttons */
  #dropdownProfile button,
  #dropdownProfile a {
    padding: 12px 20px !important;
    /* Increased padding */
    font-size: 16px !important;
    /* Larger font */
  }

  /* Profile dropdown footer */
  #dropdownProfile > div:last-child {
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
  }

  /* Tooltip styling */
  #sound-privileges-tooltip {
    width: 320px !important;
    /* Increased width */
    padding: 12px 16px !important;
    /* Increased padding */
    font-size: 14px !important;
    /* Larger font */
    // border-radius: 8px !important; /* Softer corners */
  }

  /* Notification badge */
  [data-popover-target="dropdownNotification"] span {
    width: 24px !important;
    /* Increased size */
    height: 24px !important;
    font-size: 14px !important;
    /* Larger font */
    line-height: 24px !important;
    /* Center text vertically */
  }

  /* User profile button */
  [data-popover-target="dropdownProfile"] img {
    width: 48px !important;
    /* Increased size */
    height: 48px !important;
  }

  /* User name in profile button */
  [data-popover-target="dropdownProfile"] span {
    font-size: 18px !important;
    /* Increased font size */
  }

  /* Dropdown arrow icon */
  [data-popover-target="dropdownProfile"]:after {
    font-size: 20px !important;
    /* Increased arrow size */
  }
}

/* For large devices (min-width: 1024px) */
@media (min-width: 1024px) {
  /* Add proper positioning for dropdowns */
  [data-popover] {
    position: absolute !important;
    z-index: 1000 !important;
  }

  /* Ensure dropdowns are visible above other content */
  .z-backdrop {
    z-index: 1000 !important;
  }

  /* Fix dropdown animation */
  [data-popover]:not(.invisible) {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s !important;
  }

  /* Add subtle animation for dropdowns */
  [data-popover] {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s !important;
  }

  /* Improve dropdown shadow */
  [data-popover] {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
}

/* Add this to your existing styles in the <style> section */

/* For large devices (min-width: 1024px) */
@media (min-width: 1024px) {
  /* Center the "Clear notifications" text */
  #dropdownNotification > button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Fix the profile dropdown arrow placement */
  [data-popover-target="dropdownProfile"]:after {
    position: absolute !important;
    right: 8px !important;
    /* Adjust arrow position */
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-left: 8px !important;
    /* Add space between name and arrow */
  }

  /* Fix the alignment of "Delete Account" and "Sign out" text */
  #dropdownProfile ul li button,
  #dropdownProfile form button {
    display: flex !important;
    align-items: center !important;
    padding-left: 20px !important;
    /* Consistent left padding */
    padding-right: 20px !important;
    /* Consistent right padding */
    width: 100% !important;
    /* Full width buttons */
    box-sizing: border-box !important;
  }

  /* Add consistent padding to profile dropdown sections */
  #dropdownProfile > div:first-child {
    padding: 16px 20px !important;
  }

  #dropdownProfile ul {
    padding: 8px 0 !important;
    /* Add vertical spacing */
  }

  #dropdownProfile > div:last-child {
    padding: 8px 0 !important;
    /* Add vertical spacing */
  }

  /* Improve dropdown arrow visibility */
  [data-popover-target="dropdownProfile"]:after {
    color: #6b7280 !important;
    /* Gray color for better visibility */
    font-size: 18px !important;
    /* Adjust size if needed */
  }

  /* Ensure dropdown content is properly aligned */
  #dropdownProfile {
    min-width: 280px !important;
    /* Ensure consistent width */
  }

  /* Fix notification dropdown alignment */
  #dropdownNotification {
    right: 0 !important;
    /* Align to the right edge */
    left: auto !important;
  }
}

/* Add this to your existing styles in the <style> section */

/* For large devices (min-width: 1024px) */
@media (min-width: 1024px) {
  /* Center the "Clear notifications" button */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 16px 20px !important;
    /* Increased padding for better appearance */
    font-size: 16px !important;
    /* Larger font size */
    font-weight: 500 !important;
    /* Medium font weight */
  }

  /* Ensure the button takes full width but content is centered */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Add hover effect for better interactivity */
  #dropdownNotification > button[onclick="clearNotifications()"]:hover {
    background-color: #f3f4f6 !important;
    /* Lighter gray on hover */
  }

  /* Dark mode hover effect */
  .dark #dropdownNotification > button[onclick="clearNotifications()"]:hover {
    background-color: #374151 !important;
    /* Darker gray on hover in dark mode */
  }
}

/* For large devices (min-width: 1024px) */
@media (min-width: 1024px) {
  /* Ensure consistent border radius for the button */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
  }

  /* Add transition for smooth hover effect */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    transition: background-color 0.2s ease-in-out !important;
  }

  /* Make sure the button text is properly centered vertically and horizontally */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    line-height: 1.5 !important;
    /* Ensure proper line height */
  }
}
/* ============================================
   NOTIFICATION & PROFILE MENU CENTERING FIXES
   ============================================ */

/* FIX 1: Center "Clear notifications" button in dropdown for small devices */
@media (max-width: 1023px) {
  /* Center the clear notifications button */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
  }

  /* Ensure proper border radius */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
  }

  /* Add hover effect */
  #dropdownNotification > button[onclick="clearNotifications()"]:hover {
    background-color: #f3f4f6 !important;
  }

  /* Dark mode hover effect */
  .dark #dropdownNotification > button[onclick="clearNotifications()"]:hover {
    background-color: #374151 !important;
  }

  /* Add smooth transition */
  #dropdownNotification > button[onclick="clearNotifications()"] {
    transition: background-color 0.2s ease-in-out !important;
  }
}

/* FIX 2: Center profile menu buttons (Delete Account, Sign out) for small devices */
@media (max-width: 1023px) {
  /* Center all profile dropdown buttons */
  #dropdownProfile ul li button,
  #dropdownProfile form button,
  #dropdownProfile div button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    min-height: 44px !important; /* Better touch target */
  }

  /* Specifically target Delete Account button */
  #dropdownProfile button[onclick="openDeleteAccountModal()"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  /* Specifically target Sign out button */
  #dropdownProfile form[action*="logout"] button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  /* Remove any conflicting text-left classes */
  #dropdownProfile .text-left {
    text-align: center !important;
  }

  /* Override any flex classes that might interfere */
  #dropdownProfile button.flex {
    justify-content: center !important;
  }

  /* Ensure proper spacing */
  #dropdownProfile ul {
    padding: 8px 0 !important;
  }

  #dropdownProfile > div:last-child {
    padding: 8px 0 !important;
  }

  /* Add hover effects for better UX */
  #dropdownProfile ul li button:hover,
  #dropdownProfile form button:hover {
    background-color: #f3f4f6 !important;
  }

  /* Dark mode hover effects */
  .dark #dropdownProfile ul li button:hover,
  .dark #dropdownProfile form button:hover {
    background-color: #374151 !important;
  }
}

/* EXTRA: Ensure dropdowns are properly positioned on small screens */
@media (max-width: 640px) {
  /* Adjust notification dropdown positioning */
  #dropdownNotification {
    right: 0 !important;
    left: auto !important;
    width: 280px !important;
    max-width: 90vw !important;
    margin-top: 8px !important;
  }

  /* Adjust profile dropdown positioning */
  #dropdownProfile {
    right: 0 !important;
    left: auto !important;
    width: 240px !important;
    max-width: 90vw !important;
    margin-top: 8px !important;
  }
}
