/**
 * Cookie Consent Banner Styles for MindSpace
 * GDPR-compliant cookie consent UI
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #273880 0%, #45668E 100%);
  color: white;
  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;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 300px;
}

.cookie-consent-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.cookie-consent-text p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.95;
}

.cookie-consent-links {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.cookie-consent-links a {
  color: white;
  text-decoration: underline;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.cookie-consent-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: white;
  color: #273880;
}

.cookie-btn-accept:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-btn-decline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

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

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

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

.cookie-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
}

.cookie-modal.show .cookie-modal-content {
  transform: scale(1);
}

.cookie-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #273880 0%, #45668E 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

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

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.cookie-category {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

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

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

.cookie-category p {
  margin: 0.5rem 0;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-details {
  font-size: 0.875rem !important;
  color: #6b7280 !important;
  margin-top: 0.75rem !important;
  padding: 0.75rem;
  background: white;
  border-radius: 4px;
  border-left: 3px solid #273880;
}

/* Toggle Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
  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: #cbd5e1;
  transition: 0.3s;
  border-radius: 28px;
}

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

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

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

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

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

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

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

  .cookie-btn {
    width: 100%;
    padding: 1rem;
  }

  .cookie-modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .cookie-category-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cookie-switch {
    align-self: flex-start;
  }
}

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

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

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

  .cookie-modal-header {
    padding: 1rem;
  }

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

  .cookie-modal-footer {
    padding: 1rem;
  }
}
