/**
 * BULK ACTIONS - STYLES (CLEAN VERSION)
 * Fixed: No damage to normal cards, only affects selected cards
 */

/* ============================================
   Bulk Toolbar - LEFT SIDEBAR (CENTERED)
   ============================================ */

.bulk-toolbar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%) translateX(-100%);
  left: 0;
  width: 260px;
  max-height: 70vh;
  background: white;
  padding: 20px 16px;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 9999999; /* ABOVE zoom overlay (overlay is 999999) */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  border-radius: 0 16px 16px 0;
  border: 1.5px solid #e5e7eb;
  border-left: none;
}

.bulk-toolbar.visible {
  transform: translateY(-50%) translateX(0);
  pointer-events: all;
}

.bulk-toolbar-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================
   Sidebar Toggle Button - SEAMLESS WITH PANEL
   ============================================ */

.bulk-toolbar-toggle {
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 60px;
  background: white;
  border: 1.5px solid #e5e7eb;
  border-left: none;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
  z-index: 1;
  pointer-events: all;
  opacity: 1 !important;
}

.bulk-toolbar-toggle:hover {
  background: white !important;
  border-color: #e5e7eb;
  box-shadow: none;
  opacity: 1 !important;
}

.bulk-toolbar-toggle svg {
  width: 18px;
  height: 18px;
  color: #6b7280;
  transition: transform 0.3s ease;
  opacity: 1 !important;
}

.bulk-toolbar-toggle:hover svg {
  color: #1E88E5;
}

.bulk-toolbar.visible .bulk-toolbar-toggle svg {
  transform: rotate(180deg);
}

/* ============================================
   Toolbar Header (with gradient)
   ============================================ */

.bulk-toolbar-header {
  background: linear-gradient(135deg, #1c4dd7 0%, #819bff 100%);
  padding: 12px 14px;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 10px;
  box-shadow: 0 8px 18px rgba(28, 77, 215, 0.14);
}

.bulk-count {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ============================================
   Bulk Buttons (Stacked Vertically)
   ============================================ */

.bulk-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  background: #ffffff;
  color: #44526a;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, filter 0.2s ease;
  width: 100%;
  text-align: left;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.bulk-btn:hover {
  background: #f8fafc;
  border-color: rgba(28, 77, 215, 0.30);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(28, 77, 215, 0.10);
  filter: brightness(1.01);
}

.bulk-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.06);
}

.bulk-btn svg {
  flex-shrink: 0;
  color: #1E88E5;
}

/* Delete button - red theme */
.bulk-action-delete {
  background: #fff5f5;
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.18);
}

.bulk-action-delete:hover {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.32);
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.12);
  filter: brightness(1.01);
}

.bulk-action-delete:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.08);
}

.bulk-action-delete svg {
  color: #ef4444;
}

/* ============================================
   Card Checkboxes
   ============================================ */

.bulk-checkbox-wrapper {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
  pointer-events: all;
}

.output-card:hover .bulk-checkbox-wrapper,
.output-card.bulk-selected .bulk-checkbox-wrapper {
  opacity: 1;
}

.bulk-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1E88E5;
  margin: 0;
  display: block;
  pointer-events: all;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.bulk-checkbox:hover {
  border-color: rgba(30, 136, 229, 0.3);
  box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.08);
}

/* ============================================
   Selected Card State - NORMAL CARDS ONLY
   ============================================ */

.output-card.bulk-selected:not(.is-zoomed),
.output-card[data-bulk-selected="true"]:not(.is-zoomed) {
  outline: 1.5px solid #1E88E5 !important;
  outline-offset: -1.5px;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow:
    0 0 0 3px rgba(28, 77, 215, 0.08),
    0 8px 24px rgba(28, 77, 215, 0.10) !important;
}

.output-card:hover:not(.bulk-selected) {
  outline: 1px solid rgba(30, 136, 229, 0.3);
}

/* ============================================
   Zoomed Selected Cards - SEPARATE RULES
   ============================================ */

.output-card.is-zoomed.bulk-selected,
.output-card.is-zoomed[data-bulk-selected="true"] {
  background: var(--surface-card, #ffffff) !important;
  background-image: none !important;
  outline: 2px solid #1E88E5 !important;
  outline-offset: 0;
  box-shadow:
    0 0 0 4px rgba(28, 77, 215, 0.12),
    0 20px 60px -15px rgba(28, 77, 215, 0.18) !important;
  z-index: 1000001 !important;
}
.output-card.is-zoomed .bulk-checkbox-wrapper {
  opacity: 1;
  z-index: 1000002;
}

.output-card.is-zoomed .bulk-checkbox {
  width: 20px;
  height: 20px;
}

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

.bulk-notification {
  position: fixed;
  top: 90px;
  right: 20px;
  padding: 14px 24px;
  background: #374151;
  color: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bulk-notification.visible {
  opacity: 1;
  transform: translateX(0);
}

.bulk-notification-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.bulk-notification-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.bulk-notification-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ============================================
   Responsive (Mobile)
   ============================================ */

@media (max-width: 768px) {
  .bulk-toolbar {
    left: 50%;
    top: auto;
    bottom: 80px;
    transform: translateX(-50%) translateY(100%);
    width: 90%;
    max-width: 320px;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
  }

  .bulk-toolbar.visible {
    transform: translateX(-50%) translateY(0);
  }

  .bulk-toolbar-toggle {
    right: auto;
    left: 50%;
    top: -48px;
    bottom: auto;
    transform: translateX(-50%) rotate(90deg);
  }

  .bulk-toolbar.visible .bulk-toolbar-toggle {
    transform: translateX(-50%) rotate(-90deg);
  }

  .bulk-checkbox {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */

.bulk-toolbar::-webkit-scrollbar {
  width: 6px;
}

.bulk-toolbar::-webkit-scrollbar-track {
  background: #f9fafb;
}

.bulk-toolbar::-webkit-scrollbar-thumb {
  background: rgba(30, 136, 229, 0.3);
  border-radius: 3px;
}

.bulk-toolbar::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 136, 229, 0.5);
}
/* ============================================
   BULK BUTTON INTERACTION — FINAL FIX
============================================ */

.bulk-btn {
  border-radius: 999px;
  transition: all 0.18s ease;
}

.bulk-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.bulk-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* delete button already exists → just reinforce */
.bulk-action-delete {
  background: #fff5f5;
  color: #dc2626;
}