/**
 * ===================================================
 * Potential-Matcher - Kompakte Ansicht CSS
 * ===================================================
 * 
 * CSS-Styles für die kompakte iframe-optimierte Ansicht
 * Kombiniert Filter-Styles aus styles.css mit Tabellen-Styles aus mobile.css
 * 
 * @copyright (c) 2025 Leif Stuhrmann
 * @license   Proprietär - Alle Rechte vorbehalten
 * ===================================================
 */

/* ==============================================
   FILTER STYLES - AUS STYLES.CSS
   ============================================== */

/* Container-Anpassungen für Filter */
.container-fluid {
    max-width: 100%;
}

/* Filter-Dropdowns - KOMPAKT OPTIMIERT */
select.form-select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.25rem 2rem 0.25rem 0.5rem; /* Kompakterer Padding */
    font-size: 0.9rem; /* Größere Schrift wegen fehlendem Logo */
    line-height: 1.4;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 14px 10px;
    min-width: 120px; /* Mindestbreite für Dropdowns */
    max-width: 180px; /* Maximale Breite */
}

/* Dropdown-Buttons kompakter */
.btn.dropdown-toggle {
    padding: 0.25rem 0.5rem; /* Kompakterer Padding */
    font-size: 0.9rem; /* Größere Schrift wegen fehlendem Logo */
    border-radius: 0.375rem;
    min-width: 120px;
    max-width: 180px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown-Menüs kompakter */
.dropdown-menu {
    font-size: 0.9rem; /* Größere Schrift wegen fehlendem Logo */
    min-width: 120px;
}

.dropdown-item {
    padding: 0.25rem 0.5rem; /* Kompakterer Padding */
    font-size: 0.9rem; /* Größere Schrift wegen fehlendem Logo */
    line-height: 1.4;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa;
}

.dropdown-item.active {
    background-color: #0d6efd;
    color: #fff;
}

/* Form Labels kompakter */
.form-label {
    font-size: 0.75rem; /* Kleinere Schrift */
    font-weight: 500;
    margin-bottom: 0.25rem; /* Weniger Abstand */
    color: #495057;
}

.form-label i {
    font-size: 0.8rem;
}

select.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Filter-Buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* Checkbox-Filter - KOMPAKT */
.form-check {
    margin-bottom: 0.25rem; /* Weniger Abstand */
    margin-right: 0.75rem; /* Weniger Abstand */
}

.form-check-input {
    margin-top: 0.2rem;
}

.form-check-label {
    font-size: 0.8rem; /* Kleinere Schrift */
    margin-left: 0.2rem;
}

.form-check-label i {
    font-size: 0.8rem; /* Kleinere Icons */
}

/* Checkbox-Filter in zwei Zeilen - KOMPAKT */
.checkbox-filters-compact {
  margin-top: 0.5rem;
}

.checkbox-filters-compact .form-check {
  margin-bottom: 0.25rem; /* Weniger Abstand */
  margin-right: 0.75rem; /* Weniger Abstand */
}

.checkbox-filters-compact .form-check-input {
  margin-top: 0.2rem;
}

.checkbox-filters-compact .form-check-label {
  font-size: 0.9rem; /* Größere Schrift wegen fehlendem Logo */
  margin-left: 0.2rem;
}

.checkbox-filters-compact .form-check-label i {
  font-size: 0.9rem; /* Größere Icons wegen fehlendem Logo */
}

/* Spezifische Anpassungen für Checkbox-Filter Hinweistexte */
.checkbox-filters-compact .form-text {
  font-size: 0.8rem !important; /* Größere Schrift für Hinweistexte wegen fehlendem Logo */
  line-height: 1.2 !important;
  margin-top: 0.2rem !important;
  margin-bottom: -0.3rem !important; /* Negativer Abstand nach unten für Checkboxen darunter */
}

.checkbox-filters-compact .form-text.small {
  font-size: 0.8rem !important; /* Explizit für .small Klasse */
}

.checkbox-filters-compact .form-text i {
  font-size: 0.8rem !important; /* Auch Icons größer */
}

/* Responsive Anpassungen für Checkboxen */
@media (max-width: 992px) {
  .checkbox-filters-compact .form-check-label {
    font-size: 0.85rem; /* Weniger starke Verkleinerung */
  }
  
  .checkbox-filters-compact .form-check-label i {
    font-size: 0.85rem; /* Weniger starke Verkleinerung */
  }
}

@media (max-width: 768px) {
  .checkbox-filters-compact .form-check-label {
    font-size: 0.8rem; /* Weniger starke Verkleinerung */
  }
  
  .checkbox-filters-compact .form-check-label i {
    font-size: 0.8rem; /* Weniger starke Verkleinerung */
  }
}

/* Responsive Anpassungen für sehr kompakte Darstellung */
@media (max-width: 992px) {
    .btn.dropdown-toggle {
        min-width: 100px;
        max-width: 150px;
        font-size: 0.85rem; /* Weniger starke Verkleinerung */
    }
    
    .dropdown-menu {
        font-size: 0.85rem; /* Weniger starke Verkleinerung */
        min-width: 100px;
    }
    
    .dropdown-item {
        font-size: 0.85rem; /* Weniger starke Verkleinerung */
    }
    
    .form-check-label {
        font-size: 0.85rem; /* Weniger starke Verkleinerung */
    }
      /* Reset-Filter Button anpassen */
    #resetFilters.btn {
        font-size: 0.85rem !important; /* !important um Bootstrap zu überschreiben */
    }
      #logo {
        max-height: 100px !important; /* Etwas kleineres Logo auf kleinen Screens */
    }
}

@media (max-width: 768px) {
    .btn.dropdown-toggle {
        min-width: 90px;
        max-width: 120px;
        font-size: 0.8rem; /* Weniger starke Verkleinerung */
    }
    
    .dropdown-menu {
        font-size: 0.8rem; /* Weniger starke Verkleinerung */
        min-width: 90px;
    }
    
    .dropdown-item {
        font-size: 0.8rem; /* Weniger starke Verkleinerung */
        padding: 0.2rem 0.4rem; /* Noch kompakterer Padding auf kleinen Screens */
    }
    
    .form-label {
        font-size: 0.8rem; /* Weniger starke Verkleinerung */
    }
      /* Reset-Filter Button anpassen */
    #resetFilters.btn {
        font-size: 0.8rem !important; /* !important um Bootstrap zu überschreiben */
    }
      #logo {
        max-height: 80px !important; /* Kleineres Logo auf mobilen Geräten */
    }
}

/* Reset-Filter Button - passt sich wie Dropdowns an */
#resetFilters.btn {
    font-size: 0.9rem !important; /* !important um Bootstrap zu überschreiben */
}

/* ==============================================
   TABELLEN STYLES - AUS MOBILE.CSS
   ============================================== */

/* Mobile Interface Container */
.mobile-interface {
  padding: 0;
}

/* Mobile Filter-Bereiche */
.mobile-filters {
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.mobile-filters .accordion-item {
  border: none;
}

.mobile-filters .accordion-item:first-of-type .accordion-button {
  border-radius: 0.5rem 0.5rem 0 0;
}

.mobile-filters .accordion-button {
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 500;
  padding: 1rem 1.25rem;
  border: none;
  box-shadow: none;
}

.mobile-filters .accordion-button:not(.collapsed) {
  background-color: #e7f1ff;
  color: #0c63e4;
  box-shadow: none;
}

.mobile-filters .accordion-body {
  padding: 1.25rem;
  background-color: #ffffff;
}

/* Mobile Card Layout - KOMPAKT OPTIMIERT */
.mobile-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Weniger Abstand zwischen Cards */
  max-width: 100%;
}

.activity-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0; /* Kein zusätzlicher Margin */
}

.activity-card .card {
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.375rem; /* Kleinere Rundung */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); /* Subtilerer Schatten */
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.activity-card .card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.activity-card .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  padding: 0.4rem 0.6rem; /* Noch kompakter Padding */
}

.activity-card .card-title {
  font-size: 0.85rem; /* Etwas kleinere Schrift */
  font-weight: 600;
  color: #212529;
  margin-bottom: 0;
  line-height: 1.2; /* Kompaktere Zeilenhöhe */
}

.activity-card .card-body {
  padding: 0.5rem 0.6rem; /* Noch kompakter Padding */
  font-size: 0.85rem; /* Etwas größere Grundschrift wieder */
}

/* Activity Type Icons - KOMPAKT */
.activity-type-mobile {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.activity-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; /* Kleinere Icons */
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem; /* Kleinere Schrift */
  color: #ffffff;
  font-weight: 500;
}

.activity-type-mobile .badge {
  font-size: 0.75rem; /* Etwas größere Badges */
  padding: 0.2rem 0.4rem;
}

/* Potentials Display - KOMPAKT für echte Klassen */
.potentials-mobile {
  margin-bottom: 0.5rem !important; /* Überschreibt mb-3 */
}

.potentials-mobile .field-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.2rem;
  display: block;
}

.potentials-mobile .field-label i {
  font-size: 0.7rem;
}

.potentials-flex {
  gap: 0.2rem !important; /* Überschreibt gap-1 */
  margin-top: 0.2rem !important; /* Überschreibt mt-1 */
}

.potential-badge {
  padding: 0.1rem 0.3rem !important; /* Kleinerer Padding */
  font-size: 0.65rem !important; /* Kleinere Schrift */
  border-radius: 0.2rem;
  color: white !important;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  display: inline-block;
}

/* Activity Details - KOMPAKT für die echten Klassen */
.activity-details {
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem; /* Vertical gap kleiner, horizontal gap größer */
}

.detail-row {
  margin-bottom: 0 !important; /* Überschreibt mb-2 */
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.detail-row .d-flex {
  align-items: center !important; /* Überschreibt align-items-start */
  gap: 0.3rem;
}

.detail-label {
  min-width: auto !important; /* Überschreibt min-width: 30px */
  margin-right: 0.2rem !important; /* Überschreibt me-2 */
  flex-shrink: 0;
}

.detail-label i {
  font-size: 0.7rem; /* Kleinere Icons */
  width: 12px;
}

.detail-row .fw-bold {
  font-size: 0.7rem !important; /* Kleinere Label-Schrift */
  font-weight: 500 !important; /* Weniger fett */
  margin-bottom: 0;
  margin-right: 0.2rem;
}

.detail-value {
  font-size: 0.7rem; /* Kleinere Wert-Schrift */
  color: #212529;
}

.flex-grow-1 {
  flex-grow: 0 !important; /* Verhindert Wachstum */
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.2rem;
}

/* Activity Flags - KOMPAKT für echte Klassen */
.activity-flags {
  margin-top: 0.5rem !important; /* Überschreibt mt-3 */
  margin-bottom: 0.3rem;
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center !important;
}

.activity-flags .flags-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center !important;
}

.activity-flags .badge {
  font-size: 0.65rem !important; /* Kleinere Schrift */
  padding: 0.15rem 0.3rem !important; /* Kleinerer Padding */
  margin: 0 !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.activity-flags .badge i {
  font-size: 0.7rem;
}

/* Relations - KOMPAKT */
.relations-mobile {
  margin-bottom: 0.5rem; /* Weniger Abstand */
  padding-top: 0.5rem;
  border-top: 1px solid #e9ecef;
}

.relations-mobile .relations-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.relation-badge {
  display: inline-block;
  padding: 0.2rem 0.3rem; /* Kleinere Padding */
  margin-right: 0.3rem;
  margin-bottom: 0.2rem;
  font-size: 0.7rem; /* Kleinere Schrift */
  background-color: #f8f9fa;
  color: #495057;
  border-radius: 0.25rem;
  text-decoration: none;
  border-left: 3px solid #007bff;
}

/* Activity Actions */
.activity-actions {
  padding-top: 0.75rem;
  border-top: 1px solid #dee2e6;
}

.activity-actions .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Mobile Pagination - KOMPAKT */
.mobile-pagination {
  margin-top: 1rem; /* Weniger Abstand */
}

.mobile-pagination .pagination {
  justify-content: center;
  margin-bottom: 0;
}

.mobile-pagination .page-link {
  padding: 0.3rem 0.5rem; /* Kompakter Padding */
  font-size: 0.8rem; /* Kleinere Schrift passend zu anderen Elementen */
  border-radius: 0.25rem;
}

/* Results Info - OPTIMIERT KOMPAKT - OHNE HINTERGRUND */
.results-info-mobile,
.results-info {
  background-color: transparent !important; /* Kein Hintergrund */
  padding: 0.3rem 0 !important; /* Nur oben/unten Padding */
  border: none !important; /* Kein Rahmen */
  border-radius: 0 !important; /* Keine Rundung */
  margin-bottom: 0.5rem !important; /* Normaler Abstand */
  font-size: 0.75rem !important; /* Größere, besser lesbare Schrift */
  line-height: 1.3 !important;
}

.results-info-mobile .text-muted,
.results-info .text-muted,
.results-info small,
.results-info-mobile small {
  font-size: 0.75rem !important; /* Größere Schrift */
  margin-bottom: 0 !important;
  line-height: 1.3 !important;
  color: #6c757d !important; /* Standard Bootstrap muted color */
}

.results-info-mobile .fw-bold,
.results-info .fw-bold {
  font-size: 0.75rem !important; /* Größere Schrift */
  font-weight: 500 !important; /* Weniger fett */
  line-height: 1.3 !important;
}

/* Auch für die Paginierung Text - OPTIMIERT */
.results-info-mobile *,
.results-info-mobile span,
.results-info-mobile div,
.results-info-mobile small,
.results-info-mobile .small,
.results-info *,
.results-info span,
.results-info div,
.results-info small,
.results-info .small {
  font-size: 0.75rem !important;
  line-height: 1.3 !important;
}

/* Pagination auch optimiert kompakt */
.mobile-pagination .page-link {
  padding: 0.3rem 0.5rem !important; /* Normales Padding */
  font-size: 0.75rem !important; /* Größere Schrift */
  border-radius: 0.25rem !important;
  line-height: 1.3 !important;
}

/* No Results */
.no-results-mobile {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.no-results-mobile i {
  font-size: 3rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.no-results-mobile h5 {
  color: #495057;
  margin-bottom: 0.5rem;
}

.no-results-mobile p {
  color: #6c757d;
  margin-bottom: 0;
}

/* Potential Legend - KOMPAKT (identisch mit Desktop-Design) */
.potential-legend-compact {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.potential-legend-compact .legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-bottom: 1px solid #d1d5db;
    cursor: pointer;
    user-select: none;
}

.potential-legend-compact .legend-header:hover {
    background: linear-gradient(135deg, #cbd5e1 0%, #b4b9c7 100%);
}

.potential-legend-compact .legend-header-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.potential-legend-compact .legend-toggle-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.9rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.potential-legend-compact .legend-toggle-btn:hover {
    background-color: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.potential-legend-compact .legend-content {
    padding: 12px 16px;
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
}

.potential-legend-compact .legend-content.collapsed {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}

.potential-legend-compact .legend-container {
    display: block; /* Einspaltig für kompakte Version */
}

.potential-legend-compact .legend-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.potential-legend-compact .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #64748b;
    padding: 4px 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.potential-legend-compact .legend-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.potential-legend-compact .legend-item i {
    font-size: 0.9rem;
}

/* Compact Version Hinweis - verschwindet nach oben */
.compact-version-notice {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid #2196f3;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
  position: relative;
  overflow: hidden;
}

.compact-version-notice .notice-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 2;
}

.compact-version-notice .notice-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1976d2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compact-version-notice .notice-title i {
  font-size: 1rem;
  color: #2196f3;
}

.compact-version-notice .notice-toggle {
  font-size: 0.75rem;
  color: #1976d2;
  transition: transform 0.3s ease;
  margin-left: 0.5rem;
}

.compact-version-notice .notice-toggle.collapsed {
  transform: rotate(180deg);
}

.compact-version-notice .notice-content {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  opacity: 1;
  max-height: 200px;
  overflow: hidden;
}

.compact-version-notice .notice-content.collapsed {
  transform: translateY(-100%);
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
}

.compact-version-notice .notice-text {
  font-size: 0.75rem;
  color: #1565c0;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.compact-version-notice .notice-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1976d2;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 0.25rem;
  border: 1px solid rgba(25, 118, 210, 0.3);
  transition: all 0.2s ease;
}

.compact-version-notice .notice-link:hover {
  background-color: #ffffff;
  border-color: #1976d2;
  color: #0d47a1;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.2);
}

.compact-version-notice .notice-link i {
  font-size: 0.8rem;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Desktop Version Link */
.desktop-version-link {
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  border-top: 1px solid #dee2e6;
}

/* ==============================================
   RESPONSIVE ANPASSUNGEN
   ============================================== */

/* Kleinere Bildschirme */
@media (max-width: 576px) {
  .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .d-flex.gap-3 {
    gap: 0.5rem !important;
  }
  
  .btn-sm {
    padding: 0.25rem 0.375rem;
    font-size: 0.85rem; /* Weniger starke Verkleinerung */
  }
    /* Reset-Filter Button anpassen */
  #resetFilters.btn {
    font-size: 0.85rem !important; /* !important um Bootstrap zu überschreiben */
  }
}

/* Größere Bildschirme */
@media (min-width: 768px) {
  .legend-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .mobile-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* ==============================================
   IFRAME-SPEZIFISCHE ANPASSUNGEN
   ============================================== */

/* Entfernt äußere Margins die in iframes störend sein können */
body {
    margin: 0;
    padding: 0;
}

/* Links mit target="_blank" für neue Fenster */
a[target="_blank"] {
    color: #0d6efd;
    text-decoration: none;
}

a[target="_blank"]:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Auch Parent-Links für Rückwärtskompatibilität */
a[target="_parent"] {
    color: #0d6efd;
    text-decoration: none;
}

a[target="_parent"]:hover {
    color: #0a58ca;
    text-decoration: underline;
}
