/* Cookie Banner Styles */

/* Cookie banner visibility control using CSS checkbox hack */
#cookie-banner-toggle {
  display: none;
}

#cookie-accept-toggle,
#cookie-reject-toggle,
#cookie-customize-toggle {
  display: none;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--charcoal);
  color: var(--white);
  padding: 20px;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  transition: transform 0.3s ease;
  display: block;
}

/* Hide banner when any action is taken */
#cookie-accept-toggle:checked ~ .cookie-banner,
#cookie-reject-toggle:checked ~ .cookie-banner,
#cookie-customize-toggle:checked ~ .cookie-banner {
  transform: translateY(100%);
  pointer-events: none;
}

/* Show modal when customize is clicked */
#cookie-customize-toggle:checked ~ .cookie-modal {
  display: flex;
}

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

.cookie-text p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn,
.cookie-btn-label {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.cookie-btn.accept,
.cookie-btn-label.accept {
  background-color: var(--teal);
  color: var(--white);
}

.cookie-btn.accept:hover,
.cookie-btn-label.accept:hover {
  background-color: #0F9488;
}

.cookie-btn.reject,
.cookie-btn-label.reject {
  background-color: transparent;
  color: var(--white);
  border: 1px solid var(--white);
}

.cookie-btn.reject:hover,
.cookie-btn-label.reject:hover {
  background-color: var(--white);
  color: var(--charcoal);
}

.cookie-btn.customize,
.cookie-btn-label.customize {
  background-color: var(--amber);
  color: var(--white);
}

.cookie-btn.customize:hover,
.cookie-btn-label.customize:hover {
  background-color: #D97706;
}

.cookie-link {
  color: var(--teal);
  text-decoration: underline;
  font-size: 14px;
  white-space: nowrap;
}

.cookie-link:hover {
  color: var(--white);
}

/* Cookie Modal Styles */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.cookie-modal-content {
  background-color: var(--white);
  padding: 32px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-modal-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 24px;
  text-align: center;
}

.cookie-category {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--border-gray);
  border-radius: 8px;
}

.cookie-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.cookie-toggle input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background-color: var(--border-gray);
  border-radius: 12px;
  position: relative;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--white);
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-slider {
  background-color: var(--teal);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-slider {
  background-color: var(--teal);
  opacity: 0.6;
}

.cookie-info strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--charcoal);
  display: block;
  margin-bottom: 4px;
}

.cookie-info p {
  font-size: 14px;
  color: var(--medium-gray);
  line-height: 1.4;
  margin: 0;
}

.cookie-modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.cookie-modal-buttons .cookie-btn {
  padding: 12px 24px;
  font-size: 16px;
}

/* Close modal functionality */
#cookie-modal-close:checked ~ .cookie-modal {
  display: none;
}

#cookie-modal-close {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .cookie-btn {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
  }
  
  .cookie-modal-content {
    padding: 24px;
    margin: 20px;
  }
  
  .cookie-modal-buttons {
    flex-direction: column;
  }
  
  .cookie-modal-buttons .cookie-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cookie-banner {
    padding: 16px;
  }
  
  .cookie-text p {
    font-size: 13px;
  }
  
  .cookie-btn {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .cookie-buttons {
    gap: 8px;
  }
  
  .cookie-modal-content {
    padding: 20px;
    margin: 10px;
  }
  
  .cookie-modal-content h3 {
    font-size: 20px;
  }
}