/* ═══════════════════════════════════════════════════════════
   COOKIE CONSENT SYSTEM - GDPR Compliant
   Modern, accessible cookie banner and preferences modal
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   COOKIE CONSENT BANNER
   ═══════════════════════════════════════ */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: linear-gradient(135deg, var(--elite-dark) 0%, #1a1a2e 100%);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
}

.cookie-consent[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

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

.cookie-consent__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-consent__content {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 1;
}

.cookie-consent__icon {
  font-size: 2.5rem;
  color: var(--elite-yellow);
  flex-shrink: 0;
  animation: cookieBounce 2s infinite;
}

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

.cookie-consent__text {
  flex: 1;
}

.cookie-consent__title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: white;
}

.cookie-consent__description {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

.cookie-consent__link {
  color: var(--elite-yellow);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
}

.cookie-consent__link:hover {
  color: var(--elite-yellow-light);
}

.cookie-consent__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cookie-consent__btn--accept {
  background: var(--elite-yellow);
  color: var(--elite-dark);
}

.cookie-consent__btn--accept:hover {
  background: var(--elite-yellow-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 188, 58, 0.4);
}

.cookie-consent__btn--reject {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent__btn--reject:hover {
  background: rgba(255, 255, 255, 0.15);
}

.cookie-consent__btn--settings {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent__btn--settings:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════
   COOKIE SETTINGS MODAL
   ═══════════════════════════════════════ */

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cookie-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.cookie-modal__content {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.cookie-modal[aria-hidden="false"] .cookie-modal__content {
  transform: scale(1);
}

.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-modal__title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--elite-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cookie-modal__title i {
  color: var(--elite-yellow);
}

.cookie-modal__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cookie-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.cookie-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.cookie-modal__intro {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 2rem 0;
}

/* ═══════════════════════════════════════
   COOKIE CATEGORIES
   ═══════════════════════════════════════ */

.cookie-category {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.cookie-category:hover {
  background: #f0f2f5;
  transform: translateX(4px);
}

.cookie-category__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.cookie-category__info {
  flex: 1;
}

.cookie-category__title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--elite-dark);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-category__title i {
  color: var(--elite-yellow);
  font-size: 1rem;
}

.cookie-category__description {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

.cookie-category__details {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #777;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-category__details p {
  margin: 0 0 0.5rem 0;
}

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

/* ═══════════════════════════════════════
   COOKIE TOGGLE SWITCH
   ═══════════════════════════════════════ */

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

.cookie-toggle input[type="checkbox"] {
  display: none;
}

.cookie-toggle label {
  position: relative;
  display: block;
  width: 50px;
  height: 28px;
  background: #ccc;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cookie-toggle__slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input[type="checkbox"]:checked + label {
  background: var(--elite-yellow);
}

.cookie-toggle input[type="checkbox"]:checked + label .cookie-toggle__slider {
  transform: translateX(22px);
}

.cookie-toggle__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
}

.cookie-toggle--disabled label {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-toggle--disabled .cookie-toggle__label {
  color: var(--elite-yellow);
}

/* ═══════════════════════════════════════
   MODAL FOOTER
   ═══════════════════════════════════════ */

.cookie-modal__footer {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-modal__btn {
  flex: 1;
  padding: 1rem 2rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cookie-modal__btn--primary {
  background: var(--elite-yellow);
  color: var(--elite-dark);
}

.cookie-modal__btn--primary:hover {
  background: var(--elite-yellow-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 188, 58, 0.4);
}

.cookie-modal__btn--secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--elite-dark);
}

.cookie-modal__btn--secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════
   COOKIE PREFERENCES BUTTON (Persistent)
   ═══════════════════════════════════════ */

.cookie-preferences-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 998;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--elite-dark) 0%, #1a1a2e 100%);
  color: var(--elite-yellow);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.cookie-preferences-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.cookie-preferences-btn:active {
  transform: translateY(-1px) scale(1);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 1024px) {
  .cookie-consent__container {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-consent__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  .cookie-consent {
    padding: 1rem 0;
  }

  .cookie-consent__container {
    padding: 0 1.25rem;
  }

  .cookie-consent__content {
    flex-direction: column;
    gap: 1rem;
  }

  .cookie-consent__icon {
    font-size: 2rem;
  }

  .cookie-consent__title {
    font-size: 1.125rem;
  }

  .cookie-consent__description {
    font-size: 0.875rem;
  }

  .cookie-consent__actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .cookie-consent__btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
  }

  .cookie-modal__content {
    width: 95%;
    max-height: 90vh;
  }

  .cookie-modal__header,
  .cookie-modal__body,
  .cookie-modal__footer {
    padding: 1.25rem;
  }

  .cookie-modal__title {
    font-size: 1.25rem;
  }

  .cookie-category {
    padding: 1rem;
  }

  .cookie-category__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-modal__footer {
    flex-direction: column;
  }

  .cookie-preferences-btn {
    bottom: 1rem;
    left: 1rem;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .cookie-consent__btn {
    font-size: 0.9375rem;
    padding: 0.75rem 1.25rem;
  }

  .cookie-category__title {
    font-size: 1rem;
  }

  .cookie-category__description {
    font-size: 0.875rem;
  }
}

/* ═══════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════ */

.cookie-consent__btn:focus,
.cookie-modal__btn:focus,
.cookie-preferences-btn:focus {
  outline: 2px solid var(--elite-yellow);
  outline-offset: 2px;
}

.cookie-toggle input[type="checkbox"]:focus + label {
  outline: 2px solid var(--elite-yellow);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent,
  .cookie-modal__content,
  .cookie-consent__icon,
  * {
    animation: none !important;
    transition: none !important;
  }
}