/**
 * TikImpact Cookie Consent Banner
 *
 * Fixed bottom banner — does not obscure main content.
 * Clean, modern design with smooth slide-up animation.
 */

/* ============================================================
   Banner — base
   ============================================================ */

#tik-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #1a1a2e;
  color: #e8e8f0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  max-width: 900px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;

  /* Hidden by default — slide up on .tik-cookie-visible */
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

#tik-cookie-banner.tik-cookie-visible {
  transform: translateY(0);
}

#tik-cookie-banner.tik-cookie-hiding {
  transform: translateY(110%);
}

/* ============================================================
   Customize panel (slides up above main banner)
   ============================================================ */

.tik-cookie-customize-panel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
}

.tik-cookie-customize-panel.tik-cookie-panel-open {
  max-height: 600px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.tik-cookie-customize-title {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

/* ============================================================
   Toggle rows
   ============================================================ */

.tik-cookie-toggles {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.tik-cookie-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tik-cookie-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.tik-cookie-toggle-label {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
}

.tik-cookie-toggle-desc {
  font-size: 12px;
  color: #9999bb;
  line-height: 1.4;
}

.tik-cookie-toggle-always-on {
  font-size: 11px;
  font-weight: 600;
  color: #5bc8af;
  white-space: nowrap;
  padding: 3px 8px;
  background: rgba(91, 200, 175, 0.15);
  border-radius: 10px;
  align-self: center;
}

/* ============================================================
   Toggle switch
   ============================================================ */

.tik-toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.tik-toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tik-toggle-slider {
  width: 44px;
  height: 24px;
  background: #3a3a5c;
  border-radius: 12px;
  display: block;
  transition: background 0.2s ease;
  position: relative;
}

.tik-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tik-toggle-switch input:checked + .tik-toggle-slider {
  background: #1a56db;
}

.tik-toggle-switch input:checked + .tik-toggle-slider::after {
  transform: translateX(20px);
}

.tik-toggle-switch input:focus-visible + .tik-toggle-slider {
  outline: 2px solid #5a9dfb;
  outline-offset: 2px;
}

/* ============================================================
   Main banner row
   ============================================================ */

.tik-cookie-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  flex-wrap: wrap;
}

.tik-cookie-text {
  flex: 1;
  min-width: 240px;
}

.tik-cookie-heading {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.tik-cookie-body {
  margin: 0;
  font-size: 13px;
  color: #9999bb;
}

.tik-cookie-body a {
  color: #5a9dfb;
  text-decoration: underline;
}

.tik-cookie-body a:hover {
  color: #88bfff;
}

/* ============================================================
   Action buttons
   ============================================================ */

.tik-cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

.tik-cookie-btn {
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
  white-space: nowrap;
  line-height: 1;
}

.tik-cookie-btn:active {
  transform: scale(0.97);
}

.tik-cookie-btn-primary {
  background: #1a56db;
  color: #ffffff;
}

.tik-cookie-btn-primary:hover {
  background: #1e40af;
}

.tik-cookie-btn-secondary {
  background: #3a3a5c;
  color: #c8c8e0;
}

.tik-cookie-btn-secondary:hover {
  background: #4a4a70;
  color: #ffffff;
}

.tik-cookie-btn-outline {
  background: transparent;
  color: #9999bb;
  border: 1px solid #3a3a5c;
}

.tik-cookie-btn-outline:hover {
  border-color: #5a9dfb;
  color: #5a9dfb;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 600px) {
  #tik-cookie-banner {
    border-radius: 0;
    max-width: 100%;
  }

  .tik-cookie-main {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 14px;
  }

  .tik-cookie-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .tik-cookie-btn {
    width: 100%;
    text-align: center;
    padding: 11px 18px;
  }

  .tik-cookie-customize-panel {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 400px) {
  .tik-cookie-heading {
    font-size: 14px;
  }

  .tik-cookie-body {
    font-size: 12px;
  }
}
