/* ══ ShiftTools Cookie Consent — Modern Minimal Glassmorphic Banner ══ */

#st-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  width: calc(100% - 32px);
  z-index: 99990;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #f4f4f5;
  background: rgba(18, 18, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Ensure custom cursor & trail elements remain on top of the cookie banner */
#shift-cursor,
#shift-trail,
#ir-cursor,
#q-cursor,
#ct-cursor,
.custom-cursor {
  z-index: 2147483647 !important;
  pointer-events: none !important;
}

#st-cookie-banner.st-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.st-cookie-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.st-cookie-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.st-cookie-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
}

.st-cookie-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #a1a1aa;
  margin: 0 0 16px 0;
}

.st-cookie-desc a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.st-cookie-desc a:hover {
  color: #bfdbfe;
}

/* Actions Group */
.st-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.st-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: inherit;
  outline: none;
}

.st-cookie-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  flex: 1 1 auto;
}

.st-cookie-btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.st-cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  border-color: rgba(255, 255, 255, 0.1);
  flex: 1 1 auto;
}

.st-cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.st-cookie-btn-text {
  background: transparent;
  color: #a1a1aa;
  padding: 8px 10px;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.st-cookie-btn-text:hover {
  color: #e4e4e7;
}

/* Preferences Toggle Panel */
.st-cookie-prefs {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.st-cookie-prefs.st-expanded {
  display: block;
  animation: stFadeIn 0.2s ease forwards;
}

@keyframes stFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.st-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12.5px;
}

.st-pref-label {
  color: #d4d4d8;
  font-weight: 500;
}

.st-pref-status {
  font-size: 11px;
  color: #71717a;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 7px;
  border-radius: 4px;
}

.st-pref-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.st-pref-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.st-pref-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.2s;
  border-radius: 20px;
}

.st-pref-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s;
  border-radius: 50%;
}

.st-pref-switch input:checked + .st-pref-slider {
  background-color: #2563eb;
}

.st-pref-switch input:checked + .st-pref-slider:before {
  transform: translateX(16px);
}

.st-cookie-prefs-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Floating re-open trigger button (Discreet in corner or via footer) */
#st-manage-cookies-btn {
  font-size: 12px;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  font-family: inherit;
}

#st-manage-cookies-btn:hover {
  opacity: 0.8;
}

@media (max-width: 480px) {
  #st-cookie-banner {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    padding: 18px 16px;
  }
  .st-cookie-actions {
    flex-direction: column;
  }
  .st-cookie-btn {
    width: 100%;
  }
}
