/* ========================================
   COOKIES BANNER - GenFuelUp
   ======================================== */

/* Cookie Banner Container */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.98) 0%, rgba(26, 26, 26, 0.98) 100%);
  backdrop-filter: blur(20px);
  padding: 1.5rem 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 2px solid rgba(74, 222, 128, 0.3);
}

.cookie-consent-banner.show {
  transform: translateY(0);
}

.cookie-consent-banner.hide {
  transform: translateY(100%);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Icon */
.cookie-icon {
  font-size: 3rem;
  flex-shrink: 0;
  animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

/* Text Content */
.cookie-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #4ade80;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

.cookie-text a {
  color: #4ade80;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.cookie-text a:hover {
  opacity: 0.8;
}

/* Buttons */
.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  color: #000;
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 222, 128, 0.6);
}

.cookie-btn-customize {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-customize:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #4ade80;
}

.cookie-btn-reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ========================================
   PREFERENCES MODAL
   ======================================== */

.cookie-preferences-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cookie-preferences-modal.show {
  opacity: 1;
  visibility: visible;
}

.cookie-preferences-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  border-radius: 1.5rem;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(74, 222, 128, 0.3);
  position: relative;
}

/* Modal Header */
.cookie-preferences-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  z-index: 1;
}

.cookie-preferences-header h2 {
  font-size: 1.75rem;
  color: #4ade80;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cookie-preferences-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

.cookie-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.cookie-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Modal Body */
.cookie-preferences-body {
  padding: 2rem;
}

.cookie-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.cookie-category:hover {
  background: rgba(74, 222, 128, 0.05);
  border-color: rgba(74, 222, 128, 0.3);
}

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

.cookie-category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cookie-category-icon {
  font-size: 1.5rem;
}

.cookie-category-title h3 {
  font-size: 1.125rem;
  color: #fff;
  font-weight: 600;
}

.cookie-category-badge {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.cookie-category-badge.required {
  background: rgba(147, 51, 234, 0.2);
  color: #a78bfa;
}

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

.cookie-category-examples {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 60px;
  height: 30px;
}

.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: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  border-color: #4ade80;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal Footer */
.cookie-preferences-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 1rem;
  position: sticky;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
}

.cookie-preferences-footer .cookie-btn {
  flex: 1;
}

/* Settings Icon (bottom-left corner) */
.cookie-settings-icon {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.4);
  transition: all 0.3s ease;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
}

.cookie-settings-icon.show {
  opacity: 1;
  visibility: visible;
}

.cookie-settings-icon:hover {
  transform: translateY(-3px) rotate(45deg);
  box-shadow: 0 6px 25px rgba(74, 222, 128, 0.6);
}

.cookie-settings-icon svg {
  width: 24px;
  height: 24px;
  stroke: #000;
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@media screen and (max-width: 968px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .cookie-icon {
    font-size: 2.5rem;
  }

  .cookie-buttons {
    width: 100%;
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    text-align: center;
  }

  .cookie-preferences-content {
    max-height: 95vh;
    margin: 1rem;
  }

  .cookie-preferences-footer {
    flex-direction: column;
  }
}

@media screen and (max-width: 576px) {
  .cookie-consent-banner {
    padding: 1rem 0;
  }

  .cookie-banner-content {
    padding: 0 1rem;
  }

  .cookie-text h3 {
    font-size: 1.1rem;
  }

  .cookie-text p {
    font-size: 0.875rem;
  }

  .cookie-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }

  .cookie-preferences-header {
    padding: 1.5rem;
  }

  .cookie-preferences-header h2 {
    font-size: 1.5rem;
  }

  .cookie-preferences-body {
    padding: 1.5rem;
  }

  .cookie-category {
    padding: 1rem;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-settings-icon {
    bottom: 1.5rem;
    left: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

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

.cookie-btn:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-close-btn:focus {
  outline: 2px solid #4ade80;
  outline-offset: 2px;
}

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* Print Styles */
@media print {
  .cookie-consent-banner,
  .cookie-preferences-modal,
  .cookie-settings-icon {
    display: none !important;
  }
}
