/**
 * File: /css/cookie-banner.css
 * Purpose: Cookie Banner Styles für TC Hugsweier
 * 
 * Features:
 * - Responsive Cookie Banner
 * - Bottom-fixed Position
 * - Slide-in Animation
 * - Mobile-optimiert
 * - Button-Reihenfolge: Ablehnen links (unauffällig), Akzeptieren rechts (prominent)
 * - Modal Z-Index über Banner
 * 
 * Dependencies: FontAwesome, Bootstrap 5
 * Created: 2025
 * Author: TC Hugsweier
 * Version: 2.1 - Updated Button Order & Z-Index
 */

/* Cookie Banner Container */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9997;
  transition: bottom 0.5s ease-in-out;
  padding: 0;
}

/* Banner sichtbar machen */
.cookie-banner.show {
  bottom: 0;
}

/* Banner Content */
.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Text Section */
.cookie-text {
  flex: 1;
}

.cookie-text h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.cookie-text h4 i {
  margin-right: 0.5rem;
  color: #ffd700;
}

.cookie-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-text a {
  color: #ffd700;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.cookie-text a:hover {
  color: #ffed4e;
}

/* Buttons Section */
.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* Cookie Buttons Base */
.cookie-btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.cookie-btn i {
  font-size: 1rem;
}

/* Decline Button - Links, klein, unauffällig */
.cookie-btn-decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  order: 1;
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  font-weight: 500;
}

.cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Settings Button - Mitte */
.cookie-btn-settings {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  order: 2;
}

.cookie-btn-settings:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Accept Button - Rechts, groß, prominent */
.cookie-btn-accept {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: #ffffff;
  order: 3;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 3px 12px rgba(40, 167, 69, 0.4);
}

.cookie-btn-accept:hover {
  background: linear-gradient(135deg, #218838, #1aa179);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(40, 167, 69, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  
  .cookie-text h4 {
    font-size: 1.1rem;
  }
  
  .cookie-text p {
    font-size: 0.85rem;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-btn {
    flex: 1;
    min-width: auto;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .cookie-btn-accept {
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
  }
  
  .cookie-btn-decline {
    font-size: 0.75rem;
    padding: 0.45rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .cookie-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .cookie-btn {
    width: 100%;
  }
}

/* Animation für Slide-in */
@keyframes slideUp {
  from {
    bottom: -100%;
  }
  to {
    bottom: 0;
  }
}

/* Cookie Settings Modal Z-Index Fix */
#cookieSettingsModal {
  z-index: 9999 !important;
}

.modal-backdrop.show {
  z-index: 9998 !important;
}

/* Cookie Settings Modal Styles */
#cookieSettingsModal .modal-content {
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#cookieSettingsModal .modal-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #ffffff;
  border-bottom: none;
}

#cookieSettingsModal .modal-title i {
  color: #ffd700;
}

#cookieSettingsModal .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

#cookieSettingsModal .btn-close:hover {
  opacity: 1;
}

/* Cookie Category Styles */
.cookie-category {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.cookie-category:hover {
  background: #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cookie-category h6 {
  font-weight: 600;
  color: #212529;
}

.cookie-category h6 i {
  font-size: 1.1rem;
}

.cookie-details {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #ffffff;
  border-left: 3px solid #007bff;
  border-radius: 4px;
}

/* Form Switch Styling */
.form-check-input {
  width: 3rem;
  height: 1.5rem;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: #28a745;
  border-color: #28a745;
}

.form-check-input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Badge Styling */
.badge.bg-success {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
}

/* Alert Styling */
#cookieSettingsModal .alert-info {
  border-left: 4px solid #17a2b8;
  background: #e7f6f8;
  border-color: #17a2b8;
}

/* Modal Footer Buttons */
#cookieSettingsModal .modal-footer {
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
}

#cookieSettingsModal .btn-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

#cookieSettingsModal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Responsive Modal */
@media (max-width: 768px) {
  .cookie-category .d-flex {
    flex-direction: column;
  }
  
  .cookie-category .form-check {
    margin-top: 1rem;
  }
  
  #cookieSettingsModal .modal-lg {
    max-width: 95%;
  }
}