/* Fly Fishing Events — the embed builder.
 * Self-contained: the same plate-and-hairline look as the hub's own pages
 * (assets/industry.css), restated here under .ffe-builder so the builder
 * reads the same inside a WordPress theme that has never heard of it. */

.ffe-builder {
  --eb-ink: #1d1f20;
  --eb-ink-70: rgba(29, 31, 32, 0.78);
  --eb-ink-55: rgba(29, 31, 32, 0.72);
  --eb-plate: #f2f2f3;
  --eb-plate-2: #e4e4e6;
  --eb-rule: rgba(29, 31, 32, 0.16);
  --eb-accent: #5980a6;
  --eb-accent-700: #416180;
  --eb-accent-800: #2c455d;
  --eb-accent-900: #1d2d3d;
  --eb-font-head: 'Barlow Condensed', 'Barlow Semi Condensed', system-ui, sans-serif;
  --eb-font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --eb-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--eb-font-body); font-size: 15px; line-height: 1.55; color: var(--eb-ink);
}
.ffe-builder *, .ffe-builder *::before, .ffe-builder *::after { box-sizing: border-box; }
.ffe-builder a { color: var(--eb-accent-700); text-underline-offset: 3px; }
.ffe-builder button { font: inherit; }
.ffe-builder :focus-visible { outline: 2px solid var(--eb-accent); outline-offset: 2px; }

/* Two columns: the choices on the left, what they produce on the right,
   which stays put while the left scrolls. */
.ffe-builder .eb-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); gap: 18px; align-items: start; }
.ffe-builder .eb-side { position: sticky; top: 12px; }
@media (max-width: 900px) {
  .ffe-builder .eb-layout { grid-template-columns: 1fr; }
  .ffe-builder .eb-side { position: static; }
}

.ffe-builder .eb-panel {
  background: var(--eb-plate); border: 1px solid var(--eb-rule); border-radius: 0;
  padding: 18px 22px; margin: 0 0 14px;
}
.ffe-builder .eb-panel > :last-child { margin-bottom: 0; }
.ffe-builder .eb-panel h2 {
  margin: 0 0 12px; padding: 0 0 8px; border: 0; border-bottom: 1px solid var(--eb-rule);
  font-family: var(--eb-font-head); font-weight: 600; font-size: 13px; line-height: 1.3;
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--eb-ink-55);
}
.ffe-builder .eb-panel h2 .eb-step {
  display: inline-block; min-width: 20px; height: 20px; line-height: 20px;
  text-align: center; margin-right: 8px;
  background: var(--eb-accent-900); color: #fff; font-size: 12px; letter-spacing: 0;
}
.ffe-builder .eb-panel p { font-size: 15px; margin: 0 0 8px; }
.ffe-builder .eb-panel code { font-family: var(--eb-font-mono); font-size: 0.86em; background: var(--eb-plate-2); padding: 1px 5px; }

/* Templates: a grid of plates, one lit. */
.ffe-builder .eb-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ffe-builder .eb-template {
  text-align: left; cursor: pointer; color: inherit; border-radius: 0; box-shadow: none;
  background: var(--eb-plate); border: 1px solid var(--eb-rule); border-top: 3px solid var(--eb-rule);
  padding: 10px 12px 11px; min-height: 118px;
  display: flex; flex-direction: column; gap: 4px;
}
.ffe-builder .eb-template:hover { background: #fff; border-top-color: var(--eb-accent); }
.ffe-builder .eb-template.is-active { border-color: var(--eb-accent-900); border-top-color: var(--eb-accent); background: #fff; }
.ffe-builder .eb-template strong { font-family: var(--eb-font-head); font-weight: 600; font-size: 17px; line-height: 1.1; }
.ffe-builder .eb-template span { font-size: 12.5px; color: var(--eb-ink-55); line-height: 1.35; }
/* A tiny drawing of the shape each template makes. */
.ffe-builder .eb-thumb { display: flex; gap: 3px; align-items: flex-end; height: 26px; margin-bottom: 4px; }
.ffe-builder .eb-thumb i { display: block; background: var(--eb-accent); opacity: 0.55; }
.ffe-builder .eb-template.is-active .eb-thumb i, .ffe-builder .eb-template:hover .eb-thumb i { opacity: 0.9; }

/* Rows of controls. */
.ffe-builder .eb-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.ffe-builder .eb-field > span {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eb-ink-55);
}
.ffe-builder .eb-field input[type="text"], .ffe-builder .eb-field input[type="number"], .ffe-builder .eb-field select {
  font: inherit; font-size: 14px; padding: 7px 9px; color: var(--eb-ink); line-height: 1.3;
  background: #fff; border: 1px solid var(--eb-rule); border-radius: 0; max-width: 100%; box-shadow: none;
}
.ffe-builder .eb-field input[type="text"] { width: 100%; }
.ffe-builder .eb-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ffe-builder .eb-inline input[type="number"] { width: 84px; }
.ffe-builder .eb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ffe-builder .eb-chip {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3;
  padding: 5px 10px; cursor: pointer; color: var(--eb-ink); border-radius: 0; box-shadow: none;
  background: transparent; border: 1px solid var(--eb-rule); border-left: 3px solid var(--chip, var(--eb-rule));
}
.ffe-builder .eb-chip:hover { border-color: var(--eb-accent); background: transparent; color: var(--eb-ink); }
.ffe-builder .eb-chip.is-active, .ffe-builder .eb-chip.is-active:hover { background: var(--eb-accent-700); border-color: var(--eb-accent-700); color: #fff; }
.ffe-builder .eb-chip small { font-weight: 400; opacity: 0.75; margin-left: 4px; font-size: 11px; }
.ffe-builder .eb-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--eb-rule); background: #fff; }
.ffe-builder .eb-seg button {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.3;
  padding: 7px 12px; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--eb-ink); cursor: pointer;
}
.ffe-builder .eb-seg button + button { border-left: 1px solid var(--eb-rule); }
.ffe-builder .eb-seg button:hover { background: var(--eb-plate-2); color: var(--eb-ink); }
.ffe-builder .eb-seg button.is-active, .ffe-builder .eb-seg button.is-active:hover { background: var(--eb-accent-700); color: #fff; }
.ffe-builder .eb-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; }
.ffe-builder .eb-toggles label { display: flex; gap: 7px; align-items: flex-start; font-size: 14px; line-height: 1.3; margin: 0; }
.ffe-builder .eb-toggles input { margin: 3px 0 0; }
.ffe-builder .eb-colors { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.ffe-builder .eb-color { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 0; }
.ffe-builder .eb-color input[type="color"] { width: 34px; height: 26px; padding: 0; border: 1px solid var(--eb-rule); background: #fff; }
.ffe-builder .eb-hint { font-size: 13px; color: var(--eb-ink-55); margin: 4px 0 0; }
.ffe-builder .is-hidden { display: none !important; }

/* The preview: a plate with the device switch and the frame inside. */
.ffe-builder .eb-preview-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ffe-builder .eb-preview-head h2 { margin: 0; padding: 0; border: 0; }
.ffe-builder .eb-preview-head .eb-seg { margin-left: auto; }
.ffe-builder .eb-preview-wrap { background: var(--eb-plate-2); border: 1px solid var(--eb-rule); padding: 14px; overflow: auto; }
.ffe-builder .eb-preview-box { margin: 0 auto; max-width: 100%; transition: max-width 0.2s; font-size: 14px; color: var(--eb-ink-55); }
.ffe-builder .eb-preview-box iframe { background: transparent; }
.ffe-builder .eb-measure { font-size: 12.5px; color: var(--eb-ink-55); margin: 8px 0 0; }

/* The snippet: tabs, the code, and a copy button. */
.ffe-builder .eb-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--eb-ink); margin-bottom: 10px; }
.ffe-builder .eb-tab {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3;
  padding: 8px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 0; background: transparent;
  color: var(--eb-ink-55); cursor: pointer; margin-bottom: -1px; box-shadow: none;
}
.ffe-builder .eb-tab:hover { color: var(--eb-ink); background: transparent; }
.ffe-builder .eb-tab.is-active { color: var(--eb-ink); background: var(--eb-plate); border-color: var(--eb-ink); border-bottom-color: var(--eb-plate); }
.ffe-builder .eb-code {
  position: relative; margin: 0;
  font-family: var(--eb-font-mono); font-size: 12.5px; line-height: 1.5;
  background: #1d2d3d; color: #eef1f4; border: 0; border-radius: 0; padding: 12px 14px;
  white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto;
}
.ffe-builder .eb-copy {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3;
  padding: 9px 16px; border: 1px solid var(--eb-accent-700); border-radius: 0; box-shadow: none;
  background: var(--eb-accent-700); color: #fff; cursor: pointer;
}
.ffe-builder .eb-copy:hover { background: var(--eb-accent-800); color: #fff; }
.ffe-builder .eb-copy.is-done { background: #2e6e4e; border-color: #2e6e4e; }
.ffe-builder .eb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.ffe-builder .eb-actions a { font-size: 13.5px; }
.ffe-builder .eb-snippet-note { font-size: 13px; color: var(--eb-ink-55); margin: 8px 0 0; }

.ffe-builder details.eb-where summary { cursor: pointer; font-family: var(--eb-font-head); font-size: 17px; font-weight: 600; }
.ffe-builder details.eb-where dl { margin: 10px 0 0; font-size: 14px; }
.ffe-builder details.eb-where dt { font-weight: 600; margin-top: 8px; }
.ffe-builder details.eb-where dd { margin: 2px 0 0; color: var(--eb-ink-70); }

@media (max-width: 620px) {
  .ffe-builder .eb-panel { padding: 15px 16px; }
}

/* ---- intro line and the "?" on each heading ---------------------------- */
.ffe-builder .eb-intro {
  display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline;
  margin: 0 0 14px; font-size: 14px; color: var(--eb-ink-55);
}
.ffe-builder .eb-link {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--eb-accent-700); text-decoration: underline; text-underline-offset: 3px;
  font-size: inherit; font-family: inherit; box-shadow: none; border-radius: 0;
}
.ffe-builder .eb-link:hover { color: var(--eb-accent-800); background: none; }
.ffe-builder .eb-help {
  float: right; width: 20px; height: 20px; margin-left: 8px; padding: 0;
  border: 1px solid var(--eb-rule); border-radius: 50%; background: #fff; box-shadow: none;
  color: var(--eb-accent-700); font-family: var(--eb-font-body); font-size: 12px; font-weight: 700;
  line-height: 18px; text-align: center; letter-spacing: 0; text-transform: none; cursor: pointer;
}
.ffe-builder .eb-help:hover { border-color: var(--eb-accent-700); background: var(--eb-accent-700); color: #fff; }
.ffe-builder .eb-preview-head h2 .eb-help { float: none; vertical-align: middle; }

/* ---- the tour ------------------------------------------------------------ */
.eb-tour-veil { position: fixed; z-index: 2147482000; background: rgba(29, 31, 32, 0.58); }
.eb-tour-spot {
  position: fixed; z-index: 2147482001; pointer-events: none;
  box-shadow: 0 0 0 3px #5980a6;
  transition: left 0.2s, top 0.2s, width 0.2s, height 0.2s;
}
.eb-tour-callout {
  position: fixed; z-index: 2147482002; width: 340px; max-width: calc(100vw - 24px);
  background: #f2f2f3; color: #1d1f20; border: 1px solid #1d1f20; border-top: 3px solid #5980a6;
  padding: 14px 16px 12px; box-shadow: 0 12px 32px rgba(29, 31, 32, 0.28);
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14.5px; line-height: 1.5;
}
.eb-tour-callout:focus { outline: none; }
.eb-tour-callout.is-sheet {
  left: 12px !important; right: 12px; bottom: 12px; top: auto !important; width: auto;
}
.eb-tour-count {
  margin: 0 0 2px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(29, 31, 32, 0.65);
}
.eb-tour-title {
  margin: 0 0 6px; padding: 0; border: 0;
  font-family: 'Barlow Condensed', 'Barlow Semi Condensed', system-ui, sans-serif;
  font-size: 22px; font-weight: 600; line-height: 1.1; letter-spacing: 0.01em; text-transform: none; color: #1d1f20;
}
.eb-tour-body { margin: 0 0 12px; padding: 0; color: rgba(29, 31, 32, 0.85); }
.eb-tour-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.eb-tour-actions .eb-link {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px;
  color: rgba(29, 31, 32, 0.72); text-decoration: underline; text-underline-offset: 3px; box-shadow: none;
}
.eb-tour-nav { display: inline-flex; gap: 6px; }
.eb-tour-btn {
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3;
  padding: 8px 14px; cursor: pointer; border-radius: 0; box-shadow: none;
  border: 1px solid #1d1f20; background: transparent; color: #1d1f20;
}
.eb-tour-btn:hover { background: #fff; }
.eb-tour-next { background: #416180; border-color: #416180; color: #fff; }
.eb-tour-next:hover { background: #2c455d; border-color: #2c455d; }
.eb-tour-btn:focus-visible, .eb-tour-actions .eb-link:focus-visible { outline: 2px solid #5980a6; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .eb-tour-spot { transition: none; } }
