/* Cookie Consent Banner Styles */
/* Minimal, non-intrusive design - GDPR/KVKK compliant */

.cookie-consent-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: auto;
  z-index: 9999;
  max-width: 380px;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  animation: cookieSlideUp 0.3s ease-out;
}

.cookie-consent-container.hidden {
  display: none;
}

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

.cookie-consent-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cookie-consent-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f4ff;
  border-radius: 10px;
  color: #5b6eea;
}

.cookie-consent-icon svg {
  width: 18px;
  height: 18px;
}

.cookie-consent-text {
  flex: 1;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.8125rem;
  color: #4a5568;
  line-height: 1.5;
}

.cookie-consent-link {
  color: #5b6eea;
  text-decoration: none;
  font-weight: 500;
}

.cookie-consent-link:hover {
  text-decoration: underline;
  color: #4a5bd9;
}

/* Button container */
.cookie-consent-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

/* Base button style */
.cookie-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

/* Accept button - Primary action */
.cookie-consent-btn-accept {
  background: #1a1a2e;
  color: white;
  flex: 1;
}

.cookie-consent-btn-accept:hover {
  background: #2d2d44;
}

/* Decline button - Equal visual weight (GDPR requirement) */
.cookie-consent-btn-decline {
  background: #f1f5f9;
  color: #475569;
  flex: 1;
}

.cookie-consent-btn-decline:hover {
  background: #e2e8f0;
}

/* Settings button - Text link style */
.cookie-consent-btn-settings {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 0;
  margin-top: 0.625rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.cookie-consent-btn-settings:hover {
  color: #5b6eea;
}

.cookie-consent-btn-settings svg {
  width: 13px;
  height: 13px;
  margin-right: 0.25rem;
}

/* ==================== Modal Styles ==================== */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: cookieFadeIn 0.2s ease-out;
}

.cookie-modal-overlay.hidden {
  display: none;
}

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

.cookie-modal {
  background: white;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: cookieModalSlideUp 0.25s ease-out;
}

@keyframes cookieModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.cookie-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  padding: 0.375rem;
  cursor: pointer;
  color: #94a3b8;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal-close:hover {
  background: #f1f5f9;
  color: #64748b;
}

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

.cookie-modal-intro {
  margin: 0 0 1.25rem 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.6;
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-category {
  padding: 0.875rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.15s ease;
}

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

.cookie-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.cookie-category-info {
  display: flex;
  gap: 0.625rem;
  flex: 1;
}

.cookie-category-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.cookie-category-icon svg {
  width: 16px;
  height: 16px;
}

.cookie-category-icon.active {
  background: #5b6eea;
  border-color: transparent;
  color: white;
}

.cookie-category-text h4 {
  margin: 0 0 0.125rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.cookie-category-text p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.cookie-category-toggle {
  flex-shrink: 0;
  padding-top: 0.125rem;
}

.cookie-toggle-required {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: #10b981;
  font-weight: 500;
}

/* Toggle Switch - Compact */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  transition: 0.2s;
  border-radius: 20px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: '';
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #5b6eea;
}

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

.cookie-toggle input:focus + .cookie-toggle-slider {
  box-shadow: 0 0 0 3px rgba(91, 110, 234, 0.2);
}

/* Modal Footer */
.cookie-modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.cookie-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex: 1;
}

.cookie-modal-btn-primary {
  background: #1a1a2e;
  color: white;
}

.cookie-modal-btn-primary:hover {
  background: #2d2d44;
}

.cookie-modal-btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.cookie-modal-btn-secondary:hover {
  background: #e2e8f0;
}

/* ==================== Responsive ==================== */
@media (max-width: 480px) {
  .cookie-consent-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }

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

  .cookie-consent-btn {
    width: 100%;
  }

  .cookie-modal {
    max-height: 90vh;
    margin: 0.5rem;
  }

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

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

  .cookie-category-toggle {
    align-self: flex-end;
  }
}
