#silktide-wrapper {
  --focus: 0 0 0 2px #ffffff, 0 0 0 4px #fff, 0 0 0 6px #ffffff;
  --boxShadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
  --fontFamily: Helvetica Neue, Segoe UI, Arial, sans-serif;
  --primaryColor: #6d28d9; /* Changed to purple */
  --backgroundColor: #ffffff;
  --textColor: #4b494b;
  --backdropBackgroundColor: #00000033;
  --backdropBackgroundBlur: 0px;
  --cookieIconColor: #533be2;
  --cookieIconBackgroundColor: #ffffff;
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  pointer-events: none;
  border: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Links */
#silktide-wrapper a {
  all: unset;
  display: inline-block;
  color: var(--primaryColor);
  text-decoration: underline;
}

#silktide-wrapper a:hover {
  cursor: pointer;
  color: var(--textColor);
}

/* Focus Styles */
#silktide-wrapper a:focus,
#silktide-wrapper #silktide-banner button:focus,
#silktide-wrapper #silktide-modal button:focus,
#silktide-wrapper #silktide-cookie-icon:focus {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 5px;
}

/* Updated Button Styles */
#silktide-wrapper .st-button {
  height: 44px; /* Touch-friendly height */
  padding: 10px 20px;
  font-size: 14px; /* Updated font size */
  line-height: 24px;
  min-width: 120px; /* Consistent button sizing */
  max-width: fit-content;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 5px;
  box-sizing: border-box;
}

/* Primary button - Purple */
#silktide-wrapper .st-button--primary {
  color: var(--backgroundColor);
  background-color: var(--primaryColor);
  border: 2px solid var(--primaryColor);
}

#silktide-wrapper .st-button--primary:hover {
  background-color: #5b21b6; /* Darker purple on hover */
  border-color: #5b21b6;
}

/* Secondary button - Gray with border */
#silktide-wrapper .st-button--secondary {
  background-color: var(--backgroundColor);
  color: #6b7280; /* Gray text */
  border: 2px solid #d1d5db; /* Gray border */
}

#silktide-wrapper .st-button--secondary:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

/* Banner */
#silktide-banner {
  font-family: var(--fontFamily);
  color: var(--textColor);
  background-color: var(--backgroundColor);
  box-sizing: border-box;
  padding: 32px;
  border-radius: 5px;
  pointer-events: auto;
  border: 0px;
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 600px;
  max-width: calc(100% - 32px);
  transform: translate(0, -20px);
  opacity: 0;
  animation: silktide-slideInDown 350ms ease-out forwards;
  animation-delay: 0.3s;
  box-shadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
}

#silktide-banner.center {
  top: 50%;
  left: 50%;
  bottom: auto;
  right: auto;
  position: fixed;
  transform: translate(-50%, calc(-50% - 20px));
  animation: silktide-slideInDown-center 350ms ease-out forwards;
}

#silktide-banner.bottomLeft {
  bottom: 16px;
  left: 16px;
  position: fixed;
}

#silktide-banner.bottomCenter {
  bottom: 16px;
  left: 50%;
  position: fixed;
  transform: translate(-50%, -20px);
  animation: silktide-slideInDown-bottomCenter 350ms ease-out forwards;
}

#silktide-banner .preferences {
  display: none !important; /* Hidden since Manage Cookies serves this purpose */
  gap: 5px;
  border: none;
  padding: 0px;
  background-color: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  height: 44px;
  align-items: center;
  min-width: 120px;
}

#silktide-banner .preferences span {
  display: block;
  white-space: nowrap;
  text-decoration: underline;
}

#silktide-banner .preferences span:hover {
  color: #374151;
}

#silktide-banner .preferences:after {
  display: block;
  content: ">";
  text-decoration: none;
}

#silktide-banner p {
  font-size: 16px;
  line-height: 24px;
  margin: 0px 0px 15px;
}

#silktide-banner a {
  display: inline-block;
  color: var(--primaryColor);
  text-decoration: underline;
  background-color: var(--backgroundColor);
}

#silktide-banner a:hover {
  color: var(--textColor);
}

#silktide-banner .actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 16px;
  flex-direction: column;
  margin-top: 24px;
}

@media (min-width: 600px) {
  #silktide-banner .actions {
    flex-direction: row-reverse;
    align-items: center;
    display: flex;
    justify-content: flex-end;
  }
}

#silktide-banner .actions-row {
  display: flex;
  gap: 16px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start; /* Changed from space-between since we removed logo */
  flex-grow: 1;
}

/* Hide cookie icon completely */
#silktide-cookie-icon {
  display: none !important;
}

/* Modal styles */
#silktide-modal {
  display: none;
  pointer-events: auto;
  width: 600px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  border: 0px;
  position: fixed;
  bottom: 16px;
  right: 16px;
  transform: translate(0px, 20px);
  opacity: 0;
  animation: silktide-slideInUp 350ms ease-out forwards;
  box-shadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
  font-family: var(--fontFamily);
  color: var(--textColor);
  flex-direction: column;
  padding: 30px;
  background-color: var(--backgroundColor);
  border-radius: 5px;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Backdrop */
#silktide-backdrop {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--backdropBackgroundColor);
  backdrop-filter: blur(var(--backdropBackgroundBlur));
  pointer-events: all;
}

/* Animations */
@keyframes silktide-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes silktide-slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes silktide-slideInDown-center {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 20px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes silktide-slideInDown-bottomCenter {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes silktide-slideInUp {
  from {
    opacity: 0;
    transform: translate(0px, 20px);
  }
  to {
    opacity: 1;
    transform: translate(0px, 0px);
  }
}

/* Modal Header */
#silktide-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e7eb;
}

#silktide-modal header h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--textColor);
}

#silktide-modal .modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: color 0.2s;
}

#silktide-modal .modal-close:hover {
  color: #374151;
}

#silktide-modal .modal-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Modal description */
#silktide-modal > p {
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

/* Cookie Preferences Section */
#cookie-preferences {
  margin: 0 0 24px 0;
}

#cookie-preferences fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin: 0 0 16px 0;
}

#cookie-preferences fieldset:last-child {
  margin-bottom: 0;
}

#cookie-preferences legend {
  font-size: 16px;
  font-weight: 600;
  color: var(--textColor);
  padding: 0 8px;
  margin-bottom: 8px;
}

#cookie-preferences .cookie-type-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

#cookie-preferences .cookie-type-description {
  flex: 1;
  font-size: 14px;
  line-height: 20px;
  color: #6b7280;
}

#cookie-preferences .cookie-type-description p {
  margin: 0;
}

/* Toggle Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__pill {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 14px;
}

.switch input:checked + .switch__pill {
  background-color: var(--primaryColor);
}

.switch input:disabled + .switch__pill {
  background-color: #e5e7eb;
  cursor: not-allowed;
  opacity: 0.6;
}

.switch__dot {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch input:checked ~ .switch__dot {
  transform: translateX(24px);
}

.switch input:disabled ~ .switch__dot {
  cursor: not-allowed;
}

.switch__off,
.switch__on {
  display: none;
}

/* Modal Footer */
#silktide-modal footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

#silktide-modal footer .st-button {
  min-width: 140px;
}

/* Mobile Responsive Styles */
@media (max-width: 640px) {
  #silktide-modal {
    width: 100%;
    max-width: 100%;
    bottom: 0;
    right: 0;
    left: 0;
    border-radius: 12px 12px 0 0;
    max-height: 90vh;
  }

  #cookie-preferences .cookie-type-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  #cookie-preferences fieldset {
    padding: 16px;
  }

  #silktide-modal footer {
    flex-direction: column-reverse;
  }

  #silktide-modal footer button {
    width: 100%;
  }
}

