/* Silktide Consent Manager - BGKY Guide Custom Brand Stylesheet */
:root {
  --silktide-primary: #0e4d67;
  --silktide-primary-hover: #0a374a;
  --silktide-accent: #e38530;
  --silktide-bg: #ffffff;
  --silktide-text: #111827;
  --silktide-muted: #4b5563;
  --silktide-border: #e5e7eb;
  --silktide-radius: 12px;
  --silktide-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Banner Overlay and Container */
.silktide-banner-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999990;
  padding: 1rem;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.silktide-banner {
  pointer-events: auto;
  width: 100%;
  max-width: 1100px;
  background-color: var(--silktide-bg);
  color: var(--silktide-text);
  border: 1px solid var(--silktide-border);
  border-radius: var(--silktide-radius);
  box-shadow: var(--silktide-shadow);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  animation: silktide-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes silktide-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.silktide-banner-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.silktide-banner-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--silktide-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.silktide-banner-desc {
  font-size: 0.875rem;
  line-height: 1.4rem;
  color: var(--silktide-muted);
  margin: 0;
}

.silktide-banner-links {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.silktide-banner-links a {
  color: var(--silktide-primary);
  text-decoration: underline;
  font-weight: 600;
  margin-right: 1rem;
}

.silktide-banner-links a:hover,
.silktide-banner-links a:focus {
  color: var(--silktide-accent);
}

/* Button Group */
.silktide-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
  justify-content: flex-end;
}

.silktide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
  outline-offset: 2px;
  white-space: nowrap;
}

.silktide-btn:focus-visible {
  outline: 2px solid var(--silktide-primary);
}

.silktide-btn-accept {
  background-color: var(--silktide-primary);
  color: #ffffff;
}

.silktide-btn-accept:hover {
  background-color: var(--silktide-primary-hover);
}

.silktide-btn-reject {
  background-color: #f3f4f6;
  color: var(--silktide-text);
  border-color: #d1d5db;
}

.silktide-btn-reject:hover {
  background-color: #e5e7eb;
}

.silktide-btn-manage {
  background-color: transparent;
  color: var(--silktide-primary);
  border-color: var(--silktide-border);
}

.silktide-btn-manage:hover {
  background-color: #f0f5f7;
  border-color: var(--silktide-primary);
}

/* Modal Overlay & Preferences Panel */
.silktide-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999995;
  background-color: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: silktide-fade-in 0.2s ease-out;
}

@keyframes silktide-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.silktide-modal {
  background-color: var(--silktide-bg);
  color: var(--silktide-text);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  animation: silktide-pop-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes silktide-pop-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.silktide-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--silktide-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.silktide-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--silktide-primary);
  margin: 0;
}

.silktide-modal-close {
  background: transparent;
  border: none;
  color: var(--silktide-muted);
  font-size: 1.5rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.silktide-modal-close:hover {
  background-color: #f3f4f6;
  color: var(--silktide-text);
}

.silktide-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.silktide-category-card {
  background-color: #f8fafc;
  border: 1px solid var(--silktide-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.silktide-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.silktide-category-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--silktide-text);
}

.silktide-category-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background-color: #e2e8f0;
  color: #475569;
}

.silktide-category-status.always-active {
  background-color: #e0f2fe;
  color: #0369a1;
}

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

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

.silktide-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 24px;
}

.silktide-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

input:checked + .silktide-slider {
  background-color: var(--silktide-primary);
}

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

input:focus-visible + .silktide-slider {
  outline: 2px solid var(--silktide-accent);
}

.silktide-category-desc {
  font-size: 0.8125rem;
  line-height: 1.35rem;
  color: var(--silktide-muted);
  margin: 0;
}

.silktide-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--silktide-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: #ffffff;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .silktide-banner {
    padding: 1rem;
  }
  .silktide-banner-actions {
    flex-direction: column;
    width: 100%;
  }
  .silktide-btn {
    width: 100%;
  }
}
