/* Franklin Forge Digital chat helper styles. Brand colors live here. */
.ffdc {
  --ffdc-bg: #121416;
  --ffdc-panel: #1B1F23;
  --ffdc-text: #ECE7E0;
  --ffdc-muted: #a7a19a;
  --ffdc-orange: #FF7A1A;
  --ffdc-gold: #FFC53D;
  --ffdc-line: #2c3238;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ffdc-text);
  font-size: 15px;
  line-height: 1.4;
}
.ffdc *, .ffdc *::before, .ffdc *::after { box-sizing: border-box; }

.ffdc-launch {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
  background: var(--ffdc-orange); color: #121416;
  border: 0; border-radius: 999px;
  padding: 12px 18px;
  font: 600 16px/1 "Barlow Condensed", "Barlow", system-ui, sans-serif;
  letter-spacing: .02em; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.ffdc-launch {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ffdc-gold) 0%, var(--ffdc-orange) 55%, #ff5a00 100%);
  border: 2px solid rgba(255,197,61,.9);
  padding: 14px 20px; font-size: 18px;
  animation: ffdc-glow 2.4s ease-in-out infinite;
}
/* light sweep across the button, like a spark on hot metal */
.ffdc-launch::after {
  content: ""; position: absolute; top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent);
  transform: rotate(20deg);
  animation: ffdc-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ffdc-glow {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,.45), 0 0 0 0 rgba(255,122,26,.7); }
  50% { box-shadow: 0 6px 24px rgba(0,0,0,.45), 0 0 22px 6px rgba(255,122,26,.55); }
}
@keyframes ffdc-shine {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}
.ffdc-launch:hover { background: var(--ffdc-gold); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .ffdc-launch, .ffdc-launch::after { animation: none; }
  .ffdc-launch { box-shadow: 0 0 18px 4px rgba(255,122,26,.55); }
}
.ffdc-launch:focus-visible, .ffdc button:focus-visible, .ffdc input:focus-visible, .ffdc a:focus-visible {
  outline: 2px solid var(--ffdc-gold); outline-offset: 2px;
}
.ffdc[data-open="true"] .ffdc-launch { display: none; }

.ffdc-panel {
  display: none;
  flex-direction: column;
  width: 370px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 32px);
  background: var(--ffdc-bg);
  border: 1px solid var(--ffdc-line);
  border-top: 3px solid var(--ffdc-orange);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
.ffdc[data-open="true"] .ffdc-panel { display: flex; }

.ffdc-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 12px 14px; background: var(--ffdc-panel);
  border-bottom: 1px solid var(--ffdc-line);
}
.ffdc-title { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.ffdc-title strong { font: 600 18px/1.1 "Barlow Condensed", "Barlow", sans-serif; letter-spacing: .02em; }
.ffdc-sub { grid-column: 2; color: var(--ffdc-muted); font: 12px/1.3 "IBM Plex Mono", ui-monospace, monospace; }
.ffdc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ffdc-orange); box-shadow: 0 0 8px var(--ffdc-orange); }
.ffdc-close {
  background: none; border: 0; color: var(--ffdc-text);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px;
}

.ffdc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ffdc-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; word-wrap: break-word; }
.ffdc-msg p { margin: 0; }
.ffdc-msg p + p { margin-top: 6px; }
.ffdc-bot { background: var(--ffdc-panel); border: 1px solid var(--ffdc-line); border-bottom-left-radius: 4px; align-self: flex-start; }
.ffdc-user { background: var(--ffdc-orange); color: #121416; border-bottom-right-radius: 4px; align-self: flex-end; font-weight: 500; }
.ffdc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ffdc-links a { color: var(--ffdc-gold); font-weight: 600; text-decoration: underline; }

.ffdc-choices { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ffdc-choices:empty { display: none; }
.ffdc-chip {
  background: transparent; color: var(--ffdc-text);
  border: 1px solid var(--ffdc-orange); border-radius: 999px;
  padding: 7px 12px; font: 500 14px/1.1 "Barlow", system-ui, sans-serif;
  cursor: pointer;
}
.ffdc-chip:hover { background: var(--ffdc-orange); color: #121416; }

.ffdc-input { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--ffdc-line); background: var(--ffdc-panel); }
.ffdc-input input {
  flex: 1; min-width: 0;
  background: var(--ffdc-bg); color: var(--ffdc-text);
  border: 1px solid var(--ffdc-line); border-radius: 8px;
  padding: 10px; font: 16px "Barlow", system-ui, sans-serif; /* 16px stops iPhone zoom */
}
.ffdc-send {
  background: var(--ffdc-orange); color: #121416; border: 0; border-radius: 8px;
  padding: 0 14px; font: 600 15px "Barlow Condensed", "Barlow", sans-serif; text-transform: uppercase; cursor: pointer;
}
.ffdc-honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ffdc-foot { padding: 6px 14px 10px; background: var(--ffdc-panel); color: var(--ffdc-muted); font: 11px/1.3 "IBM Plex Mono", ui-monospace, monospace; }

@media (max-width: 479px) {
  .ffdc { right: 12px; bottom: 12px; }
  .ffdc[data-open="true"] { left: 0; right: 0; top: 0; bottom: 0; }
  .ffdc[data-open="true"] .ffdc-panel { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; }
}
