/**
 * Wayplot Cookie Consent Styles
 * Matches the Wayplot design system
 */

/* ============================================
   COOKIE BANNER
   ============================================ */
#wayplot-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#wayplot-cookie-banner.visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.cookie-banner-container {
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

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

.cookie-banner-text h3 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.cookie-banner-text p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-banner-links {
  width: 100%;
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cookie-banner-links a {
  color: #f59e0b;
  text-decoration: none;
}

.cookie-banner-links a:hover {
  text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */
.cookie-btn {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn-settings {
  background: transparent;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.cookie-btn-settings:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

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

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

.cookie-btn-accept {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.cookie-btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* ============================================
   SETTINGS MODAL
   ============================================ */
#wayplot-cookie-settings {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#wayplot-cookie-settings.visible {
  opacity: 1;
  visibility: visible;
}

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

.cookie-modal-container {
  position: relative;
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#wayplot-cookie-settings.visible .cookie-modal-container {
  transform: scale(1);
}

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

.cookie-modal-header h2 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.cookie-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.cookie-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.cookie-modal-intro {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.cookie-category {
  background: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

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

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

.cookie-category-info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.cookie-category-info p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 28px;
  transition: 0.3s;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

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

.cookie-toggle.disabled .cookie-toggle-slider {
  background: #10b981;
  cursor: not-allowed;
}

.cookie-toggle.disabled .cookie-toggle-slider:before {
  transform: translateX(20px);
}

.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}

/* ============================================
   MANAGE COOKIES LINK (for footer)
   ============================================ */
.manage-cookies-link {
  cursor: pointer;
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.manage-cookies-link:hover {
  color: #f59e0b;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .cookie-banner-content {
    padding: 16px;
    gap: 16px;
  }
  
  .cookie-banner-text h3 {
    font-size: 16px;
  }
  
  .cookie-banner-text p {
    font-size: 13px;
  }
  
  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-modal-container {
    max-height: 85vh;
    border-radius: 16px;
  }
  
  .cookie-modal-header {
    padding: 16px 20px;
  }
  
  .cookie-modal-body {
    padding: 16px 20px;
  }
  
  .cookie-modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }
  
  .cookie-modal-footer .cookie-btn {
    width: 100%;
  }
}

