/**
 * Cookie Consent Banner Styles - Inline im minimierten Footer (horizontal)
 * 
 * DSGVO-konformes Design integriert im Footer
 * - Erscheint in einer Zeile mit Copyright und Links
 * - Kompaktes, inline Design ohne Hintergrund
 * - Optimierte Abstände für harmonisches Layout
 * 
 * @author Abdulkerim Sesli
 * @version 3.1.0
 */

/* ===== FOOTER SPACING OPTIMIERUNG ===== */
.footer-copyright-text {
  margin-right: 6px !important;
}

.footer-minimal-nav {
  margin-left: 6px !important;
}

/* ===== INLINE COOKIE BANNER (HORIZONTAL) ===== */
.cookie-banner-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  margin: 0 8px;
  
  /* Komplett transparent - keine Border, kein Hintergrund */
  background: transparent;
  border: none;
  border-radius: 8px;
  
  /* Smooth fade-in animation */
  animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Transition für fade-out */
  opacity: 1;
  transform: scale(1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== HIDDEN STATE ===== */
.cookie-banner-inline.hidden {
  display: none;
}

/* ===== COOKIE TEXT ===== */
.cookie-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--dynamic-footer-text-primary, #e5e5e7);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Responsive Text: Vollständig auf Desktop, kurz auf Mobile */
.cookie-text-short {
  display: none;
}

.cookie-text-full {
  display: inline;
}

.btn-text-short {
  display: none;
}

.btn-text-full {
  display: inline;
}

/* Cookies-Link in Navigation - bleibt immer sichtbar */
.footer-cookies-link {
  display: inline;
}

/* ===== ACCEPT BUTTON (COMPACT INLINE) ===== */
.cookie-accept-btn {
  padding: 4px 14px;
  background: linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(10, 132, 255, 0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-accept-btn:hover {
  background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(10, 132, 255, 0.35);
}

.cookie-accept-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(10, 132, 255, 0.3);
}

.cookie-accept-btn:focus {
  outline: 2px solid rgba(10, 132, 255, 0.5);
  outline-offset: 2px;
}

/* ===== REJECT BUTTON (DSGVO-KONFORM) ===== */
.cookie-reject-btn {
  padding: 4px 14px;
  background: transparent;
  color: var(--dynamic-footer-text-primary, #e5e5e7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-reject-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.cookie-reject-btn:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.05);
}

.cookie-reject-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile/Tablet - Wechsel zu kürzerem Text (wie Menu-Breakpoint) */
@media (max-width: 1000px) {
  /* Kurze Texte anzeigen */
  .cookie-text-full {
    display: none;
  }
  
  .cookie-text-short {
    display: inline;
  }
  
  .btn-text-full {
    display: none;
  }
  
  .btn-text-short {
    display: inline;
  }
  
  .cookie-banner-inline {
    gap: 5px;
    padding: 3px 6px;
    margin: 0 5px;
  }
  
  .cookie-text {
    font-size: 0.75rem;
    gap: 3px;
  }
  
  .cookie-accept-btn {
    padding: 3px 10px;
    font-size: 0.7rem;
  }
  
  /* Reduziere Footer-Abstände */
  .footer-copyright-text {
    margin-right: 3px !important;
  }
  
  .footer-minimal-nav {
    margin-left: 3px !important;
    gap: 5px !important;
  }
}

/* Sehr kleine Mobile - Ultra-kompakt */
@media (max-width: 480px) {
  /* Kurze Texte bleiben */
  .cookie-banner-inline {
    gap: 3px;
    padding: 2px 4px;
    margin: 0 3px;
  }
  
  .cookie-text {
    font-size: 0.65rem;
    gap: 2px;
  }
  
  .cookie-accept-btn {
    padding: 2px 8px;
    font-size: 0.65rem;
    border-radius: 4px;
  }
  
  /* Minimale Footer-Abstände für eine Zeile */
  .footer-copyright-text {
    margin-right: 2px !important;
    font-size: 10px !important;
  }
  
  .footer-minimal-nav {
    margin-left: 2px !important;
    gap: 4px !important;
  }
  
  .footer-nav-link {
    padding: 2px 4px !important;
    font-size: 10px !important;
  }
  
  /* Verhindere Umbruch */
  .footer-minimal-content {
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
}

/* ===== LIGHT MODE SUPPORT ===== */
@media (prefers-color-scheme: light) {
  .cookie-banner-inline {
    background: transparent;
    border: none;
  }
  
  .cookie-text {
    color: #1d1d1f;
  }
}

/* ===== THEME DATA ATTRIBUTE SUPPORT ===== */
[data-theme="light"] .cookie-banner-inline {
  background: transparent;
  border: none;
}

[data-theme="light"] .cookie-text {
  color: #1d1d1f;
}

/* ===== COOKIE MODAL (DSGVO-DETAILS) ===== */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cookie-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: 600;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Modal Body */
.cookie-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.cookie-modal-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

/* Cookie Category */
.cookie-category {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cookie-category-header h3 {
  margin: 0;
  font-size: 1.125rem;
  color: #ffffff;
  font-weight: 600;
}

.cookie-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cookie-status-required {
  background: rgba(52, 199, 89, 0.2);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.cookie-category-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

/* Cookie Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  transition: 0.3s;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: #0a84ff;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:focus + .cookie-toggle-slider {
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.5);
}

/* Cookie Details */
.cookie-details {
  margin-top: 1rem;
}

.cookie-item {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.cookie-item:last-child {
  margin-bottom: 0;
}

.cookie-item strong {
  display: block;
  color: #0a84ff;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.cookie-item p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 0.5rem 0;
}

.cookie-duration {
  display: inline-block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Privacy Info */
.cookie-privacy-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(10, 132, 255, 0.1);
  border: 1px solid rgba(10, 132, 255, 0.3);
  border-radius: 12px;
}

.cookie-privacy-info h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #64d2ff;
  font-weight: 600;
}

.cookie-privacy-info ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
}

.cookie-privacy-info li {
  position: relative;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
}

.cookie-privacy-info li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34c759;
  font-weight: bold;
}

.cookie-privacy-info a {
  color: #0a84ff;
  text-decoration: underline;
}

.cookie-privacy-info a:hover {
  color: #64d2ff;
}

/* Modal Footer */
.cookie-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.cookie-modal-btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-modal-btn-primary {
  background: linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}

.cookie-modal-btn-primary:hover {
  background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4);
}

.cookie-modal-btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Mobile Modal Anpassungen */
@media (max-width: 768px) {
  .cookie-modal-content {
    max-height: 95vh;
    margin: 0.5rem;
  }
  
  .cookie-modal-header {
    padding: 1rem 1.5rem;
  }
  
  .cookie-modal-header h2 {
    font-size: 1.25rem;
  }
  
  .cookie-modal-body {
    padding: 1.5rem;
  }
  
  .cookie-modal-footer {
    flex-direction: column;
    padding: 1rem 1.5rem;
  }
  
  .cookie-modal-btn {
    width: 100%;
  }
  
  .cookie-category {
    padding: 1rem;
  }
}

/* Footer Cookies Link als Button - erbt Styles von .footer-nav-link */
.footer-cookies-link {
  background: transparent;
  border: none;
  cursor: pointer;
  /* padding und font werden von .footer-nav-link geerbt */
}

/* ===== ACCESSIBILITY ===== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner-inline {
    animation: none;
  }
  
  .cookie-accept-btn:hover {
    transform: none;
  }
}

/* High Contrast */
@media (prefers-contrast: high) {
  .cookie-accept-btn {
    border: 2px solid currentColor;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .cookie-banner-inline {
    display: none;
  }
}

