/* ─── Course compare toggle + sticky bar ─── */

.compare-toggle {
  position: absolute;
  top: 12px;
  right: 56px; /* leave room for wishlist heart */
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  backdrop-filter: blur(8px);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.compare-toggle:hover {
  background: #fff;
  color: var(--c-primary);
  transform: scale(1.05);
}
.compare-toggle.compare-toggle--active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

#compare-bar {
  position: fixed;
  bottom: -80px;
  left: 16px;
  right: 16px;
  z-index: 80;
  background: var(--c-text);
  color: #fff;
  border-radius: 12px;
  padding: 12px 18px;
  max-width: 720px;
  margin: 0 auto;
  transition: bottom var(--t-normal) var(--e-out);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
#compare-bar.compare-bar--visible { bottom: 24px; }

.compare-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  justify-content: space-between;
}
.compare-bar-info {
  font-size: var(--fs-sm);
  min-width: 0;
  flex: 1;
}
.compare-bar-info strong {
  font-size: var(--fs-md);
  color: #fff;
  margin-right: 4px;
}
.compare-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.compare-bar-actions .btn-ghost { color: #cbd5e1; }
.compare-bar-actions .btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.1); }

@media (max-width: 640px) {
  #compare-bar { left: 8px; right: 8px; padding: 10px 14px; }
  #compare-bar.compare-bar--visible { bottom: 78px; /* выше mobile-nav */ }
  .compare-bar-info { display: none; }
  .compare-bar-actions { width: 100%; justify-content: space-between; }
}

/* Block G fix: mobile tap target 44×44 (WCAG 2.5.5) */
@media (max-width: 768px) {
  .compare-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
  }
}
