/**
 * Queerverweis Frontend Styles
 * Alle Styles für die Frontend-Anzeige des Plugins
 */

/* ========================================
   Container und Layout
   ======================================== */

.queerverweis-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* ========================================
   Such-Info-Box
   ======================================== */

.search-info-box {
  background: #f2e5ec;
  border: 2px solid #e3c6d6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(107, 30, 70, 0.1);
}

.search-info-title {
  color: #6b1e46;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.search-instructions {
  color: #6b1e46;
}

.search-instructions p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.search-instructions p:last-child {
  margin-bottom: 0;
}

.key-combo {
  background: #e3c6d6;
  color: #4a1430;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 500;
  border: 1px solid #d3acc3;
  font-size: 0.9rem;
}

/* ========================================
   Controls (Suche & Filter)
   ======================================== */

.queerverweis-controls {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.queerverweis-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 2px solid #e3c6d6;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  color: #333;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #6b1e46;
  box-shadow: 0 0 0 3px rgba(107, 30, 70, 0.1);
}

.search-button {
  padding: 0.75rem 1.5rem;
  background: #6b1e46;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-button:hover {
  background: #4a1430;
}

.search-icon {
  font-size: 1.1rem;
}

/* ========================================
   Filter Toggle
   ======================================== */

.filter-toggle-container {
  margin-top: 1rem;
  text-align: center;
}

.filter-toggle-btn {
  background: #f8f9fa;
  border: 2px solid #e8e8e8;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #666;
}

.filter-toggle-btn:hover {
  background: #e9ecef;
  border-color: #d3acc3;
  color: #6b1e46;
  transform: translateY(-1px);
}

.filter-toggle-btn.active {
  background: #6b1e46;
  border-color: #6b1e46;
  color: white;
}

.filter-toggle-icon {
  font-size: 1.1em;
}

.filter-toggle-arrow {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.filter-toggle-btn.active .filter-toggle-arrow {
  transform: rotate(180deg);
}

/* ========================================
   Filter
   ======================================== */

.queerverweis-filters {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeInDown 0.3s ease;
}

.filter-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #6b1e46;
  margin-bottom: 0.5rem;
  display: block;
}

/* === CATEGORY FILTER BUTTONS === */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background: white;
  border: 2px solid #d3acc3;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  color: #333;
  font-weight: 500;
}

.filter-btn:hover {
  border-color: #6b1e46;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(107, 30, 70, 0.15);
  background: #6b1e46;
  color: white;
}

.filter-btn.active {
  background: #6b1e46;
  color: white;
  border-color: #6b1e46;
  font-weight: 600;
}

.filter-icon {
  font-size: 1.1em;
}

/* === FILTER ROW FOR TWO COLUMNS === */
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.half-width {
  min-width: 0;
}

/* === CUSTOM SELECT DROPDOWNS === */
.custom-select {
  position: relative;
  width: 100%;
}

.select-trigger {
  background: white;
  border: 2px solid #d3acc3;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.select-trigger:hover {
  border-color: #6b1e46;
}

.select-trigger.active {
  border-color: #6b1e46;
  box-shadow: 0 0 0 2px rgba(107, 30, 70, 0.1);
}

.select-arrow {
  transition: transform 0.2s;
  color: #888;
}

.select-trigger.active .select-arrow {
  transform: rotate(180deg);
}

.select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #6b1e46;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.select-options.show {
  display: block;
}

.select-option {
  padding: 0.625rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

.select-option:hover {
  background: #f5f5f5;
}

.select-option.active {
  background: #6b1e46;
  color: white;
}

.option-icon {
  font-size: 1em;
}

.difficulty-indicator {
  font-size: 1.2em;
}

.difficulty-indicator.difficulty-beginner {
  color: #4ade80;
}

.difficulty-indicator.difficulty-intermediate {
  color: #fbbf24;
}

.difficulty-indicator.difficulty-advanced {
  color: #ef4444;
}

/* === TAGS FILTER === */
.tags-filter {
  width: 100%;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-btn {
  background: white;
  border: 2px solid var(--tag-color, #d3acc3);
  border-radius: 16px;
  padding: 0.375rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  position: relative;
  color: #333;
  font-weight: 500;
}

.tag-btn:hover {
  background: var(--tag-color, #6b1e46);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tag-btn.selected {
  background: var(--tag-color, #6b1e46);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tag-count {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1px 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-btn.selected .tag-count {
  background: rgba(255, 255, 255, 0.3);
}

.show-more-tags {
  background: #f5f5f5 !important;
  border-color: #d3acc3 !important;
  color: #888 !important;
}

.show-more-tags:hover {
  background: #6b1e46 !important;
  color: white !important;
}

.more-tags {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e8e8e8;
}

/* === FILTER ACTIONS === */
.filter-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
  border-top: 1px solid #e8e8e8;
}

.reset-filters {
  background: #ff7b54;
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
}

.reset-filters:hover {
  background: #e85a2b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.reset-icon {
  font-size: 1em;
}

/* === HIDDEN INPUTS === */
.filter-select {
  display: none;
}

/* ========================================
   Loading Indikator
   ======================================== */

.queerverweis-loading {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e3c6d6;
  border-top: 4px solid #6b1e46;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========================================
   Keine Ergebnisse
   ======================================== */

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.no-results h3 {
  color: #6b1e46;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.no-results p {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.reset-filters-standalone {
  background: #ff7b54;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-top: 1rem;
}

.reset-filters-standalone:hover {
  background: #e85a2b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Links-Display (Pride Empfehlungen)
   ======================================== */

.pride-empfehlungen {
  /* Haupt-Container für die Links */
}

/* Kategorie-Styles */
.pride-category {
  margin-bottom: 3rem;
  background: #fafafa;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e8e8e8;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: #6b1e46;
  font-size: 1.5rem;
  font-weight: 600;
}

.category-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.category-intro {
  margin-bottom: 1.5rem;
  color: #666;
  font-style: italic;
  font-size: 0.95rem;
}

/* Individual pride entries */
.pride-entry {
  background: white;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid #e8e8e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.pride-entry:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pride-entry:last-child {
  margin-bottom: 0;
}

/* Entry Header mit Tags */
.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.entry-header h3 {
  margin: 0;
  flex: 1;
  min-width: 200px;
  color: #6b1e46;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.entry-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ========================================
   Tags
   ======================================== */

/* Difficulty Tags */
.difficulty-tag {
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.difficulty-tag.beginner {
  background-color: #d4f1d4;
  color: #2d5a2d;
  border: 1px solid #a8d8a8;
}

.difficulty-tag.intermediate {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.difficulty-tag.advanced {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f1aeb5;
}

/* Content Tags (dynamische Farben) */
.content-tag {
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #e3c6d6; /* Fallback */
}

/* ========================================
   Button-Links
   ======================================== */

.pride-empfehlungen .button-link {
  display: inline-block;
  padding: 0.4em 1em;
  background-color: #f2e5ec;
  color: #6b1e46;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 1px solid #e3c6d6;
}

.pride-empfehlungen .button-link:hover {
  background-color: #e3c6d6;
  color: #4a1430;
  border-color: #d3acc3;
}

/* ========================================
   Source Info
   ======================================== */

.pride-empfehlungen .source-info {
  display: block;
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
  padding-top: 1rem;
  line-height: 1.2;
}

.pride-empfehlungen .source-info::before {
  content: '📍 ';
  opacity: 0.7;
}

/* Entfernt den Standard-Margin von Paragraphen mit source-info */
.pride-empfehlungen p:has(.source-info) {
  margin-bottom: 0;
}

/* Fallback für Browser ohne :has() Support */
.pride-empfehlungen p .source-info {
  margin-bottom: 0;
}

.pride-empfehlungen p .source-info:last-child {
  margin-bottom: 0;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
  .queerverweis-container {
    padding: 0.5rem;
  }

  .search-info-box {
    padding: 1rem;
    text-align: left;
  }

  .search-info-title {
    font-size: 1.1rem;
  }

  .search-instructions p {
    font-size: 0.9rem;
  }

  .queerverweis-controls {
    padding: 1rem;
  }

  .queerverweis-search {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    min-width: auto;
  }

  .search-button {
    justify-content: center;
  }

  .queerverweis-filters {
    grid-template-columns: 1fr;
  }

  .entry-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-title {
    font-size: 1.25rem;
  }

  .pride-category {
    padding: 1rem;
  }

  .pride-entry {
    padding: 1rem;
  }

  .entry-tags {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .queerverweis-container {
    padding: 0.25rem;
  }

  .pride-category {
    padding: 0.75rem;
  }

  .pride-entry {
    padding: 0.75rem;
  }

  .entry-header h3 {
    font-size: 1rem;
  }

  .difficulty-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  .content-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }
}

/* ========================================
   Fade-In Animation für AJAX-Updates
   ======================================== */

.queerverweis-results {
  animation: fadeIn 0.3s ease-in;
}

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

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

/* ========================================
   Accessibility Verbesserungen
   ======================================== */

.queerverweis-container *:focus {
  outline: 2px solid #6b1e46;
  outline-offset: 2px;
}

.queerverweis-container button:focus,
.queerverweis-container input:focus,
.queerverweis-container select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 30, 70, 0.3);
}

/* Screen Reader Text */
.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;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .queerverweis-controls,
  .search-info-box {
    display: none;
  }

  .pride-entry {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .button-link {
    color: #000 !important;
    text-decoration: underline !important;
  }

  .button-link::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }
}
