/* ═══════════════════════════════════════════════════════════
   RIS - Rezept Index System
   Modul F - Notizen Styles
   ═══════════════════════════════════════════════════════════ */

.modul-notizen {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.notiz-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.notiz-title-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.notiz-title {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.notiz-subtitle {
  color: var(--text-secondary);
  margin: 0;
}

.notiz-new-btn {
  white-space: nowrap;
  font-size: var(--font-lg);
  padding-inline: var(--space-xl);
}

/* Formular */
.notiz-form-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-xl);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-16px);
  transition: max-height 260ms ease, opacity 200ms ease, transform 220ms ease;
}

.notiz-form-wrapper.open {
  max-height: 640px;
  opacity: 1;
  transform: translateY(0);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.notiz-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.notiz-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.notiz-form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.notiz-form-field.full {
  grid-column: 1 / -1;
}

.notiz-form-field label {
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.notiz-form-field input,
.notiz-form-field select,
.notiz-form-field textarea {
  background: var(--bg-base);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-primary);
  font: inherit;
}

.notiz-form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.notiz-form-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* Filter */
.notiz-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
}

.notiz-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.notiz-filter-btn,
.notiz-chip {
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-sm);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.notiz-filter-btn.active,
.notiz-chip.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--bg-base);
}

/* Grid */
.notiz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .notiz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .notiz-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.notiz-card {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border 180ms ease, box-shadow 180ms ease;
}

.notiz-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.notiz-card.is-done {
  opacity: 0.7;
  border-left: 4px solid var(--status-ok);
}

.notiz-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.notiz-category-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--font-weight-semibold);
}

.notiz-category-badge--allgemein { background: #6b72801a; color: #a1a1aa; }
.notiz-category-badge--einkauf { background: #0ea5e91a; color: #38bdf8; }
.notiz-category-badge--lager { background: #f973161a; color: #fb923c; }
.notiz-category-badge--rezept { background: #22c55e1a; color: #4ade80; }
.notiz-category-badge--menu { background: #a855f71a; color: #c084fc; }

.notiz-meta {
  color: var(--text-muted);
  font-size: var(--font-xs);
}

.notiz-title-text {
  font-size: var(--font-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.notiz-text {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notiz-done-info {
  font-size: var(--font-sm);
  color: var(--status-ok);
}

.notiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.notiz-card button.btn-ghost {
  background: transparent;
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
}

.notiz-card button.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Edit Form */
.notiz-edit-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.notiz-edit-form .notiz-form-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.notiz-edit-form textarea {
  min-height: 120px;
}

.notiz-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xxl);
  border: 1px dashed var(--bg-border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

/* Skeleton */
.notiz-card.skeleton {
  position: relative;
  overflow: hidden;
}

.notiz-card.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 40%, transparent 80%);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
