/* 
 * dashboard_menu.css
 * BENTO MENU STYLES
 * Component-specific styles that build upon global styles.css
 * In case of conflicts, styles.css should take precedence.
 */

 .dm-loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  width: 100%;
  gap: 24px;
}

.dm-loading-indicator .v-progress-circular {
  width: 80px !important;
  height: 80px !important;
  color: black !important;
}

.dm-loading-indicator div {
  font-size: 20px;
  font-weight: bold;
  color: black;
}


 .dm-bento-container {
  padding: 1.5rem;
  max-width: 1366px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Category Button Styles */
.dm-category-button {
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  margin: 0 0.25rem;
  position: relative;
  min-width: 100px;
  text-align: center;
}

.dm-category-button.active {
  background-color: #000000;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dm-category-button:not(.active) {
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
}

.dm-category-button:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.781);
  color: black;
}

.dm-button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.5rem;
}

/* Category Button Icon Adjustments */
.dm-category-button .mdi {
  font-size: 1.25rem;
  margin-right: 0.25rem;
  vertical-align: middle;
}


/* Bento Item Icon Adjustments */
.dm-item-icon.mdi {
  font-size: 1.75rem;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Icon color adjustments */
.dm-item-icon.text-light {
  color: rgba(255, 255, 255, 0.9);
}

.dm-item-icon.text-dark {
  color: rgba(0, 0, 0, 0.8);
}


.dm-category-button .label {
  font-size: 0.875rem;
  text-align: center;
  margin: 0 auto;
}

/* Category Buttons Container */
.dm-category-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.dm-category-buttons::-webkit-scrollbar {
  height: 4px;
}

.dm-category-buttons::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.dm-category-buttons::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

/* Bento Item Styles */
.dm-bento-item {
  border-radius: 20px; /* Match .translucent-box */
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
}

.dm-bento-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dm-bento-item-content {
  height: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.dm-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.dm-item-title {
  font-weight: bold;
  margin: 0;
}

.dm-item-title.small {
  font-size: 1.1rem;
}

.dm-item-title.large {
  font-size: 1.25rem;
}

.dm-item-icon {
  font-size: 1.75rem;
  transition: transform 0.3s;
}

.dm-bento-item:hover .dm-item-icon.mdi {
  transform: scale(1.1);
}

.dm-item-description {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.dm-bento-item:hover .dm-item-description {
  opacity: 1;
}

.dm-item-action {
  margin-top: 0.75rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(1rem);
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.dm-bento-item:hover .dm-item-action {
  opacity: 1;
  transform: translateY(0);
}

.dm-item-action.light {
  background-color: rgba(0, 0, 0, 1);
  color: white;

}

.dm-item-action.light:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.dm-item-action.dark {
  background-color: rgba(0, 0, 0, 1);
  color: rgba(255, 255, 255,1 );
}

.dm-item-action.dark:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.dm-decorative-circle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  transform: translate(25%, 25%) scale(0);
  opacity: 0;
  transition: all 0.5s ease-in-out;
  z-index: 1;
}

.dm-bento-item:hover .dm-decorative-circle {
  transform: translate(25%, 25%) scale(1);
  opacity: 1;
}

.dm-decorative-circle.light {
  background-color: rgba(255, 255, 255, 0.1);
}

.dm-decorative-circle.dark {
  background-color: rgba(0, 0, 0, 0.05);
}

.dm-hover-border {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.dm-bento-item:hover .dm-hover-border {
  opacity: 1;
}

.dm-hover-border.light {
  border-color: rgba(255, 255, 255, 0.2);
}

.dm-hover-border.dark {
  border-color: rgba(0, 0, 0, 0.1);
}

/* Auto spacing for content and action button */
.dm-item-footer {
  margin-top: auto;
}

/* Grid Layout with Auto Placement and Scrolling */
.dm-bento-grid-container {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  max-height: 75vh; /* Allow scrolling on all devices when content exceeds this height */
  padding-right: 4px; /* Prevent scrollbar from causing layout shift */
}

.dm-bento-grid-container::-webkit-scrollbar {
  width: 6px;
}

.dm-bento-grid-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.dm-bento-grid-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.dm-grid-areas-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(140px, auto);
  grid-gap: 0.75rem;
  padding-right: 0.5rem;
  padding-bottom: 10rem;
  padding-top: 0.5rem;
  grid-auto-flow: dense;
}

/* Size-based grid spans with auto-placement */
.bento-size-normal {
  grid-column: span 1;
  min-height: 140px;
}

.bento-size-medium {
  grid-column: span 2;
  min-height: 160px;
}

.bento-size-large {
  grid-column: span 3;
  min-height: 180px;
}

.bento-size-extra-large {
  grid-column: span 4;
  min-height: 200px;
}

/* Animation Classes */
.item-visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.item-hidden {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Text Colors */
.text-light {
  color: white;
}

.text-dark {
  color: #333;
}

/* Pattern background for bento items */
.dm-pattern-background {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .dm-grid-areas-bento {
    grid-template-columns: repeat(2, 1fr);
    padding-bottom: 20rem;
  }
  
  .bento-size-large,
  .bento-size-extra-large {
    grid-column: span 2;
  }
  
  .dm-category-button {
    min-width: 90px;
    padding: 0.375rem 0.75rem;
  }
  
  .dm-bento-grid-container {
    max-height: 80vh;
  }
}

@media (max-width: 640px) {
  .dm-grid-areas-bento {
    grid-template-columns: 1fr;
    padding-bottom: 20rem;
  }
  
  .bento-size-normal,
  .bento-size-medium,
  .bento-size-large,
  .bento-size-extra-large {
    grid-column: span 1;
  }
  
  .dm-category-button {
    font-size: 0.8rem;
  }
  
  .dm-category-buttons {
    flex-wrap: wrap;
    justify-content: space-around;
  }
  
  .dm-category-button {
    margin-bottom: 0.5rem;
  }
  
  .dm-bento-grid-container {
    max-height: 85vh;
  }
}

/* Improved focus styles for accessibility */
.dm-category-button:focus,
.dm-bento-item:focus,
.dm-item-action:focus {
  outline: 2px solid rgba(0, 0, 0, 0.2);
  outline-offset: 2px;
}

.dm-category-button:focus.active,
.dm-bento-item:focus {
  outline-color: rgba(255, 255, 255, 0.3);
}

/* Animation for new items */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Bubble animation keyframes */
@keyframes bubbleIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  70% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bubbleOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  30% {
    opacity: 0.8;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

/* Add these animation classes to your CSS */
.dm-bento-item.animation-bubble.item-visible {
  animation: bubbleIn 0.4s ease-out forwards;
}

.dm-bento-item.animation-bubble.item-hidden {
  animation: bubbleOut 0.3s ease-in forwards;
}

/* Default fade animations (already in your CSS) */
.dm-bento-item.animation-fade.item-visible {
  animation: fadeIn 0.3s ease-out forwards;
}

.dm-bento-item.animation-fade.item-hidden {
  animation: fadeOut 0.3s ease-in forwards;
}

/* Make sure the standard fade animation is defined */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}