/* =============================================================================
   COOKIE CONSENT BANNER - Croydon Metropolitan College
   Lightweight, accessible, GDPR-compliant
   ============================================================================= */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.cookie-consent.is-visible {
  transform: translateY(0);
}

.cookie-consent__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-consent__text {
  flex: 1;
  min-width: 280px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-consent__text a {
  color: #60a5fa;
  text-decoration: underline;
}

.cookie-consent__text a:hover {
  color: #93c5fd;
}

.cookie-consent__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-consent__btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  min-height: 44px; /* Minimum touch target */
  min-width: 44px;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.cookie-consent__btn--accept {
  background: #0b3d91;
  color: #fff;
}

.cookie-consent__btn--accept:hover {
  background: #0a2e6d;
}

.cookie-consent__btn--decline {
  background: transparent;
  color: #d1d5db;
  border: 1px solid #4b5563;
}

.cookie-consent__btn--decline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #6b7280;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .cookie-consent {
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom)); /* Notched phones */
    /* Explicit colors - same as desktop */
    background: #1f2937;
    color: #f9fafb;
  }
  
  .cookie-consent__inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .cookie-consent__text {
    min-width: unset;
    font-size: 0.85rem;
    color: #f9fafb; /* Explicit - same as desktop */
  }
  
  .cookie-consent__text a {
    color: #60a5fa; /* Explicit - same as desktop */
  }
  
  .cookie-consent__actions {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .cookie-consent__btn {
    flex: 1;
    max-width: 160px;
    min-height: 48px; /* Larger touch target on mobile */
    font-size: 0.95rem;
  }
  
  /* Explicit button colors - same as desktop */
  .cookie-consent__btn--accept {
    background: #0b3d91;
    color: #fff;
  }
  
  .cookie-consent__btn--decline {
    background: transparent;
    color: #d1d5db;
    border: 1px solid #4b5563;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .cookie-consent__btn {
    max-width: none;
    width: 100%;
  }
  
  .cookie-consent__actions {
    flex-direction: column;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent {
    transition: none;
  }
}

/* Print - hide banner */
@media print {
  .cookie-consent {
    display: none !important;
  }
}
