/* ═══════════════════════════════════════════════════════════════════════════ */
/* COOKIE CONSENT BANNER & MODAL                                               */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Cookie Banner */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: linear-gradient(135deg, rgba(59,130,246,0.95), rgba(249,115,22,0.95));
  backdrop-filter: blur(10px);
  border-top: 2px solid rgba(255,255,255,0.2);
  padding: 1.5rem 2rem;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.2);
  animation: slideUp 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

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

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

.cookie-banner-content {
  flex: 1;
  min-width: 280px;
  color: white;
}

.cookie-banner-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-family: 'Syne', sans-serif;
}

.cookie-banner-content p {
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.95;
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Cookie Buttons */
.cookie-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.cookie-btn-primary {
  background: white;
  color: #3b82f6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

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

.cookie-btn-secondary:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
}

.cookie-btn-tertiary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.5);
}

.cookie-btn-tertiary:hover {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
}

/* Cookie Modal */
.cookie-modal-open {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

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

.cookie-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.cookie-modal-content {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideDown 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

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

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

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #182133;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

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

#cookie-modal-close:hover {
  color: #182133;
}

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

.cookie-category {
  margin-bottom: 1.8rem;
}

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

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

.cookie-category-header label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  flex: 1;
}

.cookie-category-header input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.cookie-category-header input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-category-name {
  font-weight: 600;
  color: #182133;
  font-size: 1rem;
}

.cookie-required {
  display: inline-block;
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cookie-category-desc {
  color: #4d5e7e;
  font-size: 0.9rem;
  margin: 0 0 0.8rem 0;
  line-height: 1.5;
}

.cookie-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.cookie-item {
  background: rgba(59,130,246,0.08);
  color: #4d5e7e;
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border-left: 2px solid rgba(59,130,246,0.3);
}

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

/* Responsive */
@media (max-width: 900px) {
  #cookie-consent-banner {
    padding: 1.25rem 1.5rem;
  }

  .cookie-banner-inner {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .cookie-banner-actions {
    justify-content: stretch;
  }

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

  .cookie-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    margin: 1rem;
  }

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

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

  .cookie-modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column-reverse;
  }

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

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

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

  .cookie-banner-content p {
    font-size: 0.85rem;
  }

  .cookie-banner-actions {
    width: 100%;
    gap: 0.6rem;
  }

  .cookie-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    flex: 1;
  }

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

  #cookie-modal-close {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-required {
    margin-top: 0.5rem;
  }
}
