/* Cookie Consent Banner & Modal Styles */

.oe-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  padding: 1.5rem;
  z-index: 9999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

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

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

.oe-cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.oe-cookie-banner h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.oe-cookie-banner p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.oe-cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.oe-cookie-btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.oe-cookie-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.oe-cookie-btn-primary {
  background: #2563eb;
  color: white;
}

.oe-cookie-btn-primary:hover {
  background: #1d4ed8;
}

.oe-cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.oe-cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.oe-cookie-btn-ghost {
  background: transparent;
  color: white;
  text-decoration: underline;
}

.oe-cookie-btn-ghost:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Cookie Modal */
.oe-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

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

.oe-cookie-modal {
  background: white;
  color: #1f2937;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: scale(0.95) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

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

.oe-cookie-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.oe-cookie-modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.oe-cookie-modal-close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.oe-cookie-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.oe-cookie-modal-description {
  margin: 0 0 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
}

.oe-cookie-category {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.oe-cookie-category:hover {
  border-color: #d1d5db;
}

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

.oe-cookie-category-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #1f2937;
  margin: 0;
}

.oe-cookie-category-description {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
}

/* Toggle Switch */
.oe-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.oe-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: background-color 0.2s ease;
}

.oe-toggle-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.oe-toggle-switch input:checked + .oe-toggle-slider {
  background-color: #2563eb;
}

.oe-toggle-switch input:checked + .oe-toggle-slider:before {
  transform: translateX(20px);
}

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

.oe-toggle-switch input:focus-visible + .oe-toggle-slider {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.oe-cookie-modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #f9fafb;
}

.oe-cookie-modal-footer .oe-cookie-btn {
  flex: 1;
  min-width: 120px;
}

/* Dark mode support for modal */
@media (prefers-color-scheme: dark) {
  .oe-cookie-modal {
    background: #1f2937;
    color: #f9fafb;
  }

  .oe-cookie-modal-header {
    border-bottom-color: #374151;
  }

  .oe-cookie-modal-close {
    color: #9ca3af;
  }

  .oe-cookie-modal-close:hover {
    background: #374151;
    color: #f9fafb;
  }

  .oe-cookie-modal-description {
    color: #d1d5db;
  }

  .oe-cookie-category {
    border-color: #374151;
  }

  .oe-cookie-category:hover {
    border-color: #4b5563;
  }

  .oe-cookie-category-title {
    color: #f9fafb;
  }

  .oe-cookie-category-description {
    color: #d1d5db;
  }

  .oe-cookie-modal-footer {
    border-top-color: #374151;
    background: #111827;
  }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .oe-cookie-banner {
    padding: 1rem;
  }

  .oe-cookie-banner-content {
    gap: 1rem;
  }

  .oe-cookie-banner h3 {
    font-size: 1rem;
  }

  .oe-cookie-banner p {
    font-size: 0.8125rem;
  }

  .oe-cookie-banner-actions {
    width: 100%;
  }

  .oe-cookie-btn {
    flex: 1;
    text-align: center;
  }

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

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

/* Hidden state */
.oe-hidden {
  display: none !important;
}
