/*
Theme Name: FireCoach AI (WordPress AI shell)
Theme URI: https://firecoach-ai.online/
Author: PAI Systems
Description: Matches wordpress.ai-stevekellar.online shell — fleet HUD, drawer, warm canvas — with Twitter bird + FIRECOACH-AI and iOS timeline feed.
Version: 3.1.6
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: firecoach-twitter
*/

:root {
  --fc-bg: #faf9f7;
  --fc-bg-panel: #ffffff;
  --fc-bg-muted: #f2f0ec;
  --fc-text: #1a1a1a;
  --fc-text-muted: #6b6b6b;
  --fc-border: #e8e5df;
  --fc-accent: #1da1f2;
  --fc-accent-soft: rgba(29, 161, 242, 0.12);
  --fc-accent-dark: #0f8de4;
  --fc-hud: #0f172a;
  --fc-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fc-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body.fc-wpai-shell {
  font-family: var(--fc-font);
  background: var(--fc-bg);
  color: var(--fc-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--fc-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Fleet HUD (wordpress.ai parity) ── */
.fleet-hud-bar {
  background: var(--fc-hud);
  color: #f8fafc;
  font-size: 11px;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 200;
}
.hud-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hud-pulse-dot {
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: fcPulse 2s infinite;
}
@keyframes fcPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.15); }
}
.hud-title { font-weight: 700; color: #38bdf8; text-transform: uppercase; letter-spacing: 0.04em; }
.hud-sep { color: #64748b; }
.hud-task { color: #cbd5e1; }
.hud-agents { display: flex; gap: 6px; overflow-x: auto; max-width: 50%; }
.agent-pill {
  background: #1e293b;
  border: 1px solid #334155;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  white-space: nowrap;
  color: #94a3b8;
}
.agent-pill.active { border-color: #0284c7; color: #38bdf8; }

@media (max-width: 640px) {
  .hud-agents { display: none; }
  .hud-task { display: none; }
}

/* ── Header ── */
.fc-site-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 29px;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.fc-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fc-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fc-text);
}
.fc-logo-bird { color: var(--fc-accent); display: flex; }
.fc-logo-text { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.fc-logo-accent { color: var(--fc-accent); }
.fc-header-actions { display: flex; align-items: center; gap: 8px; }
.fc-header-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
}
.fc-chip-primary { background: var(--fc-accent); color: #fff; border-color: var(--fc-accent); }
.fc-hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.fc-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
}

@media (max-width: 480px) {
  .fc-header-chip { display: none; }
}

/* ── Drawer ── */
.fc-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1000;
}
.fc-drawer-backdrop.active { opacity: 1; pointer-events: auto; }
.fc-member-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  max-width: 88vw;
  background: var(--fc-bg);
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}
.fc-member-drawer.active { transform: translateX(0); }
.fc-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--fc-border);
  background: #fff;
}
.fc-drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: var(--fc-accent);
}
.fc-drawer-sub { font-size: 11px; color: var(--fc-text-muted); margin-top: 2px; }
.fc-drawer-close { background: none; border: none; font-size: 28px; color: #64748b; cursor: pointer; }
.fc-drawer-nav { padding: 12px; overflow-y: auto; flex: 1; }
.fc-nav-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 12px 10px 4px;
}
.fc-drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--fc-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.fc-drawer-link:hover, .fc-drawer-link.highlight {
  background: var(--fc-accent-soft);
  color: var(--fc-accent);
}

/* ── Hero (production-style) ── */
.fc-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 768px) {
  .fc-hero { grid-template-columns: 1fr; padding: 32px 16px 24px; }
}
.fc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--fc-border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--fc-text-muted);
  background: #fff;
  margin-bottom: 16px;
}
.fc-hero-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
.fc-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.fc-hero h1 .accent { color: var(--fc-accent); }
.fc-hero p {
  font-size: 16px;
  color: var(--fc-text-muted);
  max-width: 420px;
  margin-bottom: 24px;
}
.fc-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fc-btn-dark {
  background: #1a1a1a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.fc-btn-outline {
  border: 1px solid var(--fc-border);
  background: #fff;
  color: var(--fc-text);
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* Phone mockup — Twitter 2020 */
.fc-phone {
  position: relative;
  width: 260px;
  height: 480px;
  margin: 0 auto;
}
.fc-phone-shell {
  position: absolute;
  inset: 0;
  background: #15202b;
  border-radius: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
.fc-phone-screen {
  position: absolute;
  inset: 6px;
  background: #fff;
  border-radius: 1.7rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fc-phone-top {
  background: #fff;
  border-bottom: 1px solid #eff3f4;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  color: var(--fc-accent);
}
.fc-phone-feed { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.fc-mini-tweet {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  font-size: 11px;
}
.fc-mini-av {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1da1f2, #794bc4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.fc-mini-body strong { display: block; font-size: 11px; }
.fc-mini-body span { color: #536471; }

/* ── Timeline panel ── */
.fc-feed-wrap {
  max-width: 680px;
  margin: 0 auto 48px;
  padding: 0 16px calc(24px + var(--fc-safe-bottom));
}
.fc-feed-head {
  background: #fff;
  border: 1px solid var(--fc-border);
  border-radius: 16px 16px 0 0;
  padding: 16px 18px;
  border-bottom: 0;
}
.fc-feed-head h2 { font-size: 18px; font-weight: 800; }
.fc-feed-head p { font-size: 13px; color: var(--fc-text-muted); margin-top: 4px; }
.fc-timeline {
  background: #fff;
  border: 1px solid var(--fc-border);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.fc-compose {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eff3f4;
}
.fc-compose-main { flex: 1; min-width: 0; }
.fc-compose-box {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: none;
  resize: none;
  font-size: 18px;
  background: transparent;
  color: var(--fc-text);
}
.fc-compose-actions { text-align: right; margin-top: 8px; }
.fc-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  background: var(--fc-accent);
  color: #fff;
  cursor: pointer;
}

.fc-tweet {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eff3f4;
}
.fc-avatar {
  width: 48px; height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1da1f2, #794bc4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.fc-tweet-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; margin-bottom: 2px; }
.fc-tweet-meta strong { font-weight: 700; }
.fc-handle, .fc-tweet-meta span { color: #536471; font-size: 14px; }
.fc-post-title {
  margin: 2px 0 8px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.fc-post-title a {
  color: var(--fc-text, #0f1419);
  text-decoration: none;
}
.fc-post-title a:hover {
  color: #1d9bf0;
  text-decoration: underline;
}
.fc-msg .fc-post-title {
  font-size: 16px;
  margin: 4px 0 6px;
}
.fc-msg .fc-post-title a { color: inherit; }
.fc-tweet-body { font-size: 15px; line-height: 1.4; }
.fc-tweet-body p { margin: 0 0 6px; }
.fc-mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}
.fc-mod-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #536471;
  cursor: pointer;
  text-decoration: none;
}
.fc-mod-btn:hover { color: #1d9bf0; }
.fc-mod-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.fc-mod-delete { color: #b91c1c; }
.fc-mod-delete:hover { color: #991b1b; }
.fc-tweet-actions { display: flex; gap: 16px; margin-top: 8px; max-width: 360px; }
.fc-action { color: #536471; font-size: 14px; text-decoration: none; min-width: 36px; }
.fc-empty { padding: 32px 16px; text-align: center; color: var(--fc-text-muted); }

.fc-footer {
  text-align: center;
  padding: 24px 16px calc(16px + var(--fc-safe-bottom));
  font-size: 13px;
  color: var(--fc-text-muted);
  border-top: 1px solid var(--fc-border);
  background: var(--fc-bg-muted);
}
.fc-registrar-note {
  text-align: center;
  font-size: 11px;
  color: var(--fc-text-muted) !important;
  padding: 8px;
}

#respond { padding: 16px; border-top: 1px solid #eff3f4; }
.comment-form input, .comment-form textarea {
  width: 100%;
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font: inherit;
}

/* ── Paper & pencil → full wp-admin editor ── */
.fc-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
}
.fc-header-icon:hover { background: #f1f5f9; color: var(--fc-accent); }
.fc-paper-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--fc-border);
  color: var(--fc-text-muted);
  text-decoration: none;
}
.fc-paper-link:hover { color: var(--fc-accent); border-color: var(--fc-accent); }

/* ── Splash fold (landing only) ── */
.fc-splash {
  min-height: calc(100dvh - 100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--fc-border);
  background: var(--fc-bg);
}
.fc-splash-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}
@media (max-width: 768px) {
  .fc-splash-inner { grid-template-columns: 1fr; padding: 28px 16px 56px; }
  .fc-phone { display: none; }
}
.fc-splash h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.fc-splash h1 .accent { color: var(--fc-accent); }
.fc-splash p {
  font-size: 16px;
  color: var(--fc-text-muted);
  max-width: 440px;
  margin-bottom: 24px;
}
.fc-splash-scroll {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  color: var(--fc-text-muted);
  text-decoration: none;
}

/* ── Working GUI (AJAX) ── */
.fc-work {
  background: var(--fc-bg-muted);
  padding: 28px 16px calc(40px + var(--fc-safe-bottom));
  border-top: 1px solid var(--fc-border);
}
.fc-work-inner {
  max-width: 680px;
  margin: 0 auto;
}
.fc-work-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.fc-work-tab {
  flex: 1;
  border: 1px solid var(--fc-border);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  color: var(--fc-text-muted);
}
.fc-work-tab.is-active {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: #fff;
}
.fc-panel {
  background: #fff;
  border: 1px solid var(--fc-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.fc-panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--fc-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fc-panel-head strong { font-size: 15px; }
.fc-panel-head span { font-size: 12px; color: var(--fc-text-muted); }
.fc-inline-form { padding: 14px 16px; }
.fc-inline-form input[type="text"],
.fc-inline-form input[type="email"],
.fc-inline-form textarea {
  width: 100%;
  border: 1px solid var(--fc-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  font: inherit;
  background: var(--fc-bg);
  color: var(--fc-text);
}
.fc-inline-form textarea { min-height: 72px; resize: vertical; }
.fc-guest-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 480px) {
  .fc-guest-fields { grid-template-columns: 1fr; }
}
.fc-inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.fc-inline-status { font-size: 12px; color: var(--fc-text-muted); margin-right: auto; }
.fc-inline-status.is-ok { color: #16a34a; }
.fc-inline-status.is-err { color: #dc2626; }
.fc-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  background: var(--fc-accent);
  color: #fff;
  cursor: pointer;
}
.fc-thread {
  max-height: min(52vh, 480px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.fc-msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #eff3f4;
}
.fc-msg.is-reply { padding-left: 28px; background: #fafbfc; }
.fc-msg .fc-avatar {
  width: 40px; height: 40px; font-size: 15px;
}
.fc-msg-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; margin-bottom: 2px; }
.fc-msg-meta span { color: #536471; }
.fc-msg-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.fc-reply-btn {
  margin-top: 6px;
  border: 0;
  background: none;
  color: var(--fc-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.fc-composer-sticky {
  border-top: 1px solid var(--fc-border);
  background: #fff;
}
.fc-chat-page-top {
  max-width: 680px;
  margin: 24px auto 0;
  padding: 0 16px;
}
.fc-chat-page-top h1 { font-size: 24px; font-weight: 800; margin-top: 8px; }
.fc-recent-posts { border-top: 1px solid var(--fc-border); }

