/* 
  Silktide Consent Manager - https://silktide.com/consent-manager/
  Modified to match VibePilot ATC aesthetic
*/

/* --------------------------------
  Global Styles
-------------------------------- */
#silktide-wrapper {
  --focus: 0 0 0 2px rgba(80, 220, 140, 0.4), 0 0 0 4px rgba(80, 220, 140, 0.15);
  --boxShadow: 0 0 0 1px rgba(255, 255, 255, 0.025) inset, 0 24px 56px rgba(0, 0, 0, 0.52);
  --fontFamily: Inter, 'Helvetica Neue', sans-serif;
  --monoFont: 'SF Mono', 'Fira Mono', 'Roboto Mono', monospace;
  --primaryColor: rgba(80, 220, 140, 0.88);
  --backgroundColor: rgba(10, 14, 22, 0.96);
  --textColor: rgba(242, 241, 232, 0.72);
  --backdropBackgroundColor: rgba(0, 0, 0, 0.28);
  --backdropBackgroundBlur: 6px;
  --cookieIconColor: rgba(80, 220, 140, 0.85);
  --cookieIconBackgroundColor: rgba(10, 14, 22, 0.96);
  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 */
#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: rgba(160, 196, 255, 0.65);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.18s ease;
}

#silktide-wrapper a:hover {
  cursor: pointer;
  color: rgba(160, 196, 255, 1);
}

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

/* --------------------------------
  Buttons
-------------------------------- */
#silktide-wrapper .st-button {
  color: rgba(80, 220, 140, 0.88);
  background-color: rgba(80, 220, 140, 0.09);
  border: 1px solid rgba(80, 220, 140, 0.38);
  padding: 9px 18px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  font-family: var(--monoFont);
  font-size: 0.66rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.18s ease;
}

#silktide-wrapper .st-button--primary:hover {
  background-color: rgba(80, 220, 140, 0.16);
  border-color: rgba(80, 220, 140, 0.65);
  color: rgba(80, 220, 140, 1);
  box-shadow: 0 0 14px rgba(80, 220, 140, 0.12);
}

#silktide-wrapper .st-button--secondary {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

#silktide-wrapper .st-button--secondary:hover {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

/* --------------------------------
  Banner
-------------------------------- */
#silktide-banner {
  font-family: var(--fontFamily);
  color: var(--textColor);
  background-color: var(--backgroundColor);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025) inset, 0 24px 56px rgba(0, 0, 0, 0.52);
  box-sizing: border-box;
  padding: 24px 26px;
  border-radius: 8px;
  pointer-events: auto;
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 520px;
  overflow: auto;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  transform: translate(0, -20px);
  opacity: 0;
  animation: silktide-slideInDown 350ms ease-out forwards;
  animation-delay: 0.3s;
}

#silktide-banner::before {
  content: '// Privacy & Analytics';
  display: block;
  font-family: var(--monoFont);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(80, 220, 140, 0.65);
  margin-bottom: 12px;
}

#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;
  gap: 5px;
  border: none;
  padding: 12px 0px;
  background-color: transparent;
  color: rgba(160, 196, 255, 0.65);
  cursor: pointer;
  font-family: var(--monoFont);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.18s ease;
}

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

#silktide-banner .preferences span:hover {
  color: rgba(160, 196, 255, 1);
}

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

#silktide-banner p {
  font-size: 0.83rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.42);
  margin: 0px 0px 12px;
}

#silktide-banner a {
  display: inline-block;
  color: rgba(160, 196, 255, 0.65);
  text-decoration: underline;
  background-color: transparent;
  transition: color 0.18s ease;
}

#silktide-banner a:hover {
  color: rgba(160, 196, 255, 1);
}

#silktide-banner a.silktide-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  fill: rgba(80, 220, 140, 0.4);
  margin-left: auto;
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

#silktide-banner .actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
  margin-top: 20px;
}

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

#silktide-banner .actions-row {
  display: flex;
  gap: 10px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
}

/* --------------------------------
  Modal
-------------------------------- */
#silktide-modal {
  display: none;
  pointer-events: auto;
  overflow: auto;
  width: 720px;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background-color: rgba(10, 14, 22, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.025) inset, 0 24px 56px rgba(0, 0, 0, 0.6);
  transform: translate(0px, -20px);
  opacity: 0;
  animation: silktide-slideInUp-center 350ms ease-out forwards;
  font-family: var(--fontFamily);
  color: var(--textColor);
  flex-direction: column;
  padding: 28px;
  border-radius: 8px;
  box-sizing: border-box;
}

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

#silktide-modal h1 {
  font-family: var(--monoFont);
  color: rgba(80, 220, 140, 0.65);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0px;
}

#silktide-modal .modal-close {
  display: inline-flex;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.32);
  transition: all 0.18s ease;
}

#silktide-modal .modal-close:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.62);
}

#silktide-modal .modal-close svg {
  fill: currentColor;
}

/* --------------------------------
  Modal - Content
-------------------------------- */
#silktide-modal section {
  flex: 1;
  margin-top: 24px;
}

#silktide-modal section::-webkit-scrollbar {
  display: block;
  width: 4px;
}

#silktide-modal section::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

#silktide-modal p {
  font-size: 0.83rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.42);
  margin: 0px 0px 12px;
}

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

#silktide-modal fieldset {
  padding: 0px;
  border: none;
  margin: 0px 0px 28px;
}

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

#silktide-modal legend {
  padding: 0px;
  margin: 0px 0px 10px;
  font-family: var(--monoFont);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

#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: 28px;
  width: 62px;
  cursor: pointer;
}

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

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

#silktide-modal .switch__pill {
  position: relative;
  display: block;
  height: 28px;
  width: 62px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 25px;
  transition: background 0.18s ease;
}

#silktide-modal .switch__dot {
  position: absolute;
  top: 3px;
  left: 3px;
  display: block;
  height: 22px;
  width: 22px;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transition: left 150ms ease-out, background 150ms ease-out;
}

#silktide-modal .switch__off,
#silktide-modal .switch__on {
  text-transform: uppercase;
  font-size: 0.55rem;
  font-family: var(--monoFont);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.42);
  position: absolute;
  top: 8px;
  right: 8px;
  transition: right 150ms ease-out, opacity 150ms ease-out;
}

#silktide-modal .switch__off {
  opacity: 1;
}

#silktide-modal .switch__on {
  opacity: 0;
  color: rgba(10, 14, 22, 0.9);
}

/* Checked */
#silktide-modal .switch input:checked+.switch__pill {
  background: rgba(80, 220, 140, 0.75);
}

#silktide-modal .switch input:checked~.switch__dot {
  left: calc(100% - 25px);
  background: rgba(10, 14, 22, 0.9);
}

#silktide-modal .switch input:checked~.switch__off {
  right: calc(100% - 32px);
  opacity: 0;
}

#silktide-modal .switch input:checked~.switch__on {
  right: calc(100% - 34px);
  opacity: 1;
}

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

/* --------------------------------
  Modal - Footer
-------------------------------- */
#silktide-modal footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 600px) {
  #silktide-modal footer {
    flex-direction: row;
    align-items: center;
  }
}

#silktide-modal footer a {
  margin-left: auto;
  padding: 10px 0px;
  color: rgba(160, 196, 255, 0.45);
  font-size: 0.72rem;
}

/* --------------------------------
  Cookie Icon — hidden, footer link used instead
-------------------------------- */
#silktide-cookie-icon {
  display: none !important;
}

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

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

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