/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Upload Badge Styles - Consistent across all upload listings */

.upload-badges,
.upload-metadata-badges,
.upload-all-badges {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  flex-wrap: wrap;
}

.upload-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  height: 20px; /* Smaller fixed height for consistency */
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

/* Origin badge colors */
.origin-badge.badge-plugin {
  background: #f3e8ff;
  color: #7c3aed;
  border-color: #e9d5ff;
}

.origin-badge.badge-file {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.origin-badge.badge-url {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}

.origin-badge.badge-default {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

/* Category badge */
.category-badge {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* Quality badge colors */
.quality-badge.badge-quality-high {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}

.quality-badge.badge-quality-medium {
  background: #fed7aa;
  color: #9a3412;
  border-color: #fdba74;
}

.quality-badge.badge-quality-low {
  background: #fecaca;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Stats badge */
.stats-badge {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* Hover effects */
.upload-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* No metadata placeholder */
.no-metadata {
  color: #d1d5db;
  font-size: 0.75rem;
}

/* Admin table badge styling - consistent with my_uploads */
.admin-table .upload-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  height: 18px;
  border-radius: 3px;
  border: 1px solid;
}

.admin-table .upload-badges,
.admin-table .upload-metadata-badges,
.admin-table .upload-all-badges {
  gap: 0.375rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .upload-badges,
  .upload-metadata-badges {
    gap: 0.25rem;
  }

  .upload-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    height: 22px;
  }
}

/* ========================================
   Hamburger Menu Styles
   ======================================== */

/* Hamburger Menu Wrapper */
.hamburger-menu-wrapper {
  position: relative;
  z-index: 1000;
}

/* Hamburger Toggle Button */
.hamburger-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  border: none;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.hamburger-toggle:hover {
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.hamburger-toggle:active {
  transform: translateY(0);
}

.hamburger-toggle:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.hamburger-icon {
  width: 24px;
  height: 24px;
  color: #374151;
}

/* Menu Container */
.menu-container {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #ffffff;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
  z-index: 1002;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.menu-container.menu-hidden {
  transform: translateX(-100%);
}

.menu-container.menu-visible {
  transform: translateX(0);
}

/* Menu Navigation */
.menu-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

/* Close Button Inside Menu */
.menu-close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.menu-close-button:hover {
  background: #f3f4f6;
}

.menu-close-button:active {
  background: #e5e7eb;
}

.menu-close-button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.close-icon {
  width: 20px;
  height: 20px;
  color: #6b7280;
}

/* Menu Header */
.menu-header {
  margin-top: 40px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.menu-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

/* Menu Items */
.menu-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: all 0.2s ease;
}

.menu-item:hover {
  background: #f9fafb;
  color: #111827;
}

.menu-item:active {
  background: #f3f4f6;
}

.menu-item:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.menu-item-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-icon {
  width: 20px;
  height: 20px;
  color: #6b7280;
}

.menu-item-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: #f3f4f6;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
}

.menu-item-danger {
  color: #dc2626;
}

.menu-item-danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

.menu-item-danger .menu-item-icon {
  color: #dc2626;
}

/* Backdrop */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  transition: opacity 0.3s ease;
}

.menu-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.menu-backdrop.backdrop-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .menu-container {
    width: 80%;
    max-width: 320px;
  }

  .hamburger-toggle {
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
  }

  .hamburger-icon {
    width: 22px;
    height: 22px;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .menu-container,
  .menu-backdrop,
  .hamburger-toggle,
  .menu-item,
  .menu-close-button {
    transition: none;
  }
}

/* Focus Visible for Keyboard Navigation */
.hamburger-toggle:focus-visible,
.menu-close-button:focus-visible,
.menu-item:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
