/*
 * Studio Kipo Cookie Consent
 * Edit the variables below first. The rest of the file is intentionally simple.
 */

#silktide-wrapper {
  --fontFamily: Arial, Helvetica, sans-serif;
  --primaryColor: #111111;
  --backgroundColor: #ffffff;
  --textColor: #161616;
  --secondaryBackground: #f3f3f3;
  --borderColor: #e7e7e7;
  --boxShadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --backdropBackgroundColor: rgba(0, 0, 0, 0.45);
  --cookieIconBackground: #ffffff;
  --cookieIconColor: #111111;

  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
  font-family: var(--fontFamily);
}

#silktide-wrapper *,
#silktide-wrapper *::before,
#silktide-wrapper *::after {
  box-sizing: border-box;
}

#silktide-wrapper a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#silktide-wrapper button {
  font: inherit;
}

#silktide-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--backdropBackgroundColor);
  pointer-events: auto;
}

/* ---------------- Banner ---------------- */

#silktide-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: auto;
  transform: none;
  display: block;
  width: 600px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 32px;
  background: var(--backgroundColor);
  color: var(--textColor);
  border: 1px solid var(--borderColor);
  border-radius: 5px;
  box-shadow: var(--boxShadow);
  pointer-events: auto;
}

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

#silktide-banner .actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

#silktide-banner .actions-row {
  order: 3;
  display: flex;
  align-items: center;
  margin-left: auto;
}

#silktide-banner .reject-all {
  order: 2;
}

#silktide-banner .accept-all {
  order: 1;
}

#silktide-banner .preferences {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--textColor);
  padding: 10px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

#silktide-wrapper .st-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 2px solid var(--primaryColor);
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

#silktide-wrapper .st-button--primary {
  background: var(--primaryColor);
  color: #ffffff;
  border-color: var(--primaryColor);
}

#silktide-wrapper .st-button--secondary {
  background: var(--backgroundColor);
  color: var(--primaryColor);
  border-color: var(--primaryColor);
}

#silktide-wrapper .st-button:hover,
#silktide-banner .preferences:hover {
  opacity: 0.78;
}

/* ---------------- Preferences modal ---------------- */

#silktide-modal {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  flex-direction: column;
  gap: 0;
  padding: 28px;
  background: var(--backgroundColor);
  color: var(--textColor);
  border-radius: 18px;
  box-shadow: var(--boxShadow);
  pointer-events: auto;
}

#silktide-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

#silktide-modal h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

#silktide-modal > p {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.55;
}

#silktide-modal .modal-close {
  appearance: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--secondaryBackground);
  color: var(--textColor);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#silktide-modal fieldset {
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--borderColor);
}

#silktide-modal legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
}

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

#silktide-modal .cookie-type-description p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

#silktide-modal footer {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* ---------------- Switch ---------------- */

#silktide-modal .switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 52px;
  height: 30px;
  cursor: pointer;
}

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

#silktide-modal .switch__pill {
  position: absolute;
  inset: 0;
  background: #d4d4d4;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

#silktide-modal .switch__dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: left 0.2s ease;
}

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

#silktide-modal .switch input:checked ~ .switch__dot {
  left: 25px;
}

#silktide-modal .switch input:disabled + .switch__pill {
  opacity: 0.55;
}

/* ---------------- Floating cookie icon ---------------- */

#silktide-cookie-icon {
  display: none;
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--borderColor);
  border-radius: 50%;
  background: var(--cookieIconBackground);
  color: var(--cookieIconColor);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  pointer-events: auto;
  font-size: 20px;
}

/* ---------------- Blocked YouTube placeholder ---------------- */

.skcc-youtube-blocked {
  display: none !important;
}

.skcc-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 260px;
  padding: 30px;
  background: #f5f5f5;
  color: #222222;
  border-radius: 12px;
}

.skcc-media-placeholder__inner {
  max-width: 520px;
  text-align: center;
}

.skcc-media-placeholder__inner strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.skcc-media-placeholder__inner p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
}

.skcc-media-placeholder__button {
  appearance: none;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
}

body.skcc-modal-open {
  overflow: hidden;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 700px) {
  #silktide-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    padding: 22px;
    border-radius: 5px;
  }

  #silktide-banner > p {
    font-size: 15px;
    line-height: 22px;
  }

  #silktide-banner .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  #silktide-banner .actions-row {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  #silktide-banner .accept-all,
  #silktide-banner .reject-all {
    width: 100%;
  }

  #silktide-modal {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding: 20px;
    border-radius: 14px;
  }

  #silktide-modal h2 {
    font-size: 20px;
  }

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

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

  .skcc-media-placeholder {
    min-height: 220px;
    padding: 22px;
  }
}
