/* KI-Plattform-Vergleich - Stylesheet */

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #64748b;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.header-title-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.header-title-link:hover { text-decoration: none; }
.header-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}
.header-title {
  font-size: 1.125rem;
  font-weight: 900;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
}
.header-nav { display: flex; gap: 1rem; align-items: center; }
.header-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}
.header-user {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.5;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); border-color: var(--border-hover); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-header { margin-bottom: 1rem; }
.card-title { font-size: 1.25rem; font-weight: 600; }
.card-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }
.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,0.1); }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.25rem; }
.form-help { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.25rem; }

/* Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.checkbox-wrapper input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}
.checkbox-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.checkbox-label a { color: var(--primary); font-weight: 500; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 600;
  background: var(--bg);
  position: sticky;
  top: 0;
}
tr:hover td { background: #f1f5f9; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fecaca; color: #991b1b; }
.badge-info { background: var(--primary-light); color: var(--primary); }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fecaca; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: var(--primary-light); color: var(--primary); border: 1px solid #93c5fd; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============ Vendor Icons ============ */
.vendor-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.vendor-icon-img {
  object-fit: contain;
  border-radius: 8px;
}
.vendor-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

/* Discovery Grid */
/* Discovery Grid */
.vendor-group { margin-bottom: 2rem; }
.vendor-group-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.625rem;
}
.vendor-desc-wrap {
  margin: -0.25rem 0 0.75rem 0;
}
.vendor-description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.vendor-description.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vendor-desc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-size: 0.8rem;
  padding: 0.125rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.vendor-desc-toggle:hover {
  opacity: 0.8;
}
.vendor-desc-arrow {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
}
.vendor-desc-dots {
  font-weight: 600;
}

/* ============ Vendor Match Score Badge ============ */
.vendor-match-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  line-height: 1.2;
  flex-shrink: 0;
}
.vendor-match-percent {
  font-size: 1rem;
  font-weight: 700;
}
.vendor-match-label {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.9;
}
/* Farb-Varianten */
.vendor-match-badge.match-excellent {
  background: #dcfce7;
  color: #166534;
}
.vendor-match-badge.match-strong {
  background: #d1fae5;
  color: #065f46;
}
.vendor-match-badge.match-solid {
  background: #fef3c7;
  color: #92400e;
}
.vendor-match-badge.match-partial {
  background: #fed7aa;
  color: #9a3412;
}
.vendor-match-badge.match-weak {
  background: #fecaca;
  color: #991b1b;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.plan-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.plan-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.plan-card.selected { border-color: var(--primary); background: var(--primary-light); }
.plan-card-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.plan-card-name { font-weight: 600; font-size: 1rem; }
.plan-card-links { display: flex; gap: 0.75rem; margin-top: 0.5rem; font-size: 0.8rem; }
.plan-card-check {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: all 0.15s;
}
.plan-card.selected .plan-card-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Compare Table */
.compare-container { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  vertical-align: top;
}
.compare-table .label-col { width: 200px; min-width: 200px; font-weight: 500; background: var(--bg); }

/* Rubrik rows: base styling */
.compare-table .rubrik-row td {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
/* Rubrik: blue (Lizenzmodell) */
.compare-table .rubrik-row.rubrik-blue td {
  background: #1d4ed8;
}
.compare-table .rubrik-row.rubrik-blue:hover td {
  background: #2563eb;
}
/* Rubrik: orange (Modelle / KI-Modell) */
.compare-table .rubrik-row.rubrik-orange td {
  background: #f59e0b;
}
.compare-table .rubrik-row.rubrik-orange:hover td {
  background: #fbbf24;
}
/* Rubrik: dark (alle anderen) */
.compare-table .rubrik-row.rubrik-dark td {
  background: #0f172a;
}
.compare-table .rubrik-row.rubrik-dark:hover td {
  background: #1e293b;
}

.compare-table .subeigenschaft-row .label-col { padding-left: 2rem; font-weight: 400; color: var(--text-muted); }
.compare-header-cell { text-align: center; }
.compare-header-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.compare-header-vendor { font-size: 0.75rem; color: var(--text-muted); }
.compare-desc-wrap {
  margin: 0.25rem 0;
}
.compare-header-description {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.8;
  overflow: hidden;
  transition: max-height 0.3s ease;
  text-align: left;
}
.compare-header-description.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compare-desc-toggle {
  font-size: 0.65rem;
  margin-top: 0.125rem;
}
.compare-header-offer { font-size: 0.8rem; color: var(--text-muted); }
.compare-header-plan { font-size: 1rem; font-weight: 600; }

/* Tooltip - see Custom Tooltip section below */

/* Compare Bar (sticky bottom) */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 6px rgba(0,0,0,0.07);
  z-index: 40;
  display: none;
}
.compare-bar.visible { display: block; }
.compare-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.compare-bar-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.compare-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
}
.compare-pill-remove {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}
.compare-pill-remove:hover { color: var(--danger); }

/* Auth page */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  background-color: #fff;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary);
  font-size: 1.5rem;
}
.auth-title { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-subtitle {
  text-align: left;
  margin-bottom: 1rem;
  margin-top: 0.7rem;
}

/* Page title section */
.page-header { padding: 1.5rem 0; }
.page-title { font-size: 1.5rem; font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin-top: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .plans-grid { grid-template-columns: 1fr; }
  .header-nav { gap: 0.25rem; }
  .header-nav a { padding: 0.375rem 0.5rem; font-size: 0.8rem; }
  .compare-table .label-col { width: 140px; min-width: 140px; }
}

/* External Links */
.external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.external-icon {
  font-size: 0.75em;
  opacity: 0.7;
}
.external-link:hover .external-icon {
  opacity: 1;
}

/* Cell Links (auto-detected http/tel/mailto) */
.cell-link {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}
.cell-link:hover {
  text-decoration: underline;
}
.cell-link .external-icon {
  font-size: 0.7em;
  vertical-align: super;
}

/* Collapsible Sections */
.collapsible-header {
  cursor: pointer;
  user-select: none;
}
.collapsible-header:hover td {
  filter: brightness(0.95);
}
.collapse-icon {
  display: inline-block;
  width: 1.25rem;
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.section-row.collapsed {
  display: none;
}

/* Cell Yes/No */
.cell-yes {
  color: var(--success);
  font-weight: 600;
  font-size: 1.1rem;
}
.cell-no {
  color: var(--danger);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Cell value with tooltip: wraps ✓/– and ⓘ together */
.cell-value-with-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: help;
}

/* Unicode ⓘ info icon */
.info-icon {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
}

/* Custom Tooltip */
.tooltip-trigger {
  cursor: help;
}
.custom-tooltip {
  display: none;
  position: fixed;
  background: var(--text);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  max-width: 320px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  line-height: 1.5;
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============ Modal Popup ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-overlay.visible {
  opacity: 1;
}
.modal-dialog {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem 2rem 1.5rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
}
.modal-overlay.visible .modal-dialog {
  transform: scale(1) translateY(0);
}
.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 50%;
  margin-bottom: 1rem;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.modal-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.modal-btn {
  min-width: 140px;
}

/* ── Footer ── */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 100%;
}
.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.footer-sep {
  color: var(--border);
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}


.banner-ad {
  width: 50%;
  margin: 20px auto;
}

.banner-ad-label {
  font-size: 12px;
  color: #777;
  font-family: Arial, sans-serif;
  margin-bottom: 6px;
}

.banner-ad img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}



/* ── Session Expired Banner ── */
.session-expired-banner {
  background: #fef2f2;
  border-top: 4px solid #dc2626;
  padding: 1.5rem 1rem;
  margin-bottom: 2rem;
}
.session-expired-inner {
  max-width: 600px;
  margin: 0 auto;
}
.session-expired-banner h2 {
  color: #991b1b;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.session-expired-banner p {
  color: #7f1d1d;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.session-expired-banner .btn {
  display: inline-block;
}
