/* 
  Silktide Consent Manager - https://silktide.com/consent-manager/  

  Styles are at risked of being overridden by styles coming from the site the consent manager is used on.
  To help prevent this, global wrapper elements are prefixed with "#silktide-"
*/

/* --------------------------------
  Global Styles - These elements exist in the main DOM and styling is limited to positioning and animation
-------------------------------- */
/* Wrapper (Global) */
#silktide-wrapper {
  --focus: 0 0 0 2px rgba(0, 255, 235, 0.5), 0 0 0 4px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(0, 255, 235, 0.3);
  --boxShadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 255, 235, 0.15);
  --headingFont: "ArdelaEdgeX02", Helvetica Neue, Segoe UI, Arial, sans-serif;
  --bodyFont: Helvetica Neue, Segoe UI, Arial, sans-serif;
  --primaryColor: #00FFEB;
  --secondaryColor: #42A294;
  --backgroundColor: rgba(7, 2, 25, 0.95);
  --textColor: #e5f6fa;
  --backdropBackgroundColor: rgba(0, 0, 0, 0.7);
  --backdropBackgroundBlur: 16px;
  --cookieIconColor: #00ffeb;
  --cookieIconBackgroundColor: #070219;
  --borderGlowColor: rgba(0, 255, 235, 0.3);
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  pointer-events: none;
  border: 0px;
  display: flex;
  justify-content: center;
  align-items: center
}

/* Backdrop (Global) */
#silktide-backdrop-global {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  border: 0px;
  display: none;
}

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

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

#silktide-wrapper .silktide-logo {
  display: none !important;
}

/* --------------------------------
  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;
}

#silktide-wrapper #silktide-cookie-icon:focus {
  border-radius: 50%;
}

/* --------------------------------
  General Styles
-------------------------------- */

#silktide-wrapper .st-button {
  color: var(--backgroundColor);
  background-color: var(--primaryColor);
  border: 2px solid var(--primaryColor);
  padding: 8px 16px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  border-radius: 5px;
  font-family: var(--bodyFont);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 100px;
  min-height: 40px;
  width: auto;
  box-sizing: border-box;
}

/* Default primary button style (used by .accept-all) */
#silktide-wrapper .st-button--primary,
#silktide-wrapper .accept-all,
#silktide-wrapper .preferences-accept-all {
  box-shadow: 0 0 15px rgba(0, 255, 235, 0.4);
  text-transform: uppercase;
  font-size: 15px;
  position: relative;
  background-color: var(--primaryColor);
  color: var(--backgroundColor);
  border: 2px solid var(--primaryColor);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Shine effect for primary button */
#silktide-wrapper .st-button--primary::before,
#silktide-wrapper .accept-all::before,
#silktide-wrapper .preferences-accept-all::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right, 
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  transition: all 0.5s;
}

#silktide-wrapper .st-button--primary:hover::before,
#silktide-wrapper .accept-all:hover::before,
#silktide-wrapper .preferences-accept-all:hover::before {
  animation: shine 1.5s infinite;
}

#silktide-wrapper .st-button--primary:hover,
#silktide-wrapper .accept-all:hover,
#silktide-wrapper .preferences-accept-all:hover {
  background-color: var(--backgroundColor);
  color: var(--primaryColor);
  box-shadow: 0 0 20px rgba(0, 255, 235, 0.6);
  transform: translateY(-3px);
}

/* Secondary button style (used by .reject-all and .preferences) */
#silktide-wrapper .st-button--secondary,
#silktide-wrapper .reject-all,
#silktide-wrapper .preferences-reject-all {
  background-color: transparent;
  color: var(--primaryColor);
  background-color: rgba(0, 255, 235, 0.1);
  border: 1px solid transparent;
  box-shadow: none;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 15px;
  white-space: nowrap;
}

#silktide-wrapper .st-button--secondary:hover,
#silktide-wrapper .reject-all:hover,
#silktide-wrapper .preferences-reject-all:hover {
  
  color: var(--primaryColor);
  border-color: var(--primaryColor);
  box-shadow: 0 0 10px rgba(0, 255, 235, 0.2);
  transform: translateY(-1px);
}

/* --------------------------------
  Banner
-------------------------------- */
#silktide-banner {
  font-family: var(--bodyFont);
  color: var(--textColor);
  background-color: var(--backgroundColor);
  box-sizing: border-box;
  padding: 24px;
  border-radius: 8px;
  pointer-events: auto;
  border: 1px solid rgba(0, 255, 235, 0.2);
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: auto;
  transform: translate(0, -20px);
  opacity: 0;
  animation: silktide-slideInDown 350ms ease-out forwards;
  animation-delay: 0.3s;
  box-shadow: var(--boxShadow);
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  max-width: 600px;
}

#silktide-banner:focus {
  border-radius: 50%;
}

#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: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background-color: rgba(0, 255, 235, 0.1);
  border-color: transparent;
  padding: 8px 16px;
  border-radius: 5px;
  background-color: transparent;
  color: var(--primaryColor);
  cursor: pointer;
  font-size: 15px;
  font-family: var(--bodyFont);
  font-weight: 400;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  min-height: 46px;
  min-width: 100px;
  width: auto;
  box-sizing: border-box;
  text-transform: uppercase;
}

#silktide-banner .preferences:hover {
  border: 1px solid var(--primaryColor);
  background-color: rgba(0, 255, 235, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 235, 0.2);
  transform: translateY(-1px);
}

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

#silktide-banner .preferences span:hover {
  color: var(--primaryColor);
}

#silktide-banner p {
  font-size: 16px;
  line-height: 24px;
  margin: 0px 0px 15px;
  text-shadow: 0 0 5px rgba(0, 255, 235, 0.2);
}

#silktide-banner h1,
#silktide-modal h1 {
  font-family: var(--headingFont);
  color: var(--primaryColor);
  text-shadow: 0 0 10px rgba(0, 255, 235, 0.5);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px 0;
  letter-spacing: 1px;
}

/* Add an animated border glow effect */
#silktide-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(
    45deg,
    rgba(0, 255, 235, 0.1) 0%,
    rgba(0, 255, 235, 0.4) 25%,
    rgba(0, 255, 235, 0.1) 50%,
    rgba(0, 255, 235, 0.4) 75%,
    rgba(0, 255, 235, 0.1) 100%
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: borderGlow 4s linear infinite;
}

@keyframes borderGlow {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

/* Animation for button shine effect */
@keyframes shine {
  0% {
    left: -100%;
  }
  20% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* Update actions for better mobile styling */
#silktide-banner .actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  width: 100%;
}

/* Desktop and tablet layout */
@media (min-width: 600px) {
  #silktide-banner .actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }
  /* All buttons should have consistent size */
  #silktide-banner .accept-all,
  #silktide-banner .preferences-accept-all,
  #silktide-banner .reject-all,
  #silktide-banner .preferences-reject-all,
  #silktide-banner .preferences {
    min-width: 140px;
    min-height: 46px;
  }
}

/* Special mobile styling for better UX */
@media (max-width: 599px) {
  #silktide-banner {
    padding: 24px;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
  }
  
  #silktide-banner .actions {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
  }
  
  #silktide-banner .actions-row {
    width: 100%;
    margin-top: 4px;
  }
  
  /* Consistent styling for all buttons */
  #silktide-banner .accept-all,
  #silktide-banner .preferences-accept-all,
  #silktide-banner .reject-all,
  #silktide-banner .preferences-reject-all,
  #silktide-banner .preferences {
    width: 100%;
    min-height: 46px;
    margin-bottom: 0;
    white-space: nowrap;
    max-width: 100%;
  }
}

#silktide-banner .actions-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: end;
  flex-grow: 1;
  width: auto;
}

/* --------------------------------
  Modal
-------------------------------- */
#silktide-modal {
  display: none;
  pointer-events: auto;
  width: 800px;
  max-width: calc(100% - 32px);
  max-height: 90vh;
  border: 1px solid rgba(0, 255, 235, 0.2);
  transform: translate(0px, -20px);
  opacity: 0;
  animation: silktide-slideInUp-center 350ms ease-out forwards;
  box-shadow: var(--boxShadow);
  font-family: var(--bodyFont);
  color: var(--textColor);
  flex-direction: column;
  padding: 30px;
  background-color: var(--backgroundColor);
  border-radius: 8px;
  box-sizing: border-box;
  position: relative;
  overflow: auto;
  backdrop-filter: blur(5px);
}

/* Add an animated border glow effect to modal like the banner */
#silktide-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  padding: 1px;
  background: linear-gradient(
    45deg,
    rgba(0, 255, 235, 0.1) 0%,
    rgba(0, 255, 235, 0.4) 25%,
    rgba(0, 255, 235, 0.1) 50%,
    rgba(0, 255, 235, 0.4) 75%,
    rgba(0, 255, 235, 0.1) 100%
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: borderGlow 4s linear infinite;
  pointer-events: none;
}

/* --------------------------------
  Modal - Header
-------------------------------- */
#silktide-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  position: relative;
  border-bottom: 1px solid rgba(0, 255, 235, 0.2);
  padding-bottom: 16px;
}

#silktide-modal h1 {
  font-family: var(--headingFont);
  color: var(--primaryColor);
  font-size: 24px;
  font-weight: 700;
  margin: 0px;
  text-shadow: 0 0 10px rgba(0, 255, 235, 0.5);
  letter-spacing: 1px;
}

#silktide-modal .modal-close {
  display: inline-flex;
  border: none;
  padding: 3px;
  cursor: pointer;
  background: transparent;
  color: var(--primaryColor);
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#silktide-modal .modal-close:hover {
  background-color: rgba(0, 255, 235, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 235, 0.3);
  transform: scale(1.1);
}

#silktide-modal .modal-close svg {
  fill: var(--primaryColor);
  width: 16px;
  height: 16px;
}

/* --------------------------------
  Modal - Content
-------------------------------- */

#silktide-modal section {
  flex: 1;
  overflow-y: auto;
  margin-top: 24px;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--primaryColor) var(--backgroundColor);
}

#silktide-modal section::-webkit-scrollbar {
  width: 6px; 
}

#silktide-modal section::-webkit-scrollbar-track {
  background: rgba(0, 255, 235, 0.1);
  border-radius: 10px;
}

#silktide-modal section::-webkit-scrollbar-thumb {
  background-color: var(--primaryColor);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

#silktide-modal p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--textColor);
  margin: 0px 0px 16px;
  text-shadow: 0 0 5px rgba(0, 255, 235, 0.2);
}

#silktide-modal p:last-of-type {
  margin: 0px;
}

#silktide-modal fieldset {
  padding: 16px;
  border: 1px solid rgba(0, 255, 235, 0.2);
  margin: 0px 0px 24px;
  border-radius: 5px;
  background-color: rgba(0, 255, 235, 0.05);
  position: relative;
  transition: all 0.3s ease;
}

#silktide-modal fieldset:hover {
  box-shadow: 0 0 15px rgba(0, 255, 235, 0.2);
}

#silktide-modal fieldset:last-of-type {
  margin: 0px;
}

#silktide-modal legend {
  padding: 0 8px;
  margin: 0;
  font-weight: 700;
  color: var(--primaryColor);
  font-size: 18px;
  text-shadow: 0 0 5px rgba(0, 255, 235, 0.4);
  letter-spacing: 0.5px;
}

#silktide-modal .cookie-type-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

/* --------------------------------
  Modal - Switches
-------------------------------- */
#silktide-modal .switch {
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  height: 34px;
  width: 74px;
  cursor: pointer;
}

#silktide-modal .switch:focus-within {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 25px;
}

#silktide-modal .switch input {
  opacity: 0;
  position: absolute;
}

/* Unchecked Switch Styles */
#silktide-modal .switch__pill {
  position: relative;
  display: block;
  height: 34px;
  width: 74px;
  background: rgba(229, 246, 250, 0.2);
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(229, 246, 250, 0.1);
}

#silktide-modal .switch__dot {
  position: absolute;
  top: 2px;
  left: 2px;
  display: block;
  height: 30px;
  width: 30px;
  background: var(--textColor);
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#silktide-modal .switch__off,
#silktide-modal .switch__on {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: absolute;
  top: 9px;
}

#silktide-modal .switch__off {
  right: 8px;
  color: var(--textColor);
  opacity: 1;
  transition: all 0.3s ease;
}

#silktide-modal .switch__on {
  left: 8px;
  color: var(--backgroundColor);
  opacity: 0;
  transition: all 0.3s ease;
}

/* Checked Switch Styles */
#silktide-modal .switch input:checked+.switch__pill {
  background: var(--primaryColor);
  box-shadow: 0 0 10px rgba(0, 255, 235, 0.4), inset 0 0 5px rgba(0, 0, 0, 0.1);
}

#silktide-modal .switch input:checked~.switch__dot {
  left: calc(100% - 32px);
  background: var(--backgroundColor);
  box-shadow: 0 0 8px rgba(0, 255, 235, 0.5);
}

#silktide-modal .switch input:checked~.switch__off {
  opacity: 0;
}

#silktide-modal .switch input:checked~.switch__on {
  opacity: 1;
}

/* Disabled Switch Styles */
#silktide-modal .switch input:disabled+.switch__pill {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------
  Modal - Footer
-------------------------------- */
#silktide-modal footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  border-top: 1px solid rgba(0, 255, 235, 0.2);
  padding-top: 24px;
  width: 100%;
}

@media (min-width: 600px) {
  #silktide-modal footer {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }
  
  #silktide-modal footer .preferences-accept-all {
    flex: 0 0 auto;
    min-width: 140px;
    min-height: 46px;
  }
  
  #silktide-modal footer .preferences-reject-all {
    flex: 0 0 auto;
    min-width: 140px;
    min-height: 46px;
    margin-left: 16px;
  }
  
  #silktide-modal footer a {
    flex: 0 0 auto;
    margin-left: 20px;
  }
}

#silktide-modal footer a {
  margin-left: auto;
  transition: all 0.3s ease;
  padding: 5px 10px;
  border-radius: 4px;
}

#silktide-modal footer a:hover {
  background-color: rgba(0, 255, 235, 0.1);
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 255, 235, 0.2);
}

/* Mobile enhancements for preferences modal */
@media (max-width: 599px) {
  #silktide-modal {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: 24px;
  }
  
  #silktide-modal::before {
    border-radius: 0;
  }
  
  #silktide-modal footer {
    gap: 12px;
  }
  
  /* Make sure the accept button is more prominent */
  #silktide-modal footer .preferences-accept-all {
    min-height: 44px; /* Slightly larger on mobile for better touch targets */
    width: 100%;
  }
  
  #silktide-modal footer .preferences-reject-all {
    min-height: 44px; /* Slightly larger on mobile for better touch targets */
    width: 100%;
  }
  
  #silktide-modal footer a {
    margin: 0 auto;
    padding: 10px;
  }
}

/* Cookie Icon */
#silktide-cookie-icon {
  display: flex;
  position: fixed;
  bottom: 10px;
  left: 10px;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0px;
  border: none;
  background-color: var(--cookieIconColor);
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 255, 235, 0.5);
  pointer-events: auto;
  animation: silktide-fadeIn 0.3s ease-in-out forwards;
  transition: all 0.3s ease;
  z-index: 5;
}

/* Mobile styling for cookie icon - hide on mobile */
@media (max-width: 768px) {
  #silktide-cookie-icon {
    display: none !important;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 235, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 235, 0);
  }
}

#silktide-cookie-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 255, 235, 0.7);
}

#silktide-cookie-icon > svg {
  width: 20px !important;
  height: 20px !important;
  fill: var(--cookieIconBackgroundColor);
  transition: all 0.3s ease;
}

#silktide-cookie-icon:hover > svg {
  transform: rotate(20deg);
}

#silktide-cookie-icon.bottomRight {
  left: auto;
  right: 16px;
}

/* --------------------------------
  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;
  animation: silktide-fadeIn 0.3s ease-in-out forwards;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 255, 235, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(0, 255, 235, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 50% 50%, rgba(0, 255, 235, 0.01) 0%, transparent 100%);
}

/* --------------------------------
  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-center {
  from {
    opacity: 0;
    transform: translate(0px, 20px);
  }

  to {
    opacity: 1;
    transform: translate(0px, 0px);
  }
}
