/**
 * CRUX Games Cookie Consent Styles
 * UK GDPR & PECR Compliant Cookie Banner
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: #ffffff;
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

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

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

.cookie-consent-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFD700;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-consent-text a {
  color: #FFD700;
  text-decoration: underline;
}

.cookie-consent-text a:hover {
  color: #FFC700;
}

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

/* Cookie Buttons */
.cookie-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn-primary {
  background: #FFD700;
  color: #000000;
}

.cookie-btn-primary:hover {
  background: #FFC700;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.cookie-btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

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

.cookie-btn-text {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1rem;
}

.cookie-btn-text:hover {
  color: #FFD700;
  text-decoration: underline;
}

/* Cookie Customize Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.cookie-modal.show {
  opacity: 1;
}

.cookie-modal-content {
  background: #ffffff;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #666666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cookie-modal-close:hover {
  background: #f0f0f0;
  color: #000000;
}

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

.cookie-category {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.cookie-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

.cookie-category h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #000000;
}

.cookie-category p {
  margin: 0;
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

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

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

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

.cookie-switch input:checked + .cookie-slider {
  background-color: #FFD700;
}

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

.cookie-switch input:disabled + .cookie-slider {
  background-color: #999;
  cursor: not-allowed;
}

.cookie-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  .cookie-consent-buttons {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
  }

  .cookie-modal-content {
    margin: 1rem;
  }

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

  .cookie-modal-footer .cookie-btn {
    width: 100%;
  }
}

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

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

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

  .cookie-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }

  .cookie-modal-header h2 {
    font-size: 1.25rem;
  }
}

/* Cookie Settings Link in Footer */
.cookie-settings-link {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cookie-settings-link:hover {
  color: #FFD700;
  text-decoration: underline;
}