/* Cookie Banner Styling - Matcher BilligtRundt.dk's design */

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

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

#cookie-banner.show {
  animation: bannerSlideUp 0.3s ease forwards;
  pointer-events: auto;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(75, 33, 120, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgb(126, 58, 183);
  border-radius: 0.375rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  font-weight: 100;
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

.cookie-text h3 {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cookie-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.cookie-text a {
  color: rgba(167, 139, 250, 1);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-text a:hover {
  color: white;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: rgba(139, 92, 246, 0.8);
  color: white;
  border: 1px solid rgb(126, 58, 183);
}

.cookie-btn-accept:hover {
  background: rgba(139, 92, 246, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.cookie-btn-decline {
  background: rgba(139, 92, 246, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgb(126, 58, 183);
}

.cookie-btn-decline:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
}

.cookie-btn-settings {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgb(126, 58, 183);
}

.cookie-btn-settings:hover {
  background: rgba(139, 92, 246, 0.2);
  color: white;
}

/* Cookie Settings Modal */
#cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(30, 7, 54, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cookie-modal-content {
  background: rgba(75, 33, 120, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgb(126, 58, 183);
  border-radius: 0.375rem;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  font-weight: 100;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookie-settings-modal.show .cookie-modal-content {
  transform: scale(1);
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(147, 51, 234, 0.3);
}

.cookie-modal-header h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
}

.cookie-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.cookie-modal-close:hover {
  background: rgba(139, 92, 246, 0.2);
  color: white;
}

.cookie-category {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

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

.cookie-category-header h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
}

.cookie-category-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
}

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

.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-color: rgba(139, 92, 246, 0.3);
  transition: 0.3s;
  border-radius: 24px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: rgba(255, 255, 255, 0.8);
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: rgba(139, 92, 246, 0.8);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(24px);
  background-color: white;
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-category.required {
  opacity: 0.8;
}

.cookie-category.required .cookie-category-header h3::after {
  content: " (Påkrævet)";
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.cookie-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(147, 51, 234, 0.3);
}

.cookie-modal-actions button {
  flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-text {
    min-width: 100%;
  }
  
  .cookie-buttons {
    width: 100%;
  }
  
  .cookie-btn {
    flex: 1;
    text-align: center;
  }
  
  .cookie-modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .cookie-modal-actions {
    flex-direction: column;
  }
}

/* Smooth scrollbar for modal */
.cookie-modal-content::-webkit-scrollbar {
  width: 8px;
}

.cookie-modal-content::-webkit-scrollbar-track {
  background: rgba(139, 92, 246, 0.1);
  border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 4px;
}

.cookie-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.7);
}

