/* Tarteaucitron Custom Styles for Sparkup */
/* Complete replacement for default styles (useExternalCss: true) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

/* ================================
   CSS VARIABLES
   ================================ */
:root {
  --tac-bg: #1e1e1e;
  --tac-bg-dark: #171717;
  --tac-border: #2f2f2f;
  --tac-text: #ffffff;
  --tac-text-muted: rgba(255, 255, 255, 0.6);
  --tac-green: #1cba56;
  --tac-green-hover: #179f49;
  --tac-red: #dc3545;
  --tac-radius: 12px;
  --tac-radius-sm: 8px;
  --tac-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ================================
   BASE STYLES
   ================================ */
#tarteaucitronRoot {
  font-family: var(--tac-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--tac-text);
  -webkit-font-smoothing: antialiased;
}

#tarteaucitronRoot * {
  box-sizing: border-box;
  font-family: var(--tac-font);
}

#tarteaucitronRoot button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--tac-font);
}

/* ================================
   BACKDROP
   ================================ */
#tarteaucitronBack {
  display: none !important; /* Always hidden - no backdrop overlay */
}

/* ================================
   ALERT BANNER (Bottom)
   ================================ */
#tarteaucitronAlertBig {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: auto;
  top: auto;
  max-width: 280px;
  background: var(--tac-bg);
  border: 1px solid var(--tac-border);
  border-radius: var(--tac-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  padding: 24px 20px 10px 20px;
  z-index: 2147483645;
  animation: tacSlideUp 0.3s ease-out;
}

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

/* Alert text */
#tarteaucitronDisclaimerAlert {
  display: block;
  color: var(--tac-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  .tarteaucitronAlertTitle {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--tac-text);
    text-align: center;
  }
}

/* Privacy policy link inside alert text */
#tarteaucitronDisclaimerAlert a {
  color: var(--tac-text-muted);
  text-decoration: underline;
  display: inline-block;
  cursor: pointer;
  &:hover {
    color: var(--tac-text);
  }
}

/* Alert buttons container */
#tarteaucitronAlertBig .tarteaucitronCTAButton,
#tarteaucitronAlertBig #tarteaucitronCloseAlert,
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--tac-radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
}

/* Accept button */
#tarteaucitronAlertBig .tarteaucitronAllow,
#tarteaucitronAlertBig #tarteaucitronPersonalize2 {
  background: var(--tac-green);
  color: #fff;
}

#tarteaucitronAlertBig .tarteaucitronAllow:hover,
#tarteaucitronAlertBig #tarteaucitronPersonalize2:hover {
  background: var(--tac-green-hover);
}

/* Deny button and Personalize button */
#tarteaucitronAlertBig .tarteaucitronDeny,
#tarteaucitronAlertBig #tarteaucitronAllDenied2 {
  background: transparent;
  color: var(--tac-text);
  border: 1px solid var(--tac-border);
}

#tarteaucitronAlertBig .tarteaucitronDeny:hover,
#tarteaucitronAlertBig #tarteaucitronAllDenied2:hover,
#tarteaucitronAlertBig #tarteaucitronCloseAlert:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

#tarteaucitronAlertBig #tarteaucitronCloseAlert {
  background: transparent;
  color: var(--tac-text-muted);
  border: none;
  font-weight: 500;
}

/* Privacy policy link */
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
  display: block;
  background: transparent;
  color: var(--tac-text-muted);
  padding: 8px 0 0 0;
  margin: 8px 0 0 0;
  font-size: 12px;
}

#tarteaucitronAlertBig #tarteaucitronPrivacyUrl:hover {
  color: var(--tac-text);
  text-decoration: underline;
}

/* Hide checkmark/cross icons in buttons */
#tarteaucitronAlertBig .tarteaucitronCheck,
#tarteaucitronAlertBig .tarteaucitronCross {
  display: none;
}

/* ================================
   MANAGEMENT PANEL (Modal)
   ================================ */
#tarteaucitron {
  display: none; /* Hidden by default, JS will show */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  background: var(--tac-bg-dark);
  border: 1px solid var(--tac-border);
  border-radius: var(--tac-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 2147483647;
  flex-direction: column;
  overflow: hidden;
}

/* When JS shows the panel (display: block), override to flex and fix position */
#tarteaucitron[style*="display: block"],
#tarteaucitron[style*="display:block"] {
  display: flex !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  animation: tacFadeIn 0.2s ease-out;
}

/* Close button */
#tarteaucitronClosePanel {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tac-bg) !important;
  color: var(--tac-text-muted);
  font-size: 18px;
  line-height: 18px;
  padding-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  &:hover {
    background: var(--tac-border) !important;
    color: var(--tac-text);
  }
}


/* Services container */
#tarteaucitronServices {
  overflow-y: auto;
  flex: 1;
}

/* Main header line */
#tarteaucitronMainLineOffset {
  display: flex !important;
  flex-wrap: wrap;
  background: var(--tac-bg);
  padding: 24px;
  border-bottom: 1px solid var(--tac-border);
}

/* Title */
#tarteaucitron .tarteaucitronH1 {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--tac-text);
  margin: 0 40px 12px 40px;
  text-align: center;
  width: 100%;
}

/* Description */
#tarteaucitronInfo {
  margin-bottom: 16px;
}

#tarteaucitronInfo p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

#tarteaucitronInfo br {
  display: none;
}

/* Privacy policy button in panel */
#tarteaucitronPrivacyUrlDialog {
  color: var(--tac-text-muted);
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
  margin-top: 8px;
}

#tarteaucitronPrivacyUrlDialog:hover {
  color: var(--tac-text);
}

/* Preference for all services */
#tarteaucitronMainLineOffset .tarteaucitronName {
  line-height: 36px;
  white-space: nowrap;
  min-width: fit-content;
}

.tarteaucitronH2,
#tarteaucitron .tarteaucitronH2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--tac-text-muted);
  margin: 0;
}


/* Hide checkmarks in buttons */
#tarteaucitron .tarteaucitronCheck,
#tarteaucitron .tarteaucitronCross {
  display: none;
}

/* ================================
   SERVICES LIST
   ================================ */

#tarteaucitron[style*="display: block"] {
  top: unset !important;
  bottom: 20px !important;
  left: 20px !important;
  transform: none !important;
}
.tarteaucitronBorder {
  background: var(--tac-bg-dark);
}

.tarteaucitronBorder ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Category title */
.tarteaucitronTitle {
  background: var(--tac-bg);
  border-bottom: 1px solid var(--tac-border);
}

.tarteaucitronTitle button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 24px;
  color: var(--tac-text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}
.tarteaucitronTitle button:not(.catToggleBtn) {
  cursor: default !important;
}

.tarteaucitronTitle button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tarteaucitronPlus {
  display: none;
}

/* Category toggle button chevron */
.catToggleBtn::after {
  content: "›";
  display: inline-block;
  margin-left: auto;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 16px;
  text-align: center;
  color: var(--tac-text-muted);
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.catToggleBtn[aria-expanded="false"]::after {
  transform: rotate(0deg);
}

.catToggleBtn[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

/* Service line (not the main header line) */
.tarteaucitronLine:not(.tarteaucitronMainLine) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--tac-bg-dark);
  border-bottom: 1px solid var(--tac-border);
  gap: 4px 28px;
}

/* .tarteaucitronLine:not(.tarteaucitronMainLine):hover {
  background: rgba(255, 255, 255, 0.02);
} */

.tarteaucitronInfoBox {
  padding: 14px 24px;
  font-size: 14px;
  line-height: 1.6em;
}

/* Service name */
.tarteaucitronLine .tarteaucitronName {
  flex: 1;
  min-width: 0;
}

.tarteaucitronH3 {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6em;
  color: var(--tac-text);
  margin: 0;
}
#tarteaucitronServices_mandatory .tarteaucitronH3 {
  font-weight: 400;
  color: rgba(255,255,255,0.5);
}

.tarteaucitronH4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--tac-text);
  margin: 0 0 4px 0;
}

/* Service links */
.tarteaucitronLine .tarteaucitronName a {
  color: var(--tac-text-muted);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.tarteaucitronLine .tarteaucitronName a:hover {
  color: var(--tac-text);
  text-decoration: underline;
}

.tarteaucitronLine .tarteaucitronReadmoreSeparator {
  margin: 0 4px;
}

/* Service buttons */
.tarteaucitronLine .tarteaucitronAsk {
  display: flex;
  gap: 28px;
  flex-shrink: 0;
}

.tarteaucitronLine .tarteaucitronAllow,
.tarteaucitronLine .tarteaucitronDeny {
  padding: 8px 0;
  border-radius: var(--tac-radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  &::before {
    content: "✓";
    display: inline-block;
    width: 18px;
    height: 18px;
    font-size: 15px;
    line-height: 15px;
    font-weight: bold;
    margin: -4px 6px -4px 0;
    text-align: center;
    vertical-align: baseline;
    border: 1px solid var(--tac-text-muted);
    border-radius: 4px;
    color: transparent;
  }
}

/* Pressed state */
.tarteaucitronLine button[aria-pressed="true"]::before,
#tarteaucitronServices_mandatory .tarteaucitronAllow:disabled::before {
  color: #ffffff;
  border-color: var(--tac-green);
  background-color: var(--tac-green);
}

.tarteaucitronLine .tarteaucitronAllow {
  background: var(--tac-green);
  color: #fff;
}

.tarteaucitronLine .tarteaucitronAllow:hover {
  background: var(--tac-green-hover);
}

.tarteaucitronLine .tarteaucitronDeny {
  background: transparent;
  color: var(--tac-text);
}

.tarteaucitronLine .tarteaucitronDeny:hover {
  background: rgba(255, 255, 255, 0.1);
}




/* Disabled buttons */
.tarteaucitronLine .tarteaucitronAllow:disabled,
.tarteaucitronLine .tarteaucitronAllow:disabled + .tarteaucitronDeny,
.tarteaucitronLine .tarteaucitronDeny:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.tarteaucitronStatusInfo {
  display: none;
}


/* Cookie list */
.tarteaucitronListCookies {
  display: none;
}

/* Clear element */
.clear {
  clear: both;
}

/* Hidden elements */
.tarteaucitronHidden {
  display: block;
}

/* ================================
   BOTTOM CREDIT & SAVE
   ================================ */
#tarteaucitron .tarteaucitronBorder > a[href*="tarteaucitron.io"] {
  display: none;
  text-align: center;
  padding: 12px;
  color: var(--tac-text-muted);
  font-size: 11px;
  text-decoration: none;
  opacity: 0.6;
}

#tarteaucitron .tarteaucitronBorder > a img {
  height: 16px;
  vertical-align: middle;
}

/* No cookies message */
#tarteaucitron .tarteaucitronBorder > span {
  display: block;
  text-align: center;
  padding: 16px 24px;
  color: var(--tac-text-muted);
  font-size: 13px;
}

/* Save button (if shown) */
#tarteaucitronSave {
  display: block;
  width: calc(100% - 48px);
  margin: 16px 24px;
  button {
    width: 100%;
    height: 100%;
    background: var(--tac-green);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--tac-radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    &:hover {
      background: var(--tac-green-hover);
    }
  }
}

/* ================================
   FLOATING ICON
   ================================ */
#tarteaucitronIcon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2147483644;
}

#tarteaucitronIcon #tarteaucitronManager {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--tac-bg);
  border: 1px solid var(--tac-border);
  border-radius: 50%;
  color: var(--tac-text);
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
}

#tarteaucitronIcon #tarteaucitronManager:hover {
  background: var(--tac-bg-dark);
  transform: scale(1.05);
}

/* ================================
   SCROLLBAR
   ================================ */
#tarteaucitronServices::-webkit-scrollbar {
  width: 6px;
}

#tarteaucitronServices::-webkit-scrollbar-track {
  background: var(--tac-bg-dark);
}

#tarteaucitronServices::-webkit-scrollbar-thumb {
  background: var(--tac-border);
  border-radius: 3px;
}

#tarteaucitronServices::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 480px) {
  #tarteaucitronAlertBig {
    left: 8px;
    right: 8px;
    bottom: 4px;
    max-width: none;
    padding: 24px 16px 12px 16px;
  }

  /* #tarteaucitronAlertBig .tarteaucitronCTAButton {
    display: block;
    width: 100%;
    margin: 4px 0;
    text-align: center;
  } */

  #tarteaucitronAlertBig #tarteaucitronCloseAlert {
    display: block;
    width: 100%;
    text-align: center;
  }

  #tarteaucitron,
  #tarteaucitron[style*="display: block"],
  #tarteaucitron[style*="display:block"] {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    border-radius: var(--tac-radius) var(--tac-radius) 0 0 !important;
    animation: tacSlideUpMobile 0.3s ease-out;
  }

  #tarteaucitronMainLineOffset {
    padding: 20px 16px;
  }

  .tarteaucitronLine:not(.tarteaucitronMainLine) {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .tarteaucitronLine:not(.tarteaucitronMainLine) .tarteaucitronAsk {
    width: 100%;
    margin-top: 12px;
  }

  .tarteaucitronTitle button,
  .tarteaucitronInfoBox {
    padding: 12px 16px;
  }
}

/* ================================
   ANIMATION FOR PANEL
   ================================ */
@keyframes tacFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Mobile animation */
@media (max-width: 480px) {
  #tarteaucitron {
    animation: tacSlideUpMobile 0.3s ease-out;
  }

  @keyframes tacSlideUpMobile {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
