/**
 * Conservative Techie — shared social icons + Follow us embeds.
 * Uses theme tokens (--ct-*) so Iceberg / Nexus / etc. stay readable.
 */

.ct-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ct-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--ct-radius, 4px);
  border: 1px solid var(--ct-border, #333);
  background: color-mix(in srgb, var(--ct-bg-panel, #111) 88%, transparent);
  color: var(--ct-accent, #00ff41);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.ct-social a:hover,
.ct-social a:focus-visible {
  border-color: var(--ct-accent, #00ff41);
  color: var(--ct-accent-2, var(--ct-accent, #00ff41));
  background: var(--ct-bg-hover, rgba(0, 255, 65, 0.08));
  outline: none;
  transform: translateY(-1px);
}

.ct-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}

.ct-social--sidebar {
  justify-content: center;
  margin-top: 12px;
  gap: 10px;
}

.ct-social--sidebar a {
  width: 38px;
  height: 38px;
}

.ct-social--status a {
  width: 30px;
  height: 30px;
}

.ct-social--footer {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9000;
  padding: 6px;
  border-radius: var(--ct-radius-lg, 8px);
  border: 1px solid var(--ct-border, #333);
  background: color-mix(in srgb, var(--ct-bg-elevated, #0a0a0a) 92%, transparent);
  box-shadow: var(--ct-shadow, 0 8px 24px rgba(0, 0, 0, 0.35));
  backdrop-filter: blur(8px);
}

/* Follow us panel — tight side padding so FB can approach the 280px readable floor */
.ct-follow {
  margin: 12px 10px 18px;
  padding: 10px;
  border: 1px solid var(--ct-border, #333);
  border-radius: var(--ct-radius-lg, 8px);
  background: var(--ct-bg-panel, #111);
  box-shadow: var(--ct-shadow, none);
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
}

.ct-follow__title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ct-accent, #00ff41);
  font-family: var(--ct-font-display, var(--ct-font, monospace));
}

.ct-follow__block {
  margin-bottom: 12px;
}

.ct-follow__block:last-child {
  margin-bottom: 0;
}

.ct-follow__label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-text-dim, #666);
}

.ct-follow__frame {
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--ct-border, #2a2a2a);
  border-radius: var(--ct-radius, 4px);
  background: var(--ct-bg, #000);
  box-sizing: border-box;
}

/* Only demand tall space while a live timeline/plugin is expected */
.ct-follow__frame:not(.ct-follow__frame--compact):not(.ct-follow__frame--loading) {
  min-height: 200px;
  max-height: 440px;
}

.ct-follow__frame--loading {
  min-height: 72px;
}

.ct-follow__frame--compact {
  min-height: 0;
  height: auto !important;
  max-height: none !important;
  border-color: var(--ct-border-strong, var(--ct-border, #333));
  padding: 10px;
}

.ct-follow__frame .fb-page,
.ct-follow__frame .fb-page > span,
.ct-follow__frame iframe {
  width: 100% !important;
  max-width: 100% !important;
}

.ct-follow__fallback,
.ct-follow__x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid var(--ct-accent, #00ff41);
  border-radius: var(--ct-radius, 4px);
  background: color-mix(in srgb, var(--ct-bg) 85%, var(--ct-accent) 8%);
  color: var(--ct-accent, #00ff41);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.ct-follow__fallback--quiet {
  margin-top: 6px;
  border-color: var(--ct-border, #333);
  background: transparent;
  color: var(--ct-text-muted, #888);
  font-weight: 600;
}

.ct-follow__fallback:hover,
.ct-follow__x-link:hover {
  background: var(--ct-bg-hover, rgba(0, 255, 65, 0.1));
}

.ct-follow__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 16px;
  color: var(--ct-text-muted, #888);
  font-size: 12px;
  text-align: center;
}

.ct-follow__placeholder--short {
  min-height: 48px;
  padding: 10px;
}

/* Compact FB / X fallback cards (blocked embeds, blank timelines, narrow phones) */
.ct-social-card,
.ct-x-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ct-social-card__row,
.ct-x-card__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.ct-social-card__mark,
.ct-x-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--ct-radius, 4px);
  border: 1px solid var(--ct-border, #333);
  color: var(--ct-accent, #00ff41);
  flex-shrink: 0;
}

.ct-social-card__mark svg,
.ct-x-card__mark svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ct-social-card__meta,
.ct-x-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ct-social-card__meta strong,
.ct-x-card__meta strong {
  color: var(--ct-text, #e0e0e0);
  font-size: 13px;
}

.ct-social-card__meta span,
.ct-x-card__meta span {
  color: var(--ct-text-muted, #888);
  font-size: 11px;
}

/* Mobile inline slot kept hidden — Follow us lives in the drawer so Threat Matrix leads */
#ct-follow-mobile-slot {
  display: none !important;
}

/* Drawer Follow us: keep compact cards snug */
#sidebar .ct-follow__frame--compact {
  height: auto;
  min-height: 0;
  max-height: none;
}

#sidebar .ct-follow__frame:not(.ct-follow__frame--compact):not(.ct-follow__frame--loading) {
  position: relative;
  overflow: hidden;
  max-height: 280px;
}

.ct-drawer-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .ct-social--footer {
    right: 10px;
    bottom: 10px;
  }

  #ct-follow-mobile-slot:not([hidden]) {
    display: block;
  }

  .ct-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.ct-drawer-open .ct-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.ct-drawer-open {
    overflow: hidden;
  }
}
