/* Silktide Cookie Consent Manager Styles */

/* Cookie Icon Button */
.silktide-cookie-icon {
  position: fixed;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #007bff;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.silktide-cookie-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.silktide-cookie-icon.bottom-left {
  bottom: 20px;
  left: 20px;
}

.silktide-cookie-icon.bottom-right {
  bottom: 20px;
  right: 20px;
}

.silktide-cookie-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* Cookie Banner */
.silktide-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.2);
  padding: 24px;
  transition: transform 0.3s ease;
}

.silktide-cookie-banner.hidden {
  transform: translateY(100%);
}

.silktide-cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
}

.silktide-cookie-banner p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.silktide-cookie-banner a {
  color: #007bff;
  text-decoration: underline;
}

.silktide-cookie-banner-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.silktide-cookie-banner button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.silktide-btn-accept-all {
  background: #007bff;
  color: #fff;
}

.silktide-btn-accept-all:hover {
  background: #0056b3;
}

.silktide-btn-reject {
  background: #6c757d;
  color: #fff;
}

.silktide-btn-reject:hover {
  background: #545b62;
}

.silktide-btn-preferences {
  background: transparent;
  color: #007bff;
  border: 1px solid #007bff;
}

.silktide-btn-preferences:hover {
  background: #f8f9fa;
}

/* Cookie Preferences Modal */
.silktide-cookie-preferences {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
}

.silktide-cookie-preferences.active {
  display: flex;
}

.silktide-cookie-preferences-content {
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.silktide-cookie-preferences-header {
  padding: 24px;
  border-bottom: 1px solid #e9ecef;
}

.silktide-cookie-preferences-header h2 {
  margin: 0 0 12px;
  font-size: 24px;
  color: #333;
}

.silktide-cookie-preferences-header p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.silktide-cookie-preferences-body {
  padding: 24px;
}

.silktide-cookie-type {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e9ecef;
}

.silktide-cookie-type:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.silktide-cookie-type-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.silktide-cookie-type-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.silktide-cookie-toggle {
  position: relative;
  width: 48px;
  height: 24px;
}

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

.silktide-cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.silktide-cookie-toggle-slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.silktide-cookie-toggle input:checked + .silktide-cookie-toggle-slider {
  background-color: #007bff;
}

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

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

.silktide-cookie-type-description {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

.silktide-cookie-preferences-footer {
  padding: 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.silktide-cookie-preferences-footer .silktide-btn-save {
  background: #007bff;
  color: #fff;
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.silktide-cookie-preferences-footer .silktide-btn-save:hover {
  background: #0056b3;
}

.silktide-cookie-preferences-footer a {
  font-size: 12px;
  color: #007bff;
  text-decoration: none;
}

.silktide-cookie-preferences-footer a:hover {
  text-decoration: underline;
}

/* Background Overlay */
.silktide-cookie-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9997;
  background: rgba(0, 0, 0, 0.3);
  display: none;
}

.silktide-cookie-background.active {
  display: block;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .silktide-cookie-banner {
    background: #1e1e1e;
  }

  .silktide-cookie-banner p {
    color: #e0e0e0;
  }

  .silktide-cookie-preferences-content {
    background: #1e1e1e;
  }

  .silktide-cookie-preferences-header h2,
  .silktide-cookie-type-header h3 {
    color: #e0e0e0;
  }

  .silktide-cookie-preferences-header p,
  .silktide-cookie-type-description {
    color: #b0b0b0;
  }

  .silktide-cookie-preferences-header,
  .silktide-cookie-type,
  .silktide-cookie-preferences-footer {
    border-color: #333;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .silktide-cookie-banner {
    padding: 16px;
  }

  .silktide-cookie-banner-buttons {
    flex-direction: column;
  }

  .silktide-cookie-banner button {
    width: 100%;
  }

  .silktide-cookie-preferences-content {
    max-height: 90vh;
  }

  .silktide-cookie-preferences-footer {
    flex-direction: column;
  }
}
