/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  margin: 0 auto;
  width: auto;
  max-width: 1200px;
  z-index: 1000;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease;
  pointer-events: none;
}

.cookie-banner.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
}

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

.cookie-banner-text h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  font-family: var(--font-heading);
}

.cookie-banner-text p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.625;
  margin: 0;
}

.cookie-banner-text-short {
  display: none;
}

.cookie-banner-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-banner-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 0.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.cookie-banner-close:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.cookie-banner-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Cookie Buttons */
.cookie-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-body);
}

.cookie-btn-primary {
  background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
  color: #fff;
}

.cookie-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.cookie-btn-secondary,
.cookie-btn-reject {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.cookie-btn-secondary:hover,
.cookie-btn-reject:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

/* Cookie Settings Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

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

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.cookie-modal-content {
  background-color: var(--bg-card);
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
}

.cookie-modal-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.cookie-modal-header h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  font-family: var(--font-heading);
}

.cookie-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 0.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cookie-modal-close:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.cookie-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.cookie-modal-description {
  color: var(--text-secondary);
  line-height: 1.625;
  margin: 0;
  font-size: 0.9375rem;
}

.cookie-modal-description a {
  color: var(--accent-light);
  text-decoration: none;
}

.cookie-modal-description a:hover {
  text-decoration: underline;
}

.cookie-modal-body {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 200px);
}

/* Cookie Categories */
.cookie-categories {
  margin-top: 1.5rem;
}

.cookie-category {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--bg-secondary);
}

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

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

.cookie-category-info h4 {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  font-family: var(--font-heading);
}

.cookie-category-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.625;
}

.cookie-category-details {
  margin-top: 1rem;
}

.cookie-category-details p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.625;
  margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.5rem;
  background-color: var(--border-color);
  border-radius: 9999px;
  transition: all 0.2s;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 48px;
  min-height: 24px;
}

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

.cookie-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background-color: #fff;
  border-radius: 9999px;
  transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  transform: translateX(1.5rem);
}

.cookie-toggle:has(input:checked) {
  background-color: var(--accent-primary);
}

.cookie-toggle:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-toggle-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Modal Footer */
.cookie-modal-footer {
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    max-width: 100%;
    margin: 0;
  }

  .cookie-banner-content {
    display: block;
    padding: 0.75rem;
  }

  .cookie-banner-text {
    margin-bottom: 0.75rem;
    padding-right: 2rem;
  }

  .cookie-banner-text h3 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }

  .cookie-banner-text p {
    font-size: 0.75rem;
    margin-bottom: 0;
  }

  .cookie-banner-text-full {
    display: none;
  }

  .cookie-banner-text-short {
    display: block;
    margin: 0;
  }

  .cookie-banner-actions {
    display: grid;
    gap: 0.5rem;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .cookie-banner-actions .cookie-btn {
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 600;
    justify-content: center;
    padding: 0.75rem;
  }

  .cookie-banner-actions .cookie-btn-primary {
    grid-column: 1 / -1;
  }

  .cookie-banner-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
  }

  .cookie-banner-close svg {
    width: 1rem;
    height: 1rem;
  }

  .cookie-modal-footer {
    padding: 1.5rem;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .cookie-modal-footer .cookie-btn {
    flex: 1 1 auto;
    min-width: 140px;
    min-height: 44px;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

@media (min-width: 769px) {
  .cookie-banner-text-short {
    display: none;
  }

  .cookie-banner-text-full {
    display: block;
  }
}

@media (max-width: 480px) {
  .cookie-modal-header {
    padding: 1rem;
  }

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

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

  .cookie-category {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .cookie-modal-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .cookie-modal-footer .cookie-btn {
    width: 100%;
    min-height: 48px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 0.375rem;
  }

  .cookie-toggle {
    width: 3rem;
    height: 1.5rem;
    min-width: 48px;
    min-height: 24px;
  }

  .cookie-toggle-slider {
    width: 1.25rem;
    height: 1.25rem;
  }
}
