/**
 * MetalVision - Drawer Styles
 * Estilos para drawers laterales
 */

/* Backdrop */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.show {
  opacity: 1;
}

/* Drawer container */
.drawer {
  position: fixed;
  top: 0;
  height: 100%;
  background-color: var(--bs-body-bg);
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.drawer-right {
  right: 0;
  transform: translateX(100%);
}

.drawer-right.show {
  transform: translateX(0);
}

/* Drawer sizes */
.drawer-sm {
  width: 400px;
  max-width: 90vw;
}

.drawer-md {
  width: 600px;
  max-width: 90vw;
}

.drawer-lg {
  width: 800px;
  max-width: 90vw;
}

.drawer-xl {
  width: 1000px;
  max-width: 90vw;
}

/* Drawer header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
}

.drawer-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--bs-body-color);
}

.drawer-header .btn-close {
  margin: 0;
}

/* Drawer body */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Drawer footer (optional) */
.drawer-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .drawer {
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .drawer-backdrop {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
  .drawer-sm,
  .drawer-md,
  .drawer-lg,
  .drawer-xl {
    width: 100vw;
    max-width: 100vw;
  }
}

/* Scrollbar styling for drawer body */
.drawer-body::-webkit-scrollbar {
  width: 8px;
}

.drawer-body::-webkit-scrollbar-track {
  background: var(--bs-tertiary-bg);
}

.drawer-body::-webkit-scrollbar-thumb {
  background: var(--bs-secondary);
  border-radius: 4px;
}

.drawer-body::-webkit-scrollbar-thumb:hover {
  background: var(--bs-secondary-color);
}
