/* Bull Briefing widget — frontend styles.
 * Scoped to .bullb. 300px wide, works in any sidebar.
 */
.bullb {
  --bullb-accent: #a7c838;
  --bullb-ink: #353332;
  --bullb-line: #e8e5de;
  --bullb-muted: #8a857c;
  --bullb-bg: #f6f5f1;
  width: 300px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--bullb-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--bullb-ink);
  box-sizing: border-box;
  line-height: 1.4;
}
.bullb *, .bullb *::before, .bullb *::after { box-sizing: border-box; }

.bullb__header {
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bullb-line);
}
.bullb__brand { display: flex; align-items: center; gap: 8px; }
.bullb__badge {
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--bullb-accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; letter-spacing: -0.4px;
}
.bullb__brandname { font-size: 12px; font-weight: 700; color: var(--bullb-ink); letter-spacing: -0.2px; }
.bullb__live {
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  color: var(--bullb-accent); background: color-mix(in srgb, var(--bullb-accent) 12%, transparent);
  padding: 3px 7px; border-radius: 3px;
}

.bullb__news { padding: 16px 18px 18px; border-bottom: 1px solid var(--bullb-line); }

.bullb__kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  color: var(--bullb-accent); text-transform: uppercase;
}
.bullb__kicker i { width: 14px; height: 2px; background: var(--bullb-accent); border-radius: 1px; display: inline-block; }

.bullb__cover {
  margin-top: 12px; height: 120px; border-radius: 6px;
  background-color: var(--bullb-bg);
  background-image: repeating-linear-gradient(135deg, var(--bullb-bg), var(--bullb-bg) 8px, #eeece6 8px, #eeece6 16px);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 10px;
}
.bullb__cover-label {
  position: absolute; top: 8px; left: 10px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 9px; color: var(--bullb-muted); letter-spacing: 0.5px;
}
.bullb__tag {
  background: var(--bullb-ink); color: #fff;
  font-size: 9px; font-weight: 600; letter-spacing: 0.8px;
  padding: 4px 7px; border-radius: 3px;
  position: relative; z-index: 1;
}

.bullb__headline {
  margin: 12px 0 8px; font-size: 16px; font-weight: 700;
  line-height: 1.25; color: var(--bullb-ink); letter-spacing: -0.3px;
  text-wrap: pretty;
}
.bullb__excerpt { margin: 0; font-size: 12.5px; line-height: 1.5; color: #5a5751; }
.bullb__meta {
  margin-top: 10px; font-size: 10.5px; color: var(--bullb-muted);
  display: flex; gap: 10px; align-items: center;
}
.bullb__meta i { width: 3px; height: 3px; border-radius: 2px; background: var(--bullb-muted); }

.bullb__picks { padding: 16px 18px; }
.bullb__subtitle {
  margin: 8px 0 12px; font-size: 14px; font-weight: 700;
  color: var(--bullb-ink); letter-spacing: -0.2px; line-height: 1.3;
}

/* ── Stock row ─────────────────────────────────── */
.bullb__stocks { display: flex; flex-direction: column; gap: 6px; position: relative; }
.bullb__row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #fff;
  border: 1px solid var(--bullb-line); border-radius: 6px;
}
.bullb__ticker {
  width: 34px; height: 34px; border-radius: 6px;
  background: color-mix(in srgb, var(--bullb-accent) 15%, transparent);
  color: var(--bullb-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; letter-spacing: 0.3px; flex-shrink: 0;
}
.bullb__body { flex: 1; min-width: 0; }
.bullb__line1 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.bullb__name {
  font-size: 12px; font-weight: 700; color: var(--bullb-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bullb__chg {
  font-size: 10.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.bullb__chg.is-up { color: #3d7a1b; }
.bullb__chg.is-down { color: #c94a4a; }
.bullb__thesis { font-size: 10.5px; color: #6a6760; line-height: 1.35; margin-top: 2px; }

/* ── Variant A: blur fade ───────────────────────── */
.bullb[data-variant="blur"] .bullb__row-wrap {
  transition: filter .5s cubic-bezier(.2,.7,.3,1) var(--delay, 0ms), opacity .5s var(--delay, 0ms);
  filter: blur(6px); opacity: .85;
}
.bullb[data-variant="blur"] .bullb__fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,.85) 100%);
  transition: opacity .4s;
}
.bullb[data-variant="blur"].is-revealed .bullb__row-wrap { filter: none; opacity: 1; }
.bullb[data-variant="blur"].is-revealed .bullb__fade { opacity: 0; }

/* ── Variant B: vault ───────────────────────────── */
.bullb__vault {
  background: var(--bullb-ink); color: #fff;
  border-radius: 8px; padding: 18px 14px 16px;
  margin-bottom: 8px;
  transition: opacity .35s, transform .35s, max-height .45s;
  max-height: 220px; overflow: hidden;
}
.bullb__vault-lock {
  display: flex; justify-content: center; margin-bottom: 10px;
}
.bullb__vault-lock::before {
  content: ''; position: absolute;
}
.bullb__vault-lock {
  position: relative;
}
.bullb__vault-lock svg {
  width: 44px; height: 44px; padding: 13px; border-radius: 22px;
  background: var(--bullb-accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--bullb-accent) 15%, transparent);
}
.bullb__vault-tickers { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.bullb__vault-tickers span {
  padding: 4px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.4);
  filter: blur(2px);
}
.bullb__vault-hint { font-size: 11px; text-align: center; opacity: .72; line-height: 1.4; margin: 0 8px; }

.bullb[data-variant="vault"] .bullb__stocks { display: none; }
.bullb[data-variant="vault"].is-revealed .bullb__vault { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; }
.bullb[data-variant="vault"].is-revealed .bullb__stocks { display: flex; }
.bullb[data-variant="vault"].is-revealed .bullb__row-wrap {
  animation: bullbVaultIn .5s var(--delay, 0ms) both cubic-bezier(.2,.7,.3,1);
}
@keyframes bullbVaultIn {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* ── Variant C: flip ────────────────────────────── */
.bullb__flip { perspective: 900px; height: 64px; }
.bullb__flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2,.7,.3,1) var(--delay, 0ms);
}
.bullb__flip-back, .bullb__flip-front {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: 6px;
}
.bullb__flip-back {
  background: var(--bullb-ink); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bullb-accent) 27%, transparent);
}
.bullb__flip-back svg { color: var(--bullb-accent); }
.bullb__flip-num {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 22px; font-weight: 700; color: var(--bullb-accent);
}
.bullb__flip-word { font-size: 10.5px; opacity: .6; letter-spacing: 1px; }
.bullb__flip-front { transform: rotateY(180deg); }
.bullb[data-variant="flip"].is-revealed .bullb__flip-inner { transform: rotateY(180deg); }

/* ── Form ───────────────────────────────────────── */
.bullb__form,
.bullb__ktform {
  display: flex; flex-direction: column; gap: 6px; margin-top: 14px;
  transition: opacity .3s, max-height .4s;
  overflow: hidden; max-height: 600px;
}
/* Normalise Klick-Tipp's injected markup so it fits the 300px widget */
.bullb__ktform form { margin: 0 !important; }
.bullb__ktform input[type="email"],
.bullb__ktform input[type="text"] {
  width: 100% !important; height: 34px; padding: 0 10px; font-size: 12px;
  border: 1px solid var(--bullb-line); border-radius: 5px; outline: none;
  color: var(--bullb-ink); background: #fff; box-sizing: border-box;
  font-family: inherit; margin-bottom: 6px;
}
.bullb__ktform input[type="submit"],
.bullb__ktform button[type="submit"] {
  width: 100%; height: 36px; background: var(--bullb-accent) !important;
  color: #fff !important; border: none !important; border-radius: 5px !important;
  font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer; font-family: inherit; text-transform: uppercase;
}
.bullb.is-revealed .bullb__ktform { opacity: 0; max-height: 0; margin-top: 0; pointer-events: none; }
.bullb__email {
  height: 34px; padding: 0 10px; font-size: 12px;
  border: 1px solid var(--bullb-line); border-radius: 5px;
  outline: none; color: var(--bullb-ink); background: #fff;
  font-family: inherit;
}
.bullb__email:focus { border-color: var(--bullb-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bullb-accent) 20%, transparent); }
.bullb__email.is-error { border-color: #c94a4a; }

.bullb__cta {
  height: 36px; background: var(--bullb-accent); color: #fff; border: none;
  border-radius: 5px; font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer; font-family: inherit; text-transform: uppercase;
  transition: filter .15s;
}
.bullb__cta:hover { filter: brightness(1.06); }
.bullb__cta:disabled { opacity: .7; cursor: wait; }
.bullb__error { font-size: 10.5px; color: #c94a4a; min-height: 0; }
.bullb__error:empty { display: none; }
.bullb__privacy { font-size: 9.5px; color: var(--bullb-muted); text-align: center; margin-top: 2px; }

.bullb__success {
  margin-top: 14px; padding: 10px 12px; border-radius: 6px;
  background: color-mix(in srgb, var(--bullb-accent) 15%, transparent);
  color: #3d5211; font-size: 11px;
  display: none; align-items: center; gap: 8px;
}
.bullb.is-revealed .bullb__form { opacity: 0; max-height: 0; margin-top: 0; pointer-events: none; }
.bullb.is-revealed .bullb__success { display: flex; }

/* ── Footer ─────────────────────────────────────── */
.bullb__footer {
  padding: 8px 18px; border-top: 1px solid var(--bullb-line);
  background: var(--bullb-bg); font-size: 9.5px; color: var(--bullb-muted);
  display: flex; justify-content: space-between; align-items: center;
}
