/* ============================================================
   LEGAL PAGES - Shared Styles
   Impressum, Datenschutz, AGB
   ============================================================ */

/* Container */
.legal-container {
  min-height: 100vh;
  background: var(--gastrobot-background);
  display: flex;
  flex-direction: column;
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* Header */
.legal-header {
  background: linear-gradient(
    135deg,
    var(--gastrobot-primary) 0%,
    var(--gastrobot-primary-dark) 100%
  );
  color: white;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.legal-back-btn {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.6rem 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.legal-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
  border-color: rgba(255, 255, 255, 0.4);
}

.legal-header__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.legal-header__logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  padding: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.legal-header__title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
  color: white !important;
}

/* Content Area */
.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
}

/* Sections */
.legal-section {
  background: white;
  border-radius: var(--kf-radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.legal-section h2 {
  color: var(--kf-color-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(95, 125, 85, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legal-section h2 i {
  font-size: 1.1rem;
  opacity: 0.8;
}

.legal-section h3 {
  color: var(--kf-color-text);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem 0;
}

.legal-section h4 {
  color: var(--kf-color-text);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.legal-section--highlight {
  background: linear-gradient(
    135deg,
    var(--gastrobot-primary) 0%,
    var(--gastrobot-primary-dark) 100%
  );
  border-left: 4px solid var(--gastrobot-accent);
  color: white !important;
}

.legal-section--highlight p,
.legal-section--highlight span,
.legal-section--highlight li,
.legal-section--highlight .legal-text {
  color: white !important;
}

.legal-section--highlight .legal-highlight-box h3,
.legal-section--highlight .legal-highlight-box h4 {
  color: white !important;
}

.legal-section--highlight .legal-highlight-box p {
  color: rgba(255, 255, 255, 0.9);
}

.legal-section--highlight .legal-highlight-box > i {
  color: var(--gastrobot-accent);
}

/* Info Block */
.legal-info-block {
  background: #f8f9fa;
  border-radius: var(--kf-radius-sm);
  padding: 1rem 1.25rem;
  margin: 0.5rem 0;
}

.legal-info-block p {
  margin: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-info-block p i {
  color: var(--kf-color-primary);
  width: 1.25rem;
  text-align: center;
}

/* Text Content */
.legal-text {
  color: var(--kf-color-text);
  line-height: 1.7;
}

.legal-text p {
  margin: 0.75rem 0;
}

.legal-text a {
  color: var(--kf-color-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--kf-color-primary);
  transition: all 0.2s ease;
}

.legal-text a:hover {
  border-bottom-style: solid;
}

/* Lists */
.legal-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.legal-list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
}

.legal-list li::before {
  content: "•";
  color: var(--kf-color-primary);
  font-weight: bold;
  position: absolute;
  left: 0.5rem;
}

.legal-list--security li {
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legal-list--security li::before {
  display: none;
}

.legal-list--security li i {
  color: var(--kf-color-success);
}

/* Tables */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.legal-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--kf-color-text);
}

.legal-table tr:hover td {
  background: #fafbfc;
}

/* Highlight Box */
.legal-highlight-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(95, 125, 85, 0.05);
  border-radius: var(--kf-radius-sm);
}

.legal-highlight-box > i {
  font-size: 2rem;
  color: var(--kf-color-primary);
  flex-shrink: 0;
}

.legal-highlight-box h3,
.legal-highlight-box h4 {
  margin: 0 0 0.5rem 0;
  color: var(--kf-color-primary);
}

.legal-highlight-box p {
  margin: 0;
  color: var(--kf-color-text-muted);
}

.legal-highlight-box--azure {
  background: rgba(0, 120, 212, 0.05);
  border: 1px solid rgba(0, 120, 212, 0.15);
}

.legal-highlight-box--azure > i {
  color: #0078d4;
}

.legal-highlight-box--azure h4 {
  color: #0078d4;
}

/* Rights Grid */
.legal-rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.legal-right {
  background: #f8f9fa;
  border-radius: var(--kf-radius-sm);
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.legal-right:hover {
  background: #f1f3f5;
  transform: translateY(-2px);
}

.legal-right i {
  font-size: 1.5rem;
  color: var(--kf-color-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.legal-right h4 {
  margin: 0.5rem 0 0.25rem 0;
  font-size: 0.95rem;
}

.legal-right p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--kf-color-text-muted);
}

/* Notes and Basis */
.legal-note {
  font-style: italic;
  color: #614c20; /* Dark amber — WCAG AA on #fff9e6 (~7.5:1) */
  padding: 0.75rem 1rem;
  background: #fff9e6;
  border-left: 3px solid #f0ad4e;
  border-radius: 0 var(--kf-radius-sm) var(--kf-radius-sm) 0;
  margin: 1rem 0;
}

.legal-basis {
  font-size: 0.85rem;
  color: #1a4971; /* Dark blue — WCAG AA on #e8f4fd (~7.4:1) */
  padding: 0.5rem 0.75rem;
  background: #e8f4fd;
  border-left: 3px solid #0078d4;
  border-radius: 0 var(--kf-radius-sm) var(--kf-radius-sm) 0;
  margin: 1rem 0;
}

.legal-update-date {
  font-size: 0.9rem;
  color: var(--kf-color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #dee2e6;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  margin-top: 2rem;
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--kf-radius-lg);
  box-shadow: var(--kf-shadow-sm);
}

.legal-footer-links a {
  color: var(--gastrobot-primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--kf-radius-md);
  transition: all 0.2s ease;
}

.legal-footer-links a:hover {
  background: rgba(45, 80, 22, 0.05);
  color: var(--gastrobot-primary-dark);
  transform: translateY(-1px);
}

/* Footer Section */
.legal-footer {
  background: linear-gradient(to right, var(--gastrobot-primary-dark), #0a1504);
  color: white;
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-radius: var(--kf-radius-lg) var(--kf-radius-lg) 0 0;
}

.legal-footer p {
  margin: 0.5rem 0;
  opacity: 0.8;
  font-size: 0.95rem;
}

.legal-footer .company-name {
  font-weight: 700;
  color: var(--gastrobot-accent);
  font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .legal-header {
    padding: 3.5rem 1rem 1.5rem 1rem;
  }

  .legal-back-btn {
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .legal-header__title {
    font-size: 1.5rem;
  }

  .legal-content {
    padding: 1rem;
  }

  .legal-section {
    padding: 1.25rem;
  }

  .legal-section h2 {
    font-size: 1.1rem;
  }

  .legal-rights-grid {
    grid-template-columns: 1fr;
  }

  .legal-footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .legal-highlight-box {
    flex-direction: column;
    text-align: center;
  }

  .legal-table {
    font-size: 0.8rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.5rem;
  }
}

/* Print Styles */
@media print {
  .legal-back-btn,
  .legal-footer-links {
    display: none;
  }

  .legal-section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .legal-header {
    background: white;
    color: black;
    border-bottom: 2px solid #333;
  }
}
