/* *
 * Slideout module styles */

.slideout-menu::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.slideout-menu {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.slideout-menu {
  background-color: #f8f9fa;
  color: #333;
  font-family: Arial, sans-serif;
  padding: 20px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1040; /* Increased to be above navbar components */
  width: 255px;
  overflow-y: auto;
  -webkit-overflow-scrolling: none;
  display: none;
  overscroll-behavior: contain;
}

.slideout-panel {
  position: relative;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  will-change: transform;
}

.slideout-open, .slideout-open body, .slideout-open .slideout-panel {
  overflow: hidden !important;
}

.slideout-open .slideout-menu {
  display: block;
}

.panel:before {
  content: '';
  display: block;
  background-color: rgba(0, 0, 0, 0.6);
  transition: background-color 0.3s ease-in-out;
}

.panel-open:before {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 99;
}

.category-card {
  cursor: pointer;
  transition: transform 0.5s ease, box-shadow 0.3s ease;
  width: 100px;
  height: 120px; /* Increased height */
}

.category-card:hover {
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.category-card.active {
  animation: bounce 0.5s;
  animation-fill-mode: both;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.category-card .card-img-top {
  max-width: 60px; /* Adjusted max-width */
  max-height: 60px; /* Adjusted max-height */
  object-fit: fill; /* Consider 'contain' or 'cover' if aspect ratio is an issue */
}

.category-card .card-title {
  font-size: 13px; /* Slightly reduced font size */
  font-weight: bold;
  text-align: center;
}

.menu-section {
  width: 100%;
  /* height: calc(100vh - 150px) !important; Removed to let parent handle height */
  overflow-y: auto; /* Allow vertical scroll if content overflows */
  overflow-x: hidden !important; /* Explicitly hide horizontal scroll */
  box-sizing: border-box; /* Ensure padding/border are included in width/height */
}

.offcanvasslideout-body {
  margin: 10px 0 !important;
  /* height: 100%; Removed to let content determine height */
  overflow-x: hidden; /* Prevent horizontal scroll within this body */
  box-sizing: border-box; /* Ensure padding/border are included in width/height */
  /* overflow-y: auto; is already defined below, ensure it remains */
}


/* Off-canvas menu styles */
.menu {
  background-color: #f8f9fa;
  padding: 15px;
}

.menu-section-title {
  font-size: 1.2em;
  font-weight: bold;
}

.etched-line {
  border-top: 1px solid #e5e5e5;
}

.offcanvasslideout-body {
 
  overflow-y: auto;
}

.menu {
  overflow-y: hidden !important;
  overflow-x: hidden !important;
}

.menu-section-title {
  margin-bottom: 10px;
}

.etched-line {
  border: none;
  height: 2px;
  background-color: #e0e0e0;
  position: relative;
  margin: 7px 0;
}

.etched-line::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 5px;
  background-color: #ffffff;
}

.etched-line::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 5px;
  background-color: #c0c0c0;
}





.modal {
 
  display: none;
  position: fixed;
  --bs-modal-zindex: 1050; /* Modal dialog */
  z-index: var(--bs-modal-zindex);
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-dialog {
  position: relative;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  max-width: 500px;
  width: 90%;
}


.modal-backdrop {
  --bs-backdrop-zindex: 1040; /* Backdrop */
  --bs-backdrop-opacity: 0;
  z-index: var(--bs-backdrop-zindex);
  position: relative;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  max-width: 500px;
  width: 90%;
}

/* Ensure modal and button sizes are also responsive */
.modal-content, .btn {
  padding: 10px;  /* More padding for better touch interaction */
}

.content-wrapper {
  min-height: calc(100vh - 100px); /* Adjust based on your footer height */
  padding-bottom: 100px; /* Adjust based on your footer height */
}

.main-footer {
  background-color: #f1f1f1;
  text-align: center;
  padding: 10px 0; /* Adjust padding as needed */
  width: 100%;
}


/* Base styles for the slideout toggle button */
.js-slideout-toggle {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left top;
  z-index: 9999;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  opacity: 0.8;
  border-radius: var(--border-radius);
  pointer-events: auto; /* Ensure button is interactive */
}

/* Hover and focus styles */
.js-slideout-toggle:hover,
.js-slideout-toggle:focus {
  opacity: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: white;
  color: #3498db;
}

/* Active state styles */
.js-slideout-toggle:active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  opacity: 0.9;
}

/* Media query for larger screens */
@media screen and (min-width: 992px) {
  .js-slideout-toggle {
    font-size: 18px;
    padding: 12px 24px;
  }
}

/* Media query for smaller screens */
@media screen and (max-width: 991px) {
  .js-slideout-toggle {
    font-size: 14px;
    padding: 8px 16px;
  }
}

/* Hide the button on very small screens */
@media screen and (max-width: 768px) {
  .js-slideout-toggle {
  display: none;
  }
}

.category-card.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}
.category-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
