/* ============================================================
   COMMUNITY STYLES
   Modernes Design mit Kategorie-Akzentfarben
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */

:root {
  /* Kategorie-Farben */
  --community-color-allgemein: #6b7280;
  --community-color-frage: #3b82f6;
  --community-color-event: #10b981;
  --community-color-fundstueck: #f59e0b;
  --community-color-marktplatz: #06b6d4;
  --community-color-empfehlung: #8b5cf6;
  --community-color-diskussion: var(--ghost-accent-color, #3eb0ef);
  
  /* Layout */
  --community-card-radius: 12px;
  --community-spacing: 1.5rem;
  --community-transition: 0.2s ease;
}

/* ============================================================
   AVATARS
   ============================================================ */

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}

.avatar--md {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.avatar--lg {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.avatar--initials {
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Avatar Wrapper für Bild mit Fallback */
.avatar-wrapper {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.avatar-wrapper.avatar--sm {
  width: 32px;
  height: 32px;
}

.avatar-wrapper.avatar--md {
  width: 40px;
  height: 40px;
}

.avatar-wrapper.avatar--lg {
  width: 48px;
  height: 48px;
}

.avatar-wrapper .avatar {
  position: absolute;
  top: 0;
  left: 0;
}

.avatar-wrapper .avatar--fallback {
  display: none;
  align-items: center;
  justify-content: center;
}

.avatar--anonymous {
  background: #e5e7eb;
  color: #9ca3af;
}

.avatar--anonymous svg {
  width: 60%;
  height: 60%;
}

img.avatar {
  display: block;
  border: 2px solid #f3f4f6;
}

/* ============================================================
   SVG ICONS
   ============================================================ */

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

.card-category-badge .icon,
.card-village .icon,
.card-action .icon,
.filter-btn .icon,
.btn .icon {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.25em;
}

.vote-btn .icon {
  width: 18px;
  height: 18px;
}

.community-auth-welcome .icon {
  width: 1.25em;
  height: 1.25em;
  margin-right: 0.5em;
}

/* ============================================================
   PRICE INPUT
   ============================================================ */

.price-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-prefix {
  font-weight: 600;
  color: var(--color-secondary-text, #64748b);
  white-space: nowrap;
}

.compose-input--price {
  max-width: 120px;
}

/* Remove number input spinners */
.compose-input--price::-webkit-outer-spin-button,
.compose-input--price::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.compose-input--price[type=number] {
  -moz-appearance: textfield;
}

/* ============================================================
   HERO BANNER
   ============================================================ */

.hero-banner--community,
.hero-banner--agenda,
.hero-banner--werbeportal {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, var(--ghost-accent-color, #3eb0ef) 0%, #667eea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-bottom: 2rem;
  width: 100%;
  border-radius: 0 !important;
  /* Den Banner bündig an das Menü schieben */
  margin-top: -1px !important;
}

.hero-banner__content {
  position: relative;
  z-index: 1;
  color: white;
  padding: 0 1rem;
}

.hero-banner__title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-banner__subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.125rem;
  opacity: 0.9;
}

@media (max-width: 767px) {
  .hero-banner--community,
  .hero-banner--agenda,
  .hero-banner--werbeportal {
    height: 160px;
  }
  .hero-banner__title {
    font-size: 1.75rem;
  }
  .hero-banner__subtitle {
    font-size: 1rem;
  }
}

/* ============================================================
   COMMUNITY PAGE LAYOUT
   ============================================================ */

.community-page {
  margin: 0 auto 2rem;
  max-width: 900px;
  padding: 0 1rem;
}

/* ============================================================
   AUTH STATUS
   ============================================================ */

.community-auth-status {
  margin-bottom: var(--community-spacing);
}

.community-auth-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--color-bg, #fff);
  border-radius: var(--community-card-radius);
  color: var(--color-text, #333);
}

.community-auth-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--ghost-accent-color, #3eb0ef) 0%, #667eea 100%);
  border-radius: var(--community-card-radius);
  color: white;
}

.community-auth-prompt p {
  margin: 0;
  font-weight: 500;
}

.community-auth-welcome {
  padding: 0.75rem 1.5rem;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--community-card-radius);
  color: var(--color-text, #333);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.community-auth-welcome .welcome-text {
  flex: 1;
}

/* ============================================================
   COMPOSE SECTION
   ============================================================ */

/* Sticky Compose Container */
.community-compose-wrapper {
  position: sticky;
  top: 52px; /* Unterhalb des Ghost-Headers (Mobile) */
  z-index: 50; /* Niedriger als Ghost-Header (z-index: 60) */
  margin-bottom: var(--community-spacing);
  background: var(--color-bg, #fff);
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 0.75rem 1rem;
  transition: top 0.3s ease-in-out; /* Weicher Übergang wenn Header schrumpft */
}

@media (min-width: 768px) {
  .community-compose-wrapper {
    top: 76px; /* Größerer Header auf Desktop */
    /* Desktop: gleiche Breite wie der Rest (keine negativen Margins) */
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Anpassung wenn der Header geschrumpft ist (via JS Klasse) */
.community-compose-wrapper.header-is-sticky {
  top: 52px !important; /* Höhe des kompakten Headers auf Mobile */
}

@media (min-width: 768px) {
  .community-compose-wrapper.header-is-sticky {
    top: 60px !important; /* Höhe des kompakten Headers auf Desktop */
  }
}

.community-compose {
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--community-card-radius);
  padding: var(--community-spacing);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
}

/* Collapsed State (Initial) */
.community-compose--collapsed {
  padding: 0.75rem 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.community-compose--collapsed .compose-header {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.community-compose--collapsed .compose-header h2 {
  font-size: 1rem;
  margin: 0;
  margin-right: 0.25rem; /* Kleiner Abstand zum Teaser */
  white-space: nowrap;
  flex-shrink: 0;
}

.community-compose--collapsed .compose-write-icon {
  margin-right: -0.25rem; /* Icon näher an Text */
}

.community-compose--collapsed .compose-form {
  display: none;
}

.community-compose--collapsed .compose-teaser {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0.625rem;
  min-width: 0; /* Ermöglicht flex-shrink des Inputs */
}

/* Desktop: Pill breiter machen (eigene Zeile im collapsed State) */
@media (min-width: 768px) {
  .community-compose--collapsed .compose-header {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .community-compose--collapsed .compose-teaser {
    flex: 0 0 100%;
  }

  .community-compose--collapsed .compose-teaser-input {
    width: 100%;
  }
}

.compose-teaser-avatar {
  flex-shrink: 0;
}

.compose-teaser-avatar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.compose-teaser-avatar .avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
}

/* Avatar-Wrapper im Compose-Teaser überschreiben */
.compose-teaser-avatar .avatar-wrapper {
  width: 40px;
  height: 40px;
}

.compose-teaser-avatar .avatar-wrapper .avatar {
  width: 40px;
  height: 40px;
}

/* Mobile: kompakteres Layout - "Neuer Beitrag" ausblenden */
@media (max-width: 640px) {
  .community-compose--collapsed .compose-header {
    gap: 0.375rem;
  }
  
  /* "Neuer Beitrag" Text auf Mobile ausblenden */
  .community-compose--collapsed .compose-header h2 {
    display: none;
  }
  
  /* Mobile: nur Avatar + "Pill" (Icon ausblenden) */
  .community-compose--collapsed .compose-write-icon {
    display: none;
  }
  
  .community-compose--collapsed .compose-teaser {
    gap: 0.5rem;
  }
  
  .compose-teaser-avatar .avatar,
  .compose-teaser-avatar .avatar-wrapper,
  .compose-teaser-avatar .avatar-wrapper .avatar {
    width: 36px;
    height: 36px;
  }
  
  .compose-teaser-avatar .avatar--initials {
    font-size: 0.75rem;
  }
}

/* Sehr kleine Bildschirme */
@media (max-width: 380px) {
  .compose-teaser-avatar .avatar,
  .compose-teaser-avatar .avatar-wrapper,
  .compose-teaser-avatar .avatar-wrapper .avatar {
    width: 32px;
    height: 32px;
  }
}

.community-compose--collapsed .compose-teaser-input {
  flex: 1;
  background: var(--color-lighter-gray, #f3f4f6);
  border: none;
  border-radius: 20px;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  color: var(--color-secondary-text, #6b7280);
  cursor: pointer;
  transition: background 0.2s;
}

.community-compose--collapsed .compose-teaser-input:hover {
  background: var(--color-border, #e5e7eb);
}

/* Expanded State */
.community-compose--expanded {
  box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 1px var(--ghost-accent-color, #3eb0ef);
  transform: scale(1.02);
  animation: compose-expand 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: calc(100vh - 120px); /* Verhindert Überlappung über den Viewport */
  overflow-y: auto; /* Ermöglicht Scrollen im Feld */
  scrollbar-width: thin; /* Schmaler Scrollbar für Firefox */
}

/* Custom Scrollbar für Chrome/Safari */
.community-compose--expanded::-webkit-scrollbar {
  width: 6px;
}

.community-compose--expanded::-webkit-scrollbar-thumb {
  background: var(--color-border, #e5e7eb);
  border-radius: 10px;
}

.community-compose--expanded::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary-text, #9ca3af);
}

@keyframes compose-expand {
  0% {
    transform: scale(1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 0 0 1px var(--ghost-accent-color, #3eb0ef);
  }
}

.community-compose--expanded .compose-teaser {
  display: none;
}

.community-compose--expanded .compose-write-icon {
  display: none;
}

.community-compose--expanded .compose-header {
  margin-bottom: 1rem;
}

.community-compose--expanded .compose-header h2 {
  font-size: 1.25rem;
}

.community-compose--expanded .compose-form {
  display: block;
  animation: compose-form-appear 0.3s ease-out 0.1s both;
}

@keyframes compose-form-appear {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Collapse Animation - nur bei Rückkehr vom expanded State */
.community-compose--collapsing {
  animation: compose-collapse 0.3s ease-out;
}

@keyframes compose-collapse {
  from {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  }
  to {
    transform: scale(1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
}

/* Sticky Shadow when scrolled */
.community-compose-wrapper.is-sticky .community-compose {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Call-to-action Pulse Animation */
.community-compose--collapsed::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--community-card-radius) + 2px);
  background: linear-gradient(90deg, var(--ghost-accent-color, #3eb0ef), #667eea, var(--ghost-accent-color, #3eb0ef));
  background-size: 200% 100%;
  z-index: -1;
  opacity: 0;
  animation: compose-cta-pulse 3s ease-in-out infinite;
}

@keyframes compose-cta-pulse {
  0%, 100% { opacity: 0; background-position: 0% 50%; }
  50% { opacity: 0.5; background-position: 100% 50%; }
}

.community-compose--collapsed:hover::after {
  opacity: 0.8;
  animation: none;
}

/* Write Icon für collapsed state */
.compose-write-icon {
  width: 24px;
  height: 24px;
  color: var(--ghost-accent-color, #3eb0ef);
  flex-shrink: 0;
}

/* Mobile Anpassungen für Sticky Compose */
@media (max-width: 767px) {
  .community-compose-wrapper.is-sticky .community-compose {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .community-compose--collapsed .compose-teaser-input {
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
  }
  
  .community-compose--expanded {
    transform: none; /* Kein Scale auf Mobile */
    max-height: calc(100vh - 80px) !important;
  }
}

.compose-header {
  margin-bottom: 1rem;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem;
  width: 100%;
}

.compose-header h2 {
  font-size: 1.25rem;
  margin: 0 !important;
  flex: 1;
}

.compose-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-text, #666);
  cursor: pointer;
  padding: 0 0.5rem;
  margin-right: -0.5rem;
  transition: color 0.2s;
  order: 2; /* Stellt sicher, dass das X nach dem Titel kommt */
}

.compose-close-btn:hover {
  color: var(--color-error, #dc2626);
}

.community-compose--expanded .compose-close-btn {
  display: block;
}

.compose-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.compose-field {
  flex: 1;
}

.compose-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text, #333);
  margin-bottom: 0.5rem;
}

.compose-select,
.compose-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-bg, #fff);
  color: var(--color-text, #333);
  transition: border-color var(--community-transition), box-shadow var(--community-transition);
}

.compose-select:focus,
.compose-input:focus,
.compose-textarea:focus {
  outline: none;
  border-color: var(--ghost-accent-color, #3eb0ef);
  box-shadow: 0 0 0 3px rgba(62, 176, 239, 0.1);
}

.compose-textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-bg, #fff);
  color: var(--color-text, #333);
  resize: vertical;
  font-family: inherit;
}

.compose-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--color-text, #666);
  opacity: 0.6;
  margin-top: 0.25rem;
}

/* Marketplace Fields */
.compose-marketplace-fields {
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(6, 182, 212, 0.05);
  border-radius: 8px;
  border: 1px dashed var(--community-color-marktplatz);
}

.compose-field--price {
  flex: 2;
}

.compose-field--free {
  flex: 1;
  display: flex;
  align-items: flex-end;
}

.compose-field .compose-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--color-text, #333);
  margin: 0;
  height: 46px; /* Match height of compose-input for alignment */
}

.compose-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--ghost-accent-color, #3eb0ef);
  cursor: pointer;
}

.compose-checkbox-label span {
  line-height: 1.4;
}

/* Image Preview Grid */
.compose-image-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 480px) {
  .compose-image-preview-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.compose-image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-lighter-gray, #f7fafc);
}

.compose-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compose-remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  z-index: 2;
}

.compose-remove-image:hover {
  background: rgba(220, 38, 38, 0.8);
}

/* Post Image Slider */
.post-images-slider {
  position: relative;
  margin: 0.75rem -1.5rem;
  background: #000;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.post-images-container {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease-out;
}

.post-image-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

.post-image-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.slider-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.slider-nav--prev { left: 8px; }
.slider-nav--next { right: 8px; }

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0;
  cursor: pointer;
}

.slider-dot--active {
  background: #fff;
  transform: scale(1.2);
}

.image-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 10;
}

/* Community Header Bar */
.community-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.notification-bell-wrapper {
  position: relative;
}

.notification-bell-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--color-text, #4a5568);
  border-radius: 50%;
  transition: background 0.2s;
  position: relative;
}

.notification-bell-btn:hover {
  background: var(--color-lighter-gray, #f7fafc);
}

.icon--bell {
  width: 24px;
  height: 24px;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--community-color-frage, #3b82f6);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
}

.notifications-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 1000;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border, #e2e8f0);
}

.notifications-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

/* .btn-text entfernt, da durch btn--bordered ersetzt */

.notifications-list {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border, #f1f5f9);
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-item:hover {
  background: var(--color-lighter-gray, #f8fafc);
}

.notification-item--unread {
  background: rgba(59, 130, 246, 0.03);
}

.notification-item--unread::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--community-color-frage, #3b82f6);
  border-radius: 50%;
}

.notification-item { position: relative; }

.notification-title {
  font-size: 13px;
  font-weight: 500;
  color: #1a202c;
}

.notification-preview {
  font-size: 12px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-time {
  font-size: 11px;
  color: #a0aec0;
}

.notifications-empty {
  padding: 32px 16px;
  text-align: center;
  color: #a0aec0;
  font-size: 13px;
}

/* Marketplace Contact */
.post-contact-wrapper {
  margin-bottom: 1.5rem;
}

#post-contact-form-container {
  animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-action--contact {
  color: var(--community-color-marktplatz, #06b6d4) !important;
  font-weight: 600;
}

.card-action--contact:hover {
  background: rgba(6, 182, 212, 0.05) !important;
}

.contact-modal-container {
  max-width: 900px !important;
}

.btn--outline {
  background: white;
  border: 1px solid var(--color-border, #e2e8f0);
  color: var(--color-text, #4a5568);
}

.btn--outline:hover {
  background: var(--color-lighter-gray, #f7fafc);
}

.compose-poll-container {
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px dashed var(--community-color-empfehlung);
  border-radius: 8px;
  margin-top: 1.5rem; /* Abstand nach oben zum Bild-Button */
  margin-bottom: 1.5rem;
}

.compose-poll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.compose-poll-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text, #333);
}

.compose-remove-poll {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--color-text, #666);
  cursor: pointer;
}

.compose-poll-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

/* Compose Footer */
.compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.compose-options {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 600px) {
  .compose-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .compose-footer {
    flex-direction: column;
    gap: 1rem;
  }
  
  .compose-options {
    width: 100%;
    justify-content: space-between;
  }
  
  .compose-footer .btn--accent {
    width: 100%;
  }
}

/* ============================================================
   FILTER BAR
   ============================================================ */

/* Filter Wrapper (nicht mehr sticky) */
.community-filters-wrapper {
  background: var(--color-bg, #fff);
}

.community-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--community-spacing);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

/* Volltext-Suche */
.filter-search {
  position: relative;
  min-width: 160px;
  max-width: 220px;
  display: flex;
  align-items: center;
  height: 36px;
}

.filter-search-input {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 2.25rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-bg, #fff);
  color: var(--color-text, #333);
  font-size: 0.875rem;
  height: 36px; /* Gleiche Höhe wie Dropdowns */
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--ghost-accent-color, #3eb0ef);
  box-shadow: 0 0 0 3px rgba(62, 176, 239, 0.15);
}

.community-filter-input::placeholder {
  color: var(--color-secondary-text, #9ca3af) !important;
  font-weight: 400 !important;
}

.filter-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--color-secondary-text, #9ca3af);
  pointer-events: none;
}

.filter-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: var(--color-border, #e5e7eb);
  border-radius: 50%;
  color: var(--color-secondary-text, #6b7280);
  font-size: 0.75rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.filter-search-clear:hover {
  background: var(--color-secondary-text, #9ca3af);
  color: white;
}

.filter-search.has-value .filter-search-clear {
  display: flex;
}

.filter-group {
  display: flex;
  gap: 0.5rem;
}

/* ============================================================
   FILTER ROW (Agenda-Style)
   ============================================================ */

.community-filter-row {
  display: flex;
  gap: 1rem;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 1.5rem;
}

.community-filter-select,
.community-filter-input,
.community-filter-row .custom-dropdown {
  flex: 1 1 33.333% !important; /* Exakt gleiche Basis-Breite */
  min-width: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.community-filter-select,
.community-filter-input,
.community-filter-row .custom-dropdown-trigger,
.compose-select,
.compose-input,
.compose-form .custom-dropdown-trigger {
  height: 46px !important;
  width: 100% !important;
  padding: 0 0.875rem !important;
  border: 1.2px solid #b1b5be !important; /* Etwas dicker und dunkler für exakten Match */
  border-radius: 6px !important;
  font-size: 15px !important; /* Exakte Größe für System-Schrift */
  font-weight: 500 !important; /* Auf 500 erhöht, damit beide gleich "kräftig" wirken */
  font-family: var(--font-body, inherit) !important;
  background-color: #fff !important;
  color: #1a202c !important;
  transition: all 0.2s;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  -webkit-font-smoothing: auto !important; /* Auf auto gesetzt für natürlichere Dicke */
  box-shadow: none !important;
}

/* Pfeil-Styling: Identisch für Select und Custom Dropdown via Background-Image */
.community-filter-select,
.community-filter-row .custom-dropdown-trigger,
.compose-select,
.compose-form .custom-dropdown-trigger {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.875rem center !important; /* Exakt gleiche Position */
  background-size: 1rem !important;
  padding-right: 2.5rem !important;
  cursor: pointer;
}

/* Entferne das ::after, da wir jetzt background-image nutzen */
.community-filter-row .custom-dropdown-trigger::after,
.compose-form .custom-dropdown-trigger::after {
  display: none !important;
}

.community-filter-row .custom-dropdown-trigger:hover {
  border-color: var(--ghost-accent-color, #3182ce) !important;
}

.community-filter-row .custom-dropdown-trigger .category-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}

.community-filter-row .custom-dropdown-trigger .dropdown-label {
  flex: 1 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-weight: 500 !important;
}

/* Identischer Schatten und Border für Fokus-Zustand */
.community-filter-select:focus,
.community-filter-input:focus,
.community-filter-row .custom-dropdown.is-open .custom-dropdown-trigger {
  outline: none !important;
  border-color: var(--ghost-accent-color, #3182ce) !important;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15) !important;
}

.community-filter-row .custom-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  max-height: 300px;
  overflow-y: auto;
}

.community-filter-row .custom-dropdown.is-open .custom-dropdown-menu {
  display: block;
}

.community-filter-row .custom-dropdown-option {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
  padding: 0.75rem 0.875rem !important;
  border: none !important;
  background: transparent !important;
  color: #1a202c !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  font-family: var(--font-body, inherit);
  cursor: pointer !important;
  text-align: left !important;
  transition: background 0.15s !important;
}

.community-filter-row .custom-dropdown-option:hover {
  background: #f7fafc !important;
}

.community-filter-row .custom-dropdown-option.is-selected {
  background: rgba(49, 130, 206, 0.08) !important;
  font-weight: 500 !important;
}

.community-filter-row .custom-dropdown-option .category-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}

/* Kategorie-Icon Farben */
.community-filter-row .category-icon--allgemein { color: var(--community-color-allgemein); }
.community-filter-row .category-icon--frage { color: var(--community-color-frage); }
.community-filter-row .category-icon--event { color: var(--community-color-event); }
.community-filter-row .category-icon--fundstueck { color: var(--community-color-fundstueck); }
.community-filter-row .category-icon--marktplatz { color: var(--community-color-marktplatz); }
.community-filter-row .category-icon--empfehlung { color: var(--community-color-empfehlung); }
.community-filter-row .category-icon--diskussion { color: var(--community-color-diskussion); }
.community-filter-row .category-icon--kommentar { color: #10b981; }

@media (max-width: 768px) {
  .community-filter-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .community-filter-select,
  .community-filter-input,
  .community-filter-row .custom-dropdown {
    width: 100% !important;
    flex: none !important;
  }
}

.community-filter-input::placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
}

/* Slider-Control Filter Buttons (Agenda-Style) */
.slider-control {
  position: relative;
  display: inline-flex;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 4px;
}

.slider-track {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: var(--ghost-accent-color, #3182ce);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.slider-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
  color: #4a5568;
  font-family: inherit;
  white-space: nowrap;
}

.slider-btn:hover {
  color: var(--ghost-accent-color, #3182ce);
}

.slider-btn.active {
  color: white;
}

.slider-btn .icon {
  width: 1.1em;
  height: 1.1em;
}

/* Mobile: Horizontales Scrollen für Slider-Controls */
@media (max-width: 767px) {
  .events-quick-filters,
  .community-filters {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 12px 0 !important;
    margin-bottom: 0.5rem !important;
    gap: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .events-quick-filters::-webkit-scrollbar,
  .community-filters::-webkit-scrollbar {
    display: none;
  }
  
  .slider-control {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    width: auto !important;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 4px;
  }
  
  .slider-btn {
    padding: 0.6rem 1rem !important;
    font-size: 0.875rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}

/* Custom Dropdown mit Icons */
.custom-dropdown {
  position: relative;
  min-width: 160px;
}

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-bg, #fff);
  color: var(--color-text, #333);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s;
  text-align: left;
  height: 36px;
  box-sizing: border-box;
}

.custom-dropdown-trigger:hover {
  border-color: var(--color-secondary-text, #9ca3af);
}

.custom-dropdown-trigger::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--color-secondary-text, #9ca3af);
  transition: transform 0.2s;
}

.custom-dropdown.is-open .custom-dropdown-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown-trigger .category-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.custom-dropdown.is-open .custom-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  background: none;
  color: var(--color-text, #333);
  font-size: 0.875rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.custom-dropdown-option:hover {
  background: var(--color-lighter-gray, #f9fafb);
}

.custom-dropdown-option.is-selected {
  background: rgba(62, 176, 239, 0.1);
  font-weight: 500;
}

.custom-dropdown-option .category-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Kategorie-Icon Farben */
.category-icon--allgemein { color: var(--community-color-allgemein); }
.category-icon--frage { color: var(--community-color-frage); }
.category-icon--event { color: var(--community-color-event); }
.category-icon--fundstueck { color: var(--community-color-fundstueck); }
.category-icon--marktplatz { color: var(--community-color-marktplatz); }
.category-icon--empfehlung { color: var(--community-color-empfehlung); }
.category-icon--diskussion { color: var(--community-color-diskussion); }
.category-icon--kommentar { color: #10b981; }

.filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-bg, #fff);
  color: var(--color-text, #333);
  font-size: 0.875rem;
  cursor: pointer;
}

@media (max-width: 600px) {
  .community-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .filter-group--sort {
    justify-content: center;
  }
  
  .filter-group--selects {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .filter-search {
    flex: 1;
    max-width: none;
    min-width: 100%;
  }
  
  .custom-dropdown {
    min-width: 140px;
    flex: 1;
  }
}

/* ============================================================
   COMMUNITY FEED
   ============================================================ */

.community-feed {
  display: flex;
  flex-direction: column;
  gap: var(--community-spacing);
}

.community-loading,
.community-empty,
.community-error {
  text-align: center;
  padding: 3rem;
  color: var(--color-text, #666);
}

.community-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.community-error {
  color: #dc2626;
}

/* ============================================================
   POST CARD
   ============================================================ */

.community-card {
  position: relative;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-left: 4px solid var(--color-border, #e5e7eb);
  border-radius: var(--community-card-radius);
  overflow: hidden;
  transition: box-shadow var(--community-transition), transform var(--community-transition), border-left-color var(--community-transition);
}

.community-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* .card-category-bar wird nicht mehr verwendet - Farbe ist jetzt border-left auf .community-card */
.card-category-bar {
  display: none;
}

.card-content {
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
}

/* Card Header mit Avatar */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  width: 100%;
}

.card-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.card-author-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.card-author-details .card-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text, #333);
}

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-text, #666);
  opacity: 0.7;
}

.card-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text, #666);
  opacity: 0.7;
  flex: 1;
}

.card-author-actions {
  display: flex;
  gap: 0.5rem;
}

.card-author-actions .card-action {
  font-size: 0.75rem !important;
  padding: 0.125rem 0.375rem !important;
  opacity: 0.6;
}

.card-author-actions .card-action:hover {
  opacity: 1;
}

.card-action--edit {
  color: var(--ghost-accent-color, #3eb0ef) !important;
}

.card-action--delete {
  color: #ef4444 !important;
}

.card-category-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem 0.25rem 0.375rem;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
}

.card-category-badge svg,
.card-category-badge .icon {
  width: 18px !important;
  height: 18px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-text, #666);
  opacity: 0.7;
}

.card-separator {
  opacity: 0.5;
}

/* Card Body */
.card-body {
  cursor: pointer;
}

.card-text {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text, #333);
  white-space: pre-wrap;
  word-break: break-word;
}

.post-price {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--community-color-marktplatz);
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.post-price--free {
  background: #10b981;
}

.card-image {
  margin: 0.75rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.card-image img {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

/* Card Source Link (Kommentar zu...) */
.card-source-container {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.card-source-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
    letter-spacing: 0.025em;
}

.card-source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.card-source-link:hover {
    color: #10b981;
    text-decoration: underline;
}

.card-source-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.5;
}

/* Card Poll */
.card-poll {
  margin: 0.75rem 0;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
}

.poll-question {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--color-text, #333);
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.poll-option {
  position: relative;
  padding: 0.75rem 1rem;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--community-transition);
}

.poll-option:hover {
  border-color: var(--community-color-empfehlung);
}

.poll-option--voted {
  border-color: var(--community-color-empfehlung);
  background: rgba(139, 92, 246, 0.05);
}

.poll-option-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(139, 92, 246, 0.15);
  transition: width 0.3s ease;
}

.poll-option-text {
  position: relative;
  z-index: 1;
  font-size: 0.9375rem;
  color: var(--color-text, #333);
}

.poll-option-count {
  position: relative;
  z-index: 1;
  float: right;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--community-color-empfehlung);
}

.poll-total {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--color-text, #666);
  opacity: 0.7;
}

/* Poll Voting Animations */
.poll-option--voting {
  pointer-events: none;
  opacity: 0.7;
}

.poll-option--voting::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 16px;
  height: 16px;
  border: 2px solid var(--community-color-empfehlung);
  border-top-color: transparent;
  border-radius: 50%;
  animation: poll-spin 0.6s linear infinite;
  transform: translateY(-50%);
  z-index: 2;
}

@keyframes poll-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.poll-option--just-voted {
  animation: poll-pulse 0.6s ease;
}

@keyframes poll-pulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.02); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3); }
  100% { transform: scale(1); box-shadow: none; }
}

.poll--updated {
  animation: poll-glow 0.5s ease;
}

@keyframes poll-glow {
  0% { box-shadow: none; }
  50% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.2); }
  100% { box-shadow: none; }
}

.poll-option-bar {
  transition: width 0.5s ease-out !important;
}

.poll-option--voted .poll-option-bar {
  background: rgba(139, 92, 246, 0.25);
}

.poll-option--voted .poll-option-text {
  font-weight: 500;
}

/* Checkmark für voted option */
.poll-option--voted::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b5cf6' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5'/%3E%3C/svg%3E");
  background-size: contain;
  z-index: 2;
  animation: checkmark-appear 0.3s ease;
}

@keyframes checkmark-appear {
  from { transform: translateY(-50%) scale(0); opacity: 0; }
  to { transform: translateY(-50%) scale(1); opacity: 1; }
}

.poll-option--voted .poll-option-text {
  padding-left: 1.5rem;
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border, #e5e7eb);
}

/* Vote-Gruppen: pillenförmig wie in Kommentaren */
.card-votes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-group {
  display: flex;
  align-items: center;
  background: var(--color-bg-alt, #f8fafc);
  border-radius: 20px;
  padding: 2px 8px;
}

.vote-btn {
  background: none;
  border: none;
  color: var(--color-text-mute, #64748b);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--community-transition);
}

.vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vote-btn--up:hover:not(:disabled) {
  color: #10b981;
}

.vote-btn--down:hover:not(:disabled) {
  color: #ef4444;
}

.vote-btn--up.vote-btn--active {
  color: #10b981;
}

.vote-btn--down.vote-btn--active {
  color: #ef4444;
}

.vote-btn--heart:hover:not(:disabled) {
  color: var(--color-text, #1e293b);
}

.vote-btn--heart.vote-btn--active,
.vote-btn--heart.vote-btn--active:hover:not(:disabled) {
  color: #ef4444;
}

.vote-btn--heart svg {
  fill: none;
}

.vote-btn--heart svg path {
  fill: transparent;
}

.vote-btn--heart.vote-btn--active svg path {
  fill: currentColor;
}

.vote-btn--heart.is-heartbeat-in {
  animation: heartBeatIn 260ms ease-in-out;
}

.vote-btn--heart.is-heartbeat-out {
  animation: heartBeatOut 260ms ease-in-out;
}

@keyframes heartBeatIn {
  0% { transform: scale(1); }
  35% { transform: scale(1.40); }
  65% { transform: scale(0.86); }
  100% { transform: scale(1); }
}

@keyframes heartBeatOut {
  0% { transform: scale(1); }
  35% { transform: scale(0.70); }
  65% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* Like-Gruppe: pillenförmig */
.like-group {
  display: flex;
  align-items: center;
  background: var(--color-bg-alt, #f8fafc);
  border-radius: 20px;
  padding: 2px 10px;
  gap: 6px;
}

/* Icon-Größen in Vote-Buttons */
.vote-btn svg,
.vote-btn .icon {
  width: 18px;
  height: 18px;
}

.like-count {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 18px;
  text-align: center;
  color: var(--color-text, #333);
}

.vote-count {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
  color: var(--color-text, #333);
}

.vote-count--positive {
  color: #10b981;
}

.vote-count--negative {
  color: #ef4444;
}

.vote-btn--small {
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
}

.vote-count--small {
  min-width: 1.5rem;
  font-size: 0.8125rem;
}

.card-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  border-radius: 20px;
  background: var(--color-bg-alt, #f8fafc);
  color: var(--color-text-mute, #64748b);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--community-transition);
}

.card-action:hover {
  color: var(--color-text, #1e293b);
}

.card-action--report {
  margin-left: auto;
  opacity: 0.5;
  background: var(--color-bg-alt, #f8fafc);
  border-radius: 20px;
  padding: 6px 10px;
}

.card-action--report:hover {
  opacity: 1;
  color: #ef4444;
}

/* ============================================================
   LOAD MORE
   ============================================================ */

.community-load-more {
  text-align: center;
  margin-top: var(--community-spacing);
}

/* ============================================================
   POST MODAL
   ============================================================ */

.post-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.post-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.post-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--color-bg, #fff);
  border-radius: var(--community-card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--color-bg, #f3f4f6);
  color: var(--color-text, #333);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--community-transition);
}

.post-modal-close:hover {
  background: var(--color-border, #e5e7eb);
}

.post-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Post Detail */
.post-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.post-detail-body {
  margin-bottom: 1.5rem;
}

.post-detail-text {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-text, #333);
  white-space: pre-wrap;
}

.post-detail-image {
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.post-detail-image img {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #f3f4f6;
}

.post-detail-actions {
  padding: 1rem 0;
  border-top: 1px solid var(--color-border, #e5e7eb);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

/* Replies */
.post-replies {
  margin-top: 1.5rem;
}

.replies-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text, #333);
}

.reply-compose {
  margin-bottom: 1.5rem;
}

.reply-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-bg, #fff);
  color: var(--color-text, #333);
  resize: vertical;
  font-family: inherit;
}

.reply-compose-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.reply-compose-footer .compose-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--color-text, #333);
  margin: 0;
}

.reply-compose-footer .compose-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--ghost-accent-color, #3eb0ef);
  cursor: pointer;
}

.reply-login-prompt {
  text-align: center;
  padding: 1rem;
  color: var(--color-text, #666);
}

.reply-login-prompt a {
  color: var(--ghost-accent-color, #3eb0ef);
  text-decoration: none;
  font-weight: 500;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.no-replies {
  text-align: center;
  padding: 2rem;
  color: var(--color-text, #666);
  opacity: 0.7;
}

.reply-item {
  padding: 1rem;
  background: var(--color-bg, #f9fafb);
  border-radius: 8px;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.reply-author-info {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Post Detail Author Row */
.post-detail-author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.post-detail-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.post-detail-author-info .card-author {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text, #333);
}

.post-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reply-author {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text, #333);
}

.reply-oj {
  padding: 0.125rem 0.375rem;
  background: var(--ghost-accent-color, #3eb0ef);
  color: white;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.reply-time {
  font-size: 0.75rem;
  color: var(--color-text, #666);
  opacity: 0.7;
}

.reply-content {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text, #333);
}

.reply-footer {
  margin-top: 0.5rem;
}

.reply-votes {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================================
   REPORT MODAL
   ============================================================ */

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 1100; /* Höher als post-modal (1000) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

.report-modal-content {
  position: relative;
  z-index: 2; /* Über dem Backdrop */
  width: 100%;
  max-width: 900px;
  padding: 1.5rem;
  background: var(--color-bg, #fff);
  border-radius: var(--community-card-radius);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.report-modal-content h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text, #333);
}

.report-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.report-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: background 0.2s ease;
  border: 1px solid transparent;
}

.report-option:hover {
  background: var(--color-bg-acc, #f3f4f6);
  border-color: var(--color-border, #e5e7eb);
}

.report-option input[type="radio"] {
  appearance: auto !important;
  -webkit-appearance: radio !important;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--ghost-accent-color, #3eb0ef);
  cursor: pointer;
}

.report-details {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-bg, #fff);
  color: var(--color-text, #333);
  resize: vertical;
  font-family: inherit;
  margin-bottom: 1rem;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ============================================================
   SPINNER
   ============================================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border, #e5e7eb);
  border-top-color: var(--ghost-accent-color, #3eb0ef);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner--small {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
  margin-right: 0.5em;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   BUTTONS (Unified with Ghost Theme)
   ============================================================ */

/* 
   Wir entfernen hier alle spezifischen Button-Overrides (Radius, Padding, etc.),
   damit die globalen Ghost-Klassen (.btn, .btn--bordered) exakt wie im 
   restlichen Theme greifen.
*/

.community-page .btn,
.post-modal .btn {
  /* Nur minimale Korrekturen für das Flex-Layout innerhalb der Community-Cards */
  align-self: center;
}

/* Erzwinger der Akzentfarbe für Bordered-Buttons im Community-Modul */
.community-page .btn--bordered,
.post-modal .btn--bordered {
  --bg-accent: var(--ghost-accent-color, #3eb0ef);
}

.community-page .btn--bordered:hover,
.post-modal .btn--bordered:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 
   Falls spezifische Community-Buttons doch die Akzentfarbe nutzen sollen,
   können wir das hier gezielt steuern, aber wir halten uns an die Theme-Vorgaben.
*/

/* ============================================================
   DARK MODE
   ============================================================ */

[data-color-scheme="dark"] {
  --community-color-allgemein: #9ca3af;
  --community-color-frage: #60a5fa;
  --community-color-event: #34d399;
  --community-color-fundstueck: #fbbf24;
  --community-color-marktplatz: #22d3ee;
  --community-color-empfehlung: #a78bfa;
}

[data-color-scheme="dark"] .hero-banner--community {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d1b4e 100%);
}

[data-color-scheme="dark"] .community-card {
  background: var(--color-bg, #1f2937);
  border-color: var(--color-border, #374151);
}

[data-color-scheme="dark"] .community-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-color-scheme="dark"] .compose-marketplace-fields {
  background: rgba(6, 182, 212, 0.1);
}

[data-color-scheme="dark"] .compose-poll-container {
  background: rgba(139, 92, 246, 0.1);
}

[data-color-scheme="dark"] .card-poll {
  background: rgba(139, 92, 246, 0.1);
}

[data-color-scheme="dark"] .poll-option {
  background: var(--color-bg, #1f2937);
  border-color: var(--color-border, #374151);
}

[data-color-scheme="dark"] .reply-item {
  background: var(--color-bg, #111827);
}

[data-color-scheme="dark"] .post-detail-image img {
  background: #111827;
}


/* Reply Edit/Delete */
.reply-author-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.reply-action-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: var(--ghost-accent-color, #3eb0ef);
  cursor: pointer;
  opacity: 0.6;
}

.reply-action-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

.reply-action-btn--delete {
  color: #ef4444;
}

.reply-edit-form {
  margin-top: 0.5rem;
}

.reply-edit-textarea {
  width: 100%;
  border: 1.2px solid #b1b5be;
  border-radius: 8px;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  resize: vertical;
}

.reply-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ============================================================
   SHARE FUNKTIONALITÄT
   ============================================================ */

/* Share Wrapper für Card Footer */
.share-wrapper {
  position: relative;
  display: inline-flex;
  z-index: 10;
}

/* Card Footer muss overflow:visible haben für Dropdown */
.card-footer {
  overflow: visible !important;
}

.community-card {
  overflow: visible !important;
}

.card-action--share {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Share Dropdown */
.share-dropdown {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  min-width: 200px;
  margin-bottom: 8px;
}

/* Pfeil entfernt wegen position: fixed */

.share-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  background: none;
  font-size: 0.875rem;
  color: var(--color-text, #374151);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
  text-align: left;
}

.share-dropdown__item:hover {
  background: var(--color-hover, #f3f4f6);
}

.share-dropdown__item .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Share-Icons: feste Farben für gefüllte SVGs */
.share-dropdown__item[onclick*="whatsapp"] .icon,
.share-btn--whatsapp .icon {
  fill: #25d366 !important;
}

.share-dropdown__item[onclick*="facebook"] .icon,
.share-btn--facebook .icon {
  fill: #1877f2 !important;
}

.share-dropdown__item[onclick*="twitter"] .icon,
.share-btn--twitter .icon {
  fill: #000000 !important;
}

.share-dropdown__item[onclick*="linkedin"] .icon,
.share-btn--linkedin .icon {
  fill: #0077b5 !important;
}

/* Plattform-spezifische Farben - Icons immer farbig */
.share-dropdown__item[onclick*="whatsapp"] .icon {
  color: #25d366;
}
.share-dropdown__item[onclick*="whatsapp"]:hover {
  background: rgba(37, 211, 102, 0.1);
}

.share-dropdown__item[onclick*="facebook"] .icon {
  color: #1877f2;
}
.share-dropdown__item[onclick*="facebook"]:hover {
  background: rgba(24, 119, 242, 0.1);
}

.share-dropdown__item[onclick*="twitter"] .icon {
  color: #000;
}
.share-dropdown__item[onclick*="twitter"]:hover {
  background: rgba(0, 0, 0, 0.05);
}

.share-dropdown__item[onclick*="linkedin"] .icon {
  color: #0077b5;
}
.share-dropdown__item[onclick*="linkedin"]:hover {
  background: rgba(0, 119, 181, 0.1);
}

.share-dropdown__item[onclick*="email"] .icon {
  color: #ea4335;
}
.share-dropdown__item[onclick*="email"]:hover {
  background: rgba(234, 67, 53, 0.1);
}

.share-dropdown__item[onclick*="CopyLink"] .icon {
  color: var(--ghost-accent-color, #3eb0ef);
}
.share-dropdown__item[onclick*="CopyLink"]:hover {
  background: rgba(var(--ghost-accent-color-rgb, 62, 176, 239), 0.1);
  color: var(--ghost-accent-color, #3eb0ef);
}

/* Share Bereich in der Detail-Ansicht */
.post-detail-share {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--color-hover, #f9fafb);
  border-radius: 12px;
  border: 1px solid var(--color-border, #e5e7eb);
}

.share-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text, #374151);
}

.share-title .icon {
  width: 18px;
  height: 18px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-bg, #fff);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text, #374151);
  cursor: pointer;
  transition: all 0.15s ease;
}

.share-btn:hover {
  border-color: var(--ghost-accent-color, #3eb0ef);
  color: var(--ghost-accent-color, #3eb0ef);
}

.share-btn .icon {
  width: 16px;
  height: 16px;
}

/* Native Share Button - nur auf unterstützten Geräten sichtbar */
.share-btn--native {
  display: none;
}

@supports (display: none) {
  .share-btn--native {
    display: flex;
  }
}

/* Plattform-spezifische Farben - Icons immer farbig */
.share-btn--whatsapp .icon {
  color: #25d366;
}
.share-btn--whatsapp:hover {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.1);
}

.share-btn--facebook .icon {
  color: #1877f2;
}
.share-btn--facebook:hover {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.1);
}

.share-btn--twitter .icon {
  color: #000;
}
.share-btn--twitter:hover {
  border-color: #000;
  background: rgba(0, 0, 0, 0.05);
}

.share-btn--linkedin .icon {
  color: #0077b5;
}
.share-btn--linkedin:hover {
  border-color: #0077b5;
  background: rgba(0, 119, 181, 0.1);
}

.share-btn--email .icon {
  color: #ea4335;
}
.share-btn--email:hover {
  border-color: #ea4335;
  background: rgba(234, 67, 53, 0.1);
}

.share-btn--copy .icon {
  color: var(--ghost-accent-color, #3eb0ef);
}
.share-btn--copy:hover {
  border-color: var(--ghost-accent-color, #3eb0ef);
  background: rgba(var(--ghost-accent-color-rgb, 62, 176, 239), 0.1);
}

.share-btn--copied {
  border-color: #10b981 !important;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1);
}

/* Mobile: Share Buttons als Grid */
@media (max-width: 640px) {
  .share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .share-btn {
    justify-content: center;
    padding: 0.625rem;
  }
  
  .share-btn span {
    display: none;
  }
}

/* Dark Mode */
[data-color-scheme="dark"] .share-dropdown {
  background: var(--color-bg, #1f2937);
  border-color: var(--color-border, #374151);
}

[data-color-scheme="dark"] .share-dropdown::after {
  background: var(--color-bg, #1f2937);
  border-color: var(--color-border, #374151);
}

[data-color-scheme="dark"] .share-dropdown__item {
  color: var(--color-text, #e5e7eb);
}

[data-color-scheme="dark"] .share-dropdown__item:hover {
  background: var(--color-hover, #374151);
}

[data-color-scheme="dark"] .post-detail-share {
  background: var(--color-hover, #111827);
  border-color: var(--color-border, #374151);
}

[data-color-scheme="dark"] .share-btn {
  background: var(--color-bg, #1f2937);
  border-color: var(--color-border, #374151);
  color: var(--color-text, #e5e7eb);
}
