/* Mobile Fixes für Aegilock - Vereinfachte Darstellung */

/* Basis Mobile Anpassungen */
@media (max-width: 768px) {
  /* Verhindere horizontales Scrolling global */
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
  
  /* Container Breite begrenzen */
  .container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  /* Sections mit inline-styles anpassen */
  section > div {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Dashboard Stats Grid - bleibt 2 Spalten */
  div[style*="grid-template-columns: 1fr 1fr"] {
    gap: 10px !important;
  }
  
  /* Dashboard Stats Cards */
  div[style*="background: #2d3748"][style*="padding: 12px"] {
    padding: 10px !important;
  }
  
  /* Rules Container */
  div[style*="background: #f8fafc"][style*="border: 2px solid #e2e8f0"] {
    padding: 15px !important;
    margin: 15px 0 !important;
  }
  
  /* Dashboard Container */
  div[style*="background: #1a202c"][style*="border-radius: 12px"] {
    padding: 15px !important;
  }
  
  /* Vergleichstabelle Aegilock vs. Konkurrenz */
  div[style*="background: white"][style*="border-radius: 12px"][style*="overflow: hidden"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Vergleichstabelle minimum width */
  div[style*="background: #667eea"][style*="display: flex"],
  div[style*="padding: 15px"][style*="display: flex"] {
    min-width: 450px;
  }
}

/* Smartphone spezifisch */
@media (max-width: 480px) {
  /* Container padding reduzieren */
  .container {
    padding: 0 10px;
  }
  
  /* Dashboard Stats - kleiner machen */
  div[style*="font-size: 1.25rem"] {
    font-size: 1.1rem !important;
  }
  
  div[style*="font-size: 0.75rem"] {
    font-size: 0.7rem !important;
  }
  
  div[style*="font-size: 0.65rem"] {
    font-size: 0.6rem !important;
  }
  
  /* Dashboard Container noch kompakter */
  div[style*="background: #1a202c"][style*="border-radius: 12px"] {
    padding: 12px !important;
    margin: 12px 0 !important;
  }
  
  /* Rules Container kompakter */
  div[style*="background: #f8fafc"][style*="border: 2px solid #e2e8f0"] {
    padding: 12px !important;
    margin: 12px 0 !important;
    border-width: 1px !important;
  }
  
  /* Rules Liste */
  div[style*="background: white"][style*="border-radius: 8px"][style*="padding: 12px"] {
    padding: 8px !important;
  }
  
  /* Rule Items */
  div[style*="padding: 10px"][style*="border-bottom"] {
    padding: 8px !important;
  }
  
  /* Button volle Breite ist schon gesetzt */
  button[style*="width: 100%"] {
    padding: 10px !important;
    font-size: 0.85rem !important;
  }
  
  /* Header Titel kleiner */
  h2 {
    font-size: 1.4rem !important;
  }
  
  h3 {
    font-size: 1.2rem !important;
  }
  
  h4 {
    font-size: 0.95rem !important;
  }
  
  /* Favicon in Headings kleiner auf Mobile */
  h2 img[src="favicon.ico"] {
    height: 20px !important;
    width: 20px !important;
  }
  
  h3 img[src="favicon.ico"] {
    height: 18px !important;
    width: 18px !important;
  }
  
  /* Activity Liste kompakter */
  div[style*="background: #2d3748"][style*="border-radius: 8px"] {
    padding: 10px !important;
  }
  
  /* Fraud Cases - kompakter auf Mobile */
  div[style*="background: #374151"][style*="border-radius: 6px"] {
    padding: 8px !important;
    margin-bottom: 6px !important;
  }
  
  /* Score badges in Cases */
  div[style*="padding: 2px 6px"][style*="border-radius: 10px"] {
    padding: 1px 5px !important;
    font-size: 0.6rem !important;
  }
  
  /* Case text kompakter */
  div[style*="font-size: 0.8rem"] {
    font-size: 0.75rem !important;
  }
  
  div[style*="font-size: 0.75rem"] {
    font-size: 0.7rem !important;
  }
  
  div[style*="font-size: 0.7rem"] {
    font-size: 0.65rem !important;
  }
  
  /* Status Badges */
  span[style*="padding: 3px 8px"] {
    padding: 2px 6px !important;
    font-size: 0.65rem !important;
  }
  
  /* Flex Layout in Cases anpassen */
  div[style*="display: flex"][style*="justify-content: space-between"][style*="margin-bottom: 4px"] {
    flex-direction: column !important;
    gap: 4px !important;
    align-items: flex-start !important;
  }
  
  /* Scrollbar für Vergleichstabelle */
  div[style*="overflow-x: auto"]::-webkit-scrollbar {
    height: 5px;
  }
  
  div[style*="overflow-x: auto"]::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
  }
}

/* Sehr kleine Bildschirme */
@media (max-width: 375px) {
  /* Dashboard Stats können auf 1 Spalte wechseln */
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  
  /* Noch kleinere Schriften */
  div[style*="font-size: 1.25rem"],
  div[style*="font-size: 1.1rem"] {
    font-size: 1rem !important;
  }
  
  /* Section padding minimal */
  section {
    padding: 30px 0 !important;
  }
  
  /* Minimale Abstände */
  .mb-5 {
    margin-bottom: 2rem !important;
  }
}