/* ───────────────────────────────────────────────────────────────────────
   Feature-Tabs CSS (Scheduler, Multistream, Bot)
   Gemeinsame Styles für Modals, Listen, Formulare
   ─────────────────────────────────────────────────────────────────────── */

/* ─── Generisches Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: modalFadeIn 0.15s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: var(--color-bg-elevated, #1a1d26);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 22px 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-card.modal-wide { max-width: 640px; }
@keyframes modalSlideIn {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-icon:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ─── Form-Rows ───────────────────────────────────────────────────────── */
.form-row {
  margin-bottom: 14px;
}
.form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--color-text);
}
.form-row label .req { color: #ef4444; margin-left: 2px; }
.form-row input[type=text],
.form-row input[type=datetime-local],
.form-row input[type=number],
.form-row input[type=url],
.form-row input[type=password],
.form-row textarea,
.form-row select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--color-text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
  box-sizing: border-box;
}
.form-row textarea { min-height: 72px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.05);
}
.form-row .form-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Scheduler ───────────────────────────────────────────────────────── */
.sched-filter {
  display: flex;
  gap: 4px;
}
.sched-filter-btn {
  font-size: 0.75rem !important;
  padding: 4px 10px !important;
}
.sched-filter-btn.active {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #a5b4fc !important;
}
.sched-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sched-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: all 0.15s;
}
.sched-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
}
.sched-item.past { opacity: 0.55; }
.sched-item-date {
  flex-shrink: 0;
  text-align: center;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  min-width: 74px;
}
.sched-item-day {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c7d2fe;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sched-item-time {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}
.sched-item-body {
  flex: 1;
  min-width: 0;
}
.sched-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 3px;
}
.sched-item-meta {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.sched-item-rel {
  color: #6ee7b7;
  font-weight: 600;
}
.sched-item-rel.past { color: #94a3b8; }

/* ─── Generische Feature-Liste (Destinations, Commands, Templates) ───── */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: all 0.15s;
}
.feature-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
}
.feature-item-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.feature-item-body {
  flex: 1;
  min-width: 0;
}
.feature-item-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
  margin-bottom: 2px;
}
.feature-item-sub {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.feature-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.feature-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  margin-right: 6px;
}
.feature-status-dot.on { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }

/* ─── Toggle-Switch ──────────────────────────────────────────────────── */
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  transition: 0.2s;
  border-radius: 22px;
}
.switch-slider::before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  transition: 0.2s;
  border-radius: 50%;
}
.switch input:checked + .switch-slider {
  background: #10b981;
}
.switch input:checked + .switch-slider::before {
  transform: translateX(16px);
}

/* ─── Platform-Picker (Multistream) ──────────────────────────────────── */
.platform-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}
.platform-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  padding: 10px 6px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s;
}
.platform-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
}
.platform-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.6);
  color: #c7d2fe;
}

/* ─── Empty state ─────────────────────────────────────────────────────── */
.empty-state-big {
  padding: 40px 20px;
  text-align: center;
}
.empty-state-big-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state-big-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}
.empty-state-big-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 380px;
  margin: 0 auto 18px;
}

/* ─── Bot-Tab Spezifisch ──────────────────────────────────────────────── */
.bot-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.bot-status-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bot-status-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.bot-status-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.bot-status-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}
.bot-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.bot-tabs::-webkit-scrollbar { display: none; }
.bot-tab {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.bot-tab:hover { color: var(--color-text); }
.bot-tab.active {
  color: #a5b4fc;
  border-bottom-color: #6366f1;
}
.bot-tab-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}
.bot-tab.active .bot-tab-count {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}
.bot-tab-content {
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.tag-chip {
  display: inline-block;
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 600;
}
.tag-chip.mod {
  background: rgba(236, 72, 153, 0.12);
  color: #f9a8d4;
  border-color: rgba(236, 72, 153, 0.25);
}

/* Responsive */
@media (max-width: 640px) {
  .sched-item { flex-direction: row; flex-wrap: wrap; }
  .feature-item { flex-wrap: wrap; }
  .feature-item-actions { width: 100%; justify-content: flex-end; margin-top: 6px; }
  .bot-tab { padding: 8px 10px; font-size: 0.78rem; }
}

/* ─── Nav Soon-Badge ─────────────────────────────────────────────────── */
.nav-soon-badge {
  display: inline-block;
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(236, 72, 153, 0.18);
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.35);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Bot-Type-Picker ─────────────────────────────────────────────────── */
.bot-type-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 640px) { .bot-type-picker { grid-template-columns: 1fr; } }
.bot-type-option {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.bot-type-option:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.04);
}
.bot-type-option.selected {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.12);
}
.bot-type-option input[type=radio] {
  margin-top: 2px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.bot-type-body { flex: 1; }
.bot-type-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-text);
  margin-bottom: 3px;
}
.bot-type-desc {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
