/* =====================
   DRAWER – SENDUNGSINFORMATIONEN
===================== */

/* Kleine Klickfläche am rechten Rand */
.drawer-toggle {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 160px;
  background: #00a11b;
  border-radius: 6px 0 0 6px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  z-index: 10001;
  color: #fff;
  font-size: 18px;
  transition: right 0.3s ease, background 0.2s ease, border-radius 0.3s ease;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
}

.drawer-toggle:hover {
  background: #008a17;
}

/* Wenn Drawer offen, wandert Button zur linken Seite des Drawers */
.drawer-toggle.at-drawer {
  /* Wird dynamisch per JS gesetzt, Fallback */
  right: 0;
  border-radius: 6px 0 0 6px; /* links rund, rechts kantig */
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
}

/* Drawer Panel */
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: 50vw;
  max-width: 600px;
  min-width: 300px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #d0d0d0;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 15px;
  border-bottom: 1px solid #d0d0d0;
  display: flex;
  flex-direction: column;
  background: #f9f9f9;
}

.drawer-header h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #333;
}

/* Drawer Tabs */
.drawer-tabs {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.drawer-tab {
  flex: 1;
  padding: 10px 8px;
  background: white;
  border: 1px solid #d0d0d0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 60px;
}

.drawer-tab i {
  font-size: 18px;
  margin-bottom: 2px;
}

.drawer-tab span {
  font-size: 11px;
  white-space: nowrap;
}

.drawer-tab:hover:not(.active) {
  background: #f0f0f0;
  color: #333;
}

.drawer-tab.active {
  background: white;
  border-color: #3498db;
  border-bottom: 2px solid white;
  color: #3498db;
  font-weight: 600;
  position: relative;
  z-index: 1;
  margin-bottom: -1px;
}

/* Tab Content */
.drawer-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.drawer-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drawer-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
  padding: 5px;
}

.drawer-close:hover {
  color: #000;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.drawer-content p {
  margin: 10px 0;
  color: #333;
}

.drawer-content label {
  font-weight: bold;
  color: #555;
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-content .info-row {
  padding: 8px;
  background: #f9f9f9;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 13px;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 9999;
}

.drawer-overlay.open {
  background: rgba(0, 0, 0, 0.5);
  opacity: 1;
  pointer-events: auto;
}
