/* =================================================================
   GLOBAL STYLES & FONTS
   ================================================================= */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

body {
  font-family: "Inter", sans-serif;
}

/* --- AUTOCOMPLETE STYLES --- */
.autocomplete-container {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-top: none;
  background: white;
  width: 100%;
  border-radius: 0 0 8px 8px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: #e0e7ff;
}

/* --- UI ELEMENTS --- */
.flight-number-label {
  background-color: transparent;
  border: none;
  box-shadow: none;
  color: #1e293b;
  font-weight: bold;
  font-size: 10px;
  text-shadow:
    0 0 2px white,
    0 0 3px white;
}

.sort-btn.active,
.chart-view-btn.active,
.logbook-view-btn.active {
  background-color: #4338ca;
  color: white;
}

/* --- TOAST NOTIFICATIONS --- */
.toast {
  padding: 1rem;
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateX(100%);
  animation:
    slideInFadeIn 0.5s forwards,
    slideOutFadeOut 0.5s 4.5s forwards;
}

.toast-success {
  background-color: #10b981;
}

.toast-error {
  background-color: #ef4444;
}

.toast-info {
  background-color: #3b82f6;
}

/* --- DARK MODE OVERRIDES --- */
.dark body {
  background-color: #111827;
  color: #d1d5db;
}

.dark .bg-white {
  background-color: #1f2937;
  border-color: #374151;
}

.dark .bg-gray-100 {
  background-color: #111827;
}

.dark .bg-gray-50 {
  background-color: #1f2937;
}

.dark .bg-gray-200 {
  background-color: #374151;
}

.dark .bg-gray-200:hover {
  background-color: #4b5563;
}

.dark .bg-indigo-50 {
  background-color: #1f2937;
}

.dark .border-gray-200 {
  border-color: #4b5563;
}

.dark .text-gray-500 {
  color: #9ca3af;
}

.dark .text-gray-700 {
  color: #e5e7eb;
}

.dark .text-gray-800 {
  color: #f9fafb;
}

.dark .text-indigo-600 {
  color: #818cf8;
}

.dark .text-indigo-700 {
  color: #a5b4fc;
}

.dark input,
.dark select,
.dark textarea {
  background-color: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.dark .autocomplete-list {
  background: #1f2937;
  border-color: #4b5563;
}

.dark .autocomplete-item:hover,
.dark .autocomplete-item.active {
  background-color: #312e81;
}

/* --- AUTH TABS --- */
.auth-tab {
  color: #6b7280;
}

.dark .auth-tab {
  color: #9ca3af;
}

.auth-tab.active-tab {
  color: #4f46e5;
  border-bottom: 2px solid #4f46e5;
}

.dark .auth-tab.active-tab {
  color: #818cf8;
  border-color: #818cf8;
}

/* --- GLOBE VISUALS --- */
.float-tooltip-kap {
  font-size: 14px !important;
  padding: 6px 10px !important;
  background-color: white !important;
  color: #1f2937 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
  border: none !important;
  display: block !important;
}

.dark .float-tooltip-kap {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border: 1px solid #374151 !important;
}

/* --- ANIMATION --- */
@keyframes slideInFadeIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutFadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.animated-flight-marker {
  background: transparent;
  border: none;
  text-shadow:
    0 0 2px white,
    0 0 3px white,
    0 0 4px white;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  width: 30px !important;
  height: 20px !important;
  margin-left: -15px;
  margin-top: -10px;
}

/* --- PRINT STYLES --- */
@media print {
  .print-table {
    width: 100%;
    height: auto;
    page-break-before: always !important;
    page-break-inside: avoid !important;
  }

  .page-break {
    display: none !important;
    page-break-before: auto !important;
    border: none;
    height: 0;
    margin: 0;
  }

  body * {
    visibility: hidden;
  }

  #print-view-content,
  #print-view-content * {
    visibility: visible;
  }

  #print-view-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  .print-cover-page {
    page-break-after: always !important;
  }

  button,
  .no-print {
    display: none !important;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  @page {
    size: A4;
    margin: 1in;
  }
}

/* --- EASTER EGG: PAPER PLANE --- */
.paper-plane {
  position: fixed;
  z-index: 20000 !important; /* Brutal nach vorne holen */
  width: 60px;
  height: 60px;
  bottom: -100px; /* Startet außerhalb des Bildschirms */
  left: -100px;
  pointer-events: none; /* Damit man nicht versehentlich draufklickt */
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
}

/* Die Flugbahn: Von unten links nach oben rechts */
@keyframes flyAcrossScreen {
  0% {
    transform: translate(0, 0) rotate(0deg);
    /* Wir starten weiter draußen, damit auch große UFOs erst einfliegen */
    left: -300px; 
    bottom: -100px; 
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    /* Fliegt weit aus dem Bild raus (basierend auf Viewport Width/Height) */
    transform: translate(120vw, -120vh) rotate(15deg);
    left: 0;
    bottom: 0;
  }
}

.animate-fly {
  animation: flyAcrossScreen 7s ease-in-out forwards;
}

/* --- EASTER EGG TOAST --- */
.toast-easteregg {
  /* Ein knalliger Verlauf von Hot-Pink zu Violett */
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: white;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.4); /* Pinker Schatten */
}
