/**
 * Cookie Policy Page & Banner Styles
 * Modern, minimal, GDPR-compliant styling
 */

/* Cookie Policy Page Content */
.cookie-policy-content {
  color: #374151;
  line-height: 1.8;
}

.cookie-policy-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.cookie-policy-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.cookie-policy-content p {
  margin-bottom: 1.25rem;
  color: #4b5563;
}

.cookie-policy-content ul,
.cookie-policy-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.cookie-policy-content li {
  margin-bottom: 0.75rem;
  color: #4b5563;
}

.cookie-policy-content code {
  background-color: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: #dc2626;
}

.cookie-policy-content a {
  color: #6366f1;
  text-decoration: underline;
  transition: color 0.2s;
}

.cookie-policy-content a:hover {
  color: #4f46e5;
}

/* Cookie Table */
.cookie-list-table {
  margin: 2rem 0;
  overflow-x: auto;
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  overflow: hidden;
}

.cookie-table thead {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
}

.cookie-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cookie-table td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #374151;
}

.cookie-table tbody tr:hover {
  background-color: #f9fafb;
}

.cookie-table tbody tr:last-child td {
  border-bottom: none;
}

/* Cookie Badges */
.cookie-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cookie-badge.essential {
  background-color: #dbeafe;
  color: #1e40af;
}

.cookie-badge.analytics {
  background-color: #d1fae5;
  color: #065f46;
}

.cookie-badge.marketing {
  background-color: #fce7f3;
  color: #9f1239;
}

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

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

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

.cookie-banner-text {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #e5e7eb;
}

.cookie-banner-text a {
  color: #60a5fa;
  text-decoration: underline;
  font-weight: 500;
}

.cookie-banner-text a:hover {
  color: #93c5fd;
}

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

.cookie-btn {
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #3b82f6;
  color: #ffffff;
}

.cookie-btn-accept:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

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

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-customize {
  background: #10b981;
  color: #ffffff;
}

.cookie-btn-customize:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Cookie Settings Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.cookie-modal.show {
  display: flex;
}

.cookie-modal-content {
  background: #ffffff;
  border-radius: 0.75rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.cookie-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.cookie-modal-close:hover {
  color: #111827;
}

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

.cookie-modal-description {
  color: #4b5563;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.cookie-settings-group {
  margin-bottom: 1.5rem;
}

.cookie-settings-group-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.cookie-settings-group-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.cookie-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.cookie-toggle-label {
  flex: 1;
  cursor: pointer;
}

.cookie-toggle-label-text {
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.25rem;
  display: block;
}

.cookie-toggle-label-desc {
  font-size: 0.875rem;
  color: #6b7280;
}

.cookie-toggle-switch {
  position: relative;
  width: 3rem;
  height: 1.5rem;
  background: #d1d5db;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.cookie-toggle-switch.active {
  background: #10b981;
}

.cookie-toggle-switch::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle-switch.active::after {
  transform: translateX(1.5rem);
}

.cookie-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

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

.cookie-modal-btn {
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cookie-modal-btn-save {
  background: #6366f1;
  color: #ffffff;
}

.cookie-modal-btn-save:hover {
  background: #4f46e5;
}

.cookie-modal-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.cookie-modal-btn-cancel:hover {
  background: #e5e7eb;
}

/* Essential cookies - always enabled, disabled toggle */
.cookie-toggle.disabled .cookie-toggle-switch {
  background: #9ca3af;
  cursor: not-allowed;
}

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

/* Responsive */
@media (max-width: 640px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
  }
  
  .cookie-modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  .cookie-table {
    font-size: 0.75rem;
  }
  
  .cookie-table th,
  .cookie-table td {
    padding: 0.5rem;
  }
}

/* Print Styles */
@media print {
  .cookie-banner,
  .cookie-modal {
    display: none !important;
  }
}

