/* Linke Sidebar — apl3-Parität (Bearbeitungen, Suche, Upload, Platte entfernen) */

.left-sidebar {
  width: 280px;
  position: relative;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1), inset -1px 0 0 rgba(229, 50, 45, 0.1);
}

.left-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #e5322d 0%, transparent 100%);
  opacity: 0.3;
  pointer-events: none;
}

.left-sidebar h3 {
  font-size: 13px;
  margin-bottom: 6px;
  color: #212529;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #000000;
  padding-bottom: 4px;
}

.search-container {
  position: relative;
  margin-bottom: 16px;
}

#search-bearbeitungen {
  width: 100%;
  padding: 10px 10px 10px 32px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s ease;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#search-bearbeitungen:focus {
  outline: none;
  border-color: #e5322d;
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.1), 0 2px 6px rgba(0, 0, 0, 0.1);
}

#search-bearbeitungen::placeholder {
  color: #adb5bd;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.no-results {
  padding: 12px;
  margin-bottom: 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  text-align: center;
}

.no-results p {
  margin: 0;
  color: #6c757d;
  font-size: 13px;
}

.accordion-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.operation-button-section {
  margin-bottom: 8px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.operation-button {
  width: 100%;
  padding: 12px 14px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  min-height: 44px;
  text-align: left;
}

.operation-button:hover {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  color: #212529;
  border-left: 3px solid #e5322d;
  transform: translateX(2px);
}

.operation-button:focus {
  outline: none;
  background: #f8f9fa;
  box-shadow: 0 0 0 2px rgba(229, 50, 45, 0.2);
}

.operation-button svg {
  display: none;
}

.selected-items-container {
  display: none;
  padding: 8px 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.operation-button-section.has-selected .selected-items-container {
  display: block;
}

.selected-item-display {
  padding: 8px 10px;
  font-size: 12px;
  color: #495057;
  background: #ffffff;
  border-bottom: 1px solid #f1f3f4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name remove"
    "details remove"
    "armierung remove";
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  min-height: 36px;
  cursor: pointer;
}

.selected-item-display:last-child {
  border-bottom: none;
}

.selected-item-display .item-name {
  grid-area: name;
  color: #e5322d;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-item-display .item-details {
  grid-area: details;
  color: #6c757d;
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.selected-item-display .item-cutout-armierung-hint {
  grid-area: armierung;
  color: #856404;
  font-size: 10px;
  font-style: italic;
  text-align: left;
  min-width: 0;
}

.selected-item-display .remove-btn {
  grid-area: remove;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  cursor: pointer;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-weight: bold;
  flex-shrink: 0;
}

.selected-item-display .remove-btn:hover {
  color: #ffffff;
  background: #e5322d;
  border-color: #e5322d;
}

.upload-images-section {
  margin-top: 10px;
}

.sidebar-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sidebar-upload-slot {
  position: relative;
  border: 1px solid #d8dde3;
  background: #f3f5f7;
  border-radius: 8px;
  aspect-ratio: 1.6 / 1;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.sidebar-upload-slot.is-empty::before {
  content: "+";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5adb8;
  font-size: 30px;
  font-weight: 400;
}

.sidebar-upload-slot:hover {
  border-color: #c0c7d1;
  background: #eceff3;
}

.sidebar-upload-slot-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sidebar-upload-slot-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(229, 50, 45, 0.95);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-bottom-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f0d5d5;
}

.sidebar-danger-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(220, 53, 69, 0.35);
  border-radius: 8px;
  background: #fff5f5;
  color: #b4232f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.sidebar-danger-button:hover {
  background: #fee2e2;
  border-color: rgba(220, 53, 69, 0.65);
  color: #991b1b;
  transform: translateY(-1px);
}

.left-sidebar::-webkit-scrollbar {
  width: 6px;
}

.left-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.left-sidebar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.remove-plate-confirm-modal .apl4-modal__intro {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.remove-plate-confirm-note {
  margin-top: 10px;
  color: #991b1b;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .left-sidebar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .left-sidebar {
    width: 100%;
    height: auto;
    max-height: 40vh;
  }
}
