/* ==========================================
   General Styles
   ========================================== */
   body {
    text-align: center;
    font-family: 'Forum', serif;
    background-color: #F5E1C8; /* Parchment */
    color: #4A2C2A; /* Roman deep red */
    margin: 0;
    padding: 5px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    text-shadow: var(--text-shadow);
  }
  .notification-dropdown,
.notification-dropdown * {
    text-shadow: none !important;
}

  
  /* ==========================================
       Tables & Images
       ========================================== */
  table {
    margin: 20px auto;
    border-collapse: collapse;
    width: auto;
  }
  
  th, td {
    padding: 10px;
  }
  
  img {
    border-radius: 10px;
  }
 
 /* Default (Light Mode) */
table, th, td {
  color: #4A2C2A; /* Roman deep red */
}

/* Dark Mode: Use [data-theme="dark"] selector */
.dark-mode table,
.dark-mode th,
.dark-mode td {
  color: #DAAF89; /* Warm parchment text for dark mode */
}


  /* Example for buttons within .food-table */
  .food-table button {
    padding: 5px 10px;
    font-size: 8px;
    border-radius: 5px;
  }
  
  /* ==========================================
       Light Mode Variables (Default)
       ========================================== */
  :root {
    --bg-color: #F5E1C8; /* Parchment background */
    --text-color: #4A2C2A; /* Roman deep red text */
    --accent-color: #B88A44; /* Aged gold */
    --border-color: #6D4C41; /* Earthy brown */
    --button-bg: #995b0b; /* Imperial red */
    --button-text: #F5E1C8; /* Light button text */
    --text-shadow: .5px .5px 1px rgb(121, 119, 119);

    
    /* Container variables for Light Mode (Option 1) */
    --container-bg: #2B1D1B;    /* Dark brown container background */
    --container-text: #E5C09F;  /* Warm light text for container */
  }
  
  /* ==========================================
       Dark Mode Variables
       ========================================== */
  @media (prefers-color-scheme: dark) {
    :root {
      --bg-color: #3b0412; /* Deep bronze background */
      --text-color: #b19f8b; /* Warm parchment text */
      --accent-color: #D4A857; /* Golden glow */
      --border-color: #8C5A3B; /* Burnished bronze */
      --button-bg: #793c18; /* Rich crimson */
      --button-text: #E5C09F; /* Warm parchment for buttons */
      
      /* Container variables for Dark Mode */
      --container-bg: #a1743c;    /* Light tan container background */
      --container-text: #4A2C2A;  /* Dark text for container */
    }
  }



  /* ==========================================
       Dark Mode Application
       ========================================== */
  .dark-mode {
    background-color: var(--bg-color);
    color: var(--text-color);
  }
  
  .dark-mode header, 
  .dark-mode footer, 
  .dark-mode nav ul {
    background-color: var(--border-color);
  }
  
  .dark-mode a {
    color: var(--accent-color);
  }
  
  .dark-mode .carousel {
    background-color: #222;
  }
  
  /* ==========================================
       Dark Mode Toggle
       ========================================== */
  .dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-color);
  }
  
  /* ==========================================
       Buttons
       ========================================== */
  button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 10px;
  }
  
  button:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
  }
  
  /* Specific styling for submit buttons */
  button[type="submit"] {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    cursor: pointer;
    border-radius: 10px;
  }
  
  button[type="submit"]:hover {
    background-color: var(--accent-color);
  }
  
  /* ==========================================
       Header
       ========================================== */
  header {
    text-align: center;
    font-size: 75%;
    background-color: var(--button-bg);
    color: var(--button-text);
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
    padding: 5px;
    border-radius: 10px;
    background-image: url('https://camplong.ooguy.com/assets/site-images/Cover.JPG'); /* Placeholder image */
    background-size: cover;
    background-position: center;
  }
  
  /* ==========================================
       Navigation Bar
       ========================================== */
  nav.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: var(--border-color);
    border-radius: 10px;
  }
  
  nav.navbar ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 10px;
    margin: 0;
    background-color: var(--border-color);
    border-radius: 10px;
    max-width: 600px;
  }
  
  nav.navbar ul li {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    white-space: nowrap;
  }
  
  nav.navbar ul li a {
    text-decoration: none;
    color: var(--button-text);
    padding: 10px;
    display: block;
    text-align: center;
  }
  
  @media (max-width: 600px) {
    nav.navbar {
      padding: 5px;
    }
    nav.navbar ul {
      padding: 5px;
      gap: 5px;
      grid-template-columns: repeat(2, 1fr);
    }
    nav.navbar ul li {
      padding: 5px;
    }
    nav.navbar ul li a {
      padding: 5px;
      font-size: 14px;
    }
  }
  
  /* ==========================================
       Dropdown Menu
       ========================================== */
  .navbar .dropdown {
    position: relative;
  }
  
  .navbar .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--button-bg);
    padding: 0;
    list-style: none;
    min-width: 150px;
    border-radius: 10px;
    z-index: 1000;
  }
  
  .navbar .dropdown-menu li a {
    padding: 10px;
    display: block;
    color: var(--button-text);
    border-radius: 10px;
  }
  
  .navbar .dropdown-menu li a:hover {
    background-color: var(--accent-color);
  }
  
  /* Show dropdown on hover */
  .navbar .dropdown:hover .dropdown-menu {
    display: block;
  }
  
  /* ==========================================
       Carousel Styles
       ========================================== */
  .carousel {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    overflow: hidden;
    border-radius: 15px;
  }
  
  .carousel-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
  }
  
  .carousel-images img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    flex: 0 0 100%;
    border-radius: 15px;
  }
  
  /* ==========================================
       Main Images (global)
       ========================================== */
  img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    flex: 0 0 100%;
    border-radius: 15px;
  }
  
  /* ==========================================
       Footer
       ========================================== */
  footer {
    text-align: center;
    background-color: var(--border-color);
    color: var(--button-text);
    padding: 5px;
    border-radius: 10px;
  }
  
  /* ==========================================
       Iframe Container
       ========================================== */
  .iframe-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
  }
  
  .iframe-container iframe {
    width: 100%;
    max-width: 100vh;
    height: 600px;
  }
  
  /* ==========================================
       Form Styles (Login Form Example)
       ========================================== */
  @media (prefers-color-scheme: dark) {
    /* Dark Mode Overrides for Login Form */
    form.login-form {
      background-color: #8C5A3B;  /* A dark background for the form */
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
      padding: 50px;
    }
    
    form.login-form label {
      color: var(--button-text);  /* Use your button text variable or a custom color */
    }
    
    form.login-form input {
      background-color: #96684c;         /* Darker input background */
      border: 1px solid #5f4c4c;         /* Darker border for inputs */
      color: var(--text-color);        /* Ensure text is readable */
    }
    
    form.login-form button {
      background-color: var(--button-bg); /* Keep your button styling */
      color: var(--button-text);
    }
    
    form.login-form button:hover {
      background-color: var(--accent-color);
      color: var(--bg-color);
    }
    
    form.login-form .error {
      color: #FF6F61; /* A bright color for errors in dark mode */
    }
    
    /* Dark Mode Overrides for Register Form */
    form.register-form {
      background-color: #8C5A3B;  /* Same dark background for consistency */
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
      padding: 50px;
    }
    
    form.register-form label {
      color: var(--button-text);
    }
    
    form.register-form input,
    form.register-form select,
    form.register-form textarea {
      background-color: #96684c;         /* Darker input background */
      border: 1px solid #5f4c4c;         /* Darker border for inputs */
      color: var(--text-color);        /* Ensure text is readable */
    }
    
    form.register-form button {
      background-color: var(--button-bg);
      color: var(--button-text);
    }
    
    form.register-form button:hover {
      background-color: var(--accent-color);
      color: var(--bg-color);
    }
    
    form.register-form .error {
      color: #FF6F61;
    }
  }
  
  form.login-form,
  form.register-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    /* Limit the container to the viewable area */
    width: 90vw;       /* 90% of the viewport width */
    max-width: 500px;  /* But no wider than 500px on larger screens */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding-right: 20px;
  }
  
  /* Ensure each form group is stacked vertically with consistent spacing */
  form.register-form .form-group,
  form.login-form .form-group {
    margin-bottom: 15px;           /* Space between each field */
    display: flex;
    flex-direction: column;
    align-items: flex-start;       /* Align label and input to the left */
    width: 100%;
  }
  
  /* Ensure inputs take full container width with some internal padding */
  form.register-form input,
  form.register-form select,
  form.register-form textarea,
  form.login-form input,
  form.login-form select,
  form.login-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;  /* Include padding/border in element's total width */
  }
  
  /* For table cells, you already have padding set; if needed, you can adjust: */
  table, th, td {
    padding: 10px;
  }
  
  /* ==========================================
       Container Styles for Order Sections
       ========================================== */
  .order-summary-container {
    background-color: var(--container-bg);
    color: var(--container-text);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
    transition: background-color 0.3s, color 0.3s;
  }
  
  /* Force container children of order-summary-container to inherit the container text color */
  .order-summary-container * {
    color: inherit !important;
  }
  

  
  /* ==========================================
     Dashboard Accordion/Collapsible Sections
     ========================================== */
  /* Style the entire accordion section container */
  .accordion-section {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin: 20px auto;
    padding: 0;
    max-width: 800px;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
  }
  
  /* Style the header of each section */
  .accordion-section h3 {
    margin: 0;
    padding: 15px 20px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 1.2em;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .accordion-item h4 {
    margin: 0;
    padding: 15px 20px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 1.2em;
    transition: background-color 0.3s, color 0.3s;
}

  /* Hover effect for headers */
  .accordion-section h3:hover {
    background-color: var(--button-bg);
    color: var(--button-text);
  }

.accordion-item h4:hover {
    background-color: var(--button-bg);
    color: var(--button-text);
}

  /* Style the collapsible content area */
  .accordion-content {
    display: none;
    padding: 20px;
    background-color: var(--container-bg);
    color: var(--container-text);
    transition: max-height 0.3s ease-out;
  }
  
  /* ==========================================
       Styling for the add-dish form (#dataForm)
       ========================================== */
  #dataForm {
    max-width: 500px;  /* Limits width on larger screens */
    width: 90vw;       /* Uses 90% of the viewport width on mobile */
    margin: 20px auto; /* Centers the form with vertical margin */
    padding: 20px;
    box-sizing: border-box;
  }
  
  /* Stack each form element with additional spacing */
  #dataForm .form-group {
    margin-bottom: 20px;  /* Increase spacing between each group */
  }
  
  /* Ensure labels display on their own line with some bottom spacing */
  #dataForm .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }
  
  /* Style text inputs, textareas, and select elements */
  #dataForm input[type="text"],
  #dataForm textarea,
  #dataForm select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
  }
  
  /* Style the submit button */
  #dataForm button[type="submit"] {
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
  }
  
  #dataForm button[type="submit"]:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
  }
  
/* Styling for buttons in .user-actions-container */
.user-actions-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns */
  gap: 10px; /* Space between buttons */
  justify-items: center; /* Center the buttons */
}

.user-actions-container button {
  font-size: 6pt !important; /* Smaller font size */
  padding: 3px 5px; /* Reduced padding for smaller buttons */
  border-radius: 5px;
  width: 100%; /* Make buttons take up full width of grid cell */
  cursor: pointer;
  text-transform: uppercase;
}

.user-actions-container button:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.order-quantities-column input[type="number"] {
  width: 3em; /* Adjust as needed; typically 3em will display two digits */
  max-width: 3em;
  box-sizing: border-box;
  text-align: center; /* Optional: center the digits */
}

/* Dark-Mode Toggle */
/* The switch container */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

/* Hide the default checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

/* The knob inside the slider */
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* When the checkbox is checked, change the slider's background color */
input:checked + .slider {
  background-color: #2196F3;
}

/* Move the knob to the right when checked */
input:checked + .slider:before {
  transform: translateX(26px);
}

/* Add a border around the entire Usermanagement tables */
.user-table {
  border-collapse: collapse; /* Keeps cell borders as expected */
  border-radius: 10px;
  outline: 2px solid var(--border-color);
  outline-offset: -2px; /* Adjusts the outline to sit flush */
  margin: 20px auto;
}

/* Optionally, add borders to table cells */
.user-table th,
.user-table td {
  border: 1px solid var(--border-color);
}

.user-table {
  table-layout: fixed; /* Ensure fixed column widths */
  width: 100%;
}

/* Apply styles only to the wrapped username text */
:root {
  --min-font: 6px;
  --ideal-font: 1vw;
  --max-font: 12px;
}

.username-cell {
  display: block;
  width: 400px;                /* Fixed width */
  white-space: nowrap;         /* Prevent line breaks */
  overflow: hidden;            /* Hide overflow */
  text-overflow: ellipsis;     /* Add ellipsis for long text */
  font-size: clamp(var(--min-font), var(--ideal-font), var(--max-font));
}

form.register-form input,
form.register-form select,
form.register-form textarea,
form.login-form input,
form.login-form select,
form.login-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #fff; /* white background */
    color: #000; /* black text */
}


/* ================================
    Notifications Sytles
==================================*/

.notification-container {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  z-index: 9999;
}

.notification-icon {
  font-size: 24px;
  position: relative;
}

.notification-badge {
  background: red;
  color: rgb(255, 255, 255);
  border-radius: 50%;
  padding: 5px;
  font-size: 12px;
  position: absolute;
  top: -5px;
  right: -10px;
}

.notification-dropdown {
  position: absolute;
  top: 100%;  /* Position below the bell */
  right: 0;
  background: white;
  border: 1px solid #ddd;
  color:#793c18;
  width: 250px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10000;  /* Ensure it appears above everything else */
}

.notification-dropdown.hidden {
  display: none;
}

.notification-dropdown .dropdown-header {
  display: flex;
  justify-content: center;
  padding: 10px;
  background: #f5f5f5;
  font-size: 1.5rem; /* Increases the font size */
  font-weight: bold; /* Makes it stand out more */
  text-align: center; /* Ensures text stays centered */
}

.notification-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification-dropdown ul li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.notification-dropdown ul li:last-child {
  border-bottom: none;
}

/* ================================
   Flyout Container Styles
================================ */

.flyout-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  display: none; /* Ensures it doesn't take space when hidden */
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.flyout-container.show {
  opacity: 1;
  visibility: visible;
  display: flex; /* Ensures it appears when activated */
  flex-direction: column;
  align-items: center;
}

.flyout-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flyout-content p {
  margin-bottom: 15px;
}

.flyout-content button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}

.flyout-content button:hover {
  background-color: #45a049;
}

/* Mobile-specific fixes */
@media (max-width: 600px) {
  .flyout-container {
    top: 20vh; 
    left: auto; 
    right: auto; 
    width: 90%; 
    max-width: 300px;
    transform: none; /* Prevents possible positioning issues */
  }
}

/* ================================
 Spinner Container Styles
================================ */
.spinner-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  display: none; /* Ensures it does not take up space when hidden */
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.spinner-container.show {
  opacity: 1;
  visibility: visible;
  display: flex; /* Makes sure it's displayed properly */
  flex-direction: column;
  align-items: center;
}

.spinner-icon {
  width: 40px;
  height: 40px;
  border: 5px solid #fff;
  border-top: 5px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile-specific fixes */
@media (max-width: 600px) {
  .spinner-container {
    width: 90%;
    max-width: 250px;
    transform: none;
    left: auto;
    right: auto;
    top: 30vh;
  }
}

/* =====================
    Paddle Map Styles
======================== */

#map-container {
  position: relative;   /* Ensure Leaflet can correctly measure the container */
  width: 100%;          /* Full width of its parent container */
  height: 400px;        /* Fixed height (adjustable as needed) */
  max-width: 100vw;     /* Prevent horizontal overflow */
  overflow: hidden;     /* Hide any overflow */
  border-radius: 10px;  /* Keep border radius */
  margin: 0 auto;       /* Center the container */
  box-sizing: border-box; /* Ensure consistent sizing */
}

#map {
  position: absolute; /* Ensure it fills the container exactly */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Set to 100% of #map-container instead of full viewport */
}

/* Override global image styles for map tiles */
#map img {
  border-radius: 0 !important; /* Ensure map tiles are square */
}

