/* TV Budget Widget - C&I Studios
 * Refined editorial B&W. Strictly black & white (errors keep a functional red).
 * All selectors namespaced .tvb-
 */

/* ── Base panel ───────────────────────────────────────────────────────────── */
.tvb-widget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: transparent;
  color: #c9c9c9;
  max-width: 640px;
  margin: 0 auto;
  padding: 76px 24px 88px;
  border: none;
  box-sizing: border-box;
}
.tvb-widget *,
.tvb-widget *::before,
.tvb-widget *::after { box-sizing: border-box; }

/* Blog lead-in prompt (sits in article content, just above the widget). !important
   to beat the host theme's .entry-content p styles. */
.tvb-leadin {
  text-align: center !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 1.25rem !important;
  line-height: 1.45 !important;
  color: #ffffff !important;
  max-width: 560px !important;
  margin: 40px auto -28px !important;
  padding: 0 20px !important;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
.tvb-heading {
  font-family: Georgia, 'Times New Roman', serif;
  color: #ffffff;
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: 0.01em;
  margin: 0 0 14px 0;
  text-align: center;
}
/* Small editorial kicker above the capture-form heading only */
.tvb-form-wrap .tvb-heading::before {
  content: 'C\0026I Studios';
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #767676;
  margin-bottom: 18px;
}
.tvb-subhead {
  color: #8c8c8c;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 36px 0;
  text-align: center;
  text-wrap: pretty;
}
.tvb-section-head {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #b0b0b0;
  margin: 28px 0 12px 0;
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.tvb-form-wrap,
.tvb-spinner-wrap,
.tvb-analyze-wrap,
.tvb-teaser-wrap,
.tvb-reveal-wrap,
.tvb-full-wrap,
.tvb-pending-wrap,
.tvb-error-wrap,
.tvb-download-wrap { width: 100%; }

.tvb-form { display: flex; flex-direction: column; gap: 26px; }

.tvb-field-group { display: flex; flex-direction: column; gap: 8px; }

/* First + last name side by side */
.tvb-name-row { display: flex; gap: 28px; }
.tvb-name-row .tvb-field-group { flex: 1; min-width: 0; }

.tvb-label {
  font-size: 0.7rem;
  color: #8c8c8c;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Underline-style inputs */
.tvb-input,
.tvb-select {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  color: #ffffff;
  padding: 11px 2px;
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.25s ease;
  appearance: none;
  -webkit-appearance: none;
}
.tvb-input:focus,
.tvb-select:focus { border-bottom-color: #ffffff; }
.tvb-input::placeholder { color: rgba(255, 255, 255, 0.36); }
.tvb-select option { background: #111111; color: #f5f5f5; }

/* File upload */
.tvb-file {
  width: 100%;
  color: #9a9a9a;
  font-size: 0.9rem;
  padding: 4px 0;
  cursor: pointer;
}
.tvb-file::file-selector-button {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  padding: 11px 20px;
  margin-right: 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tvb-file::file-selector-button:hover { background: #ffffff; color: #000000; }
.tvb-file::-webkit-file-upload-button {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  padding: 11px 20px;
  margin-right: 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.tvb-confidentiality {
  font-size: 0.78rem;
  color: #6f6f6f;
  margin: 8px 0 0 0;
  font-style: italic;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.tvb-btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 16px 28px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  line-height: 1;
}
.tvb-btn:active:not(:disabled) { transform: translateY(1px); }
.tvb-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Standout: solid white (the $250 team budget + primary CTA) */
.tvb-btn-primary { background: #ffffff; color: #000000; border-color: #ffffff; }
.tvb-btn-primary:hover:not(:disabled) { background: #d6d6d6; border-color: #d6d6d6; }

/* Understated: ghost outline (the $25 estimate + secondary actions) */
.tvb-btn-secondary { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.45); }
.tvb-btn-secondary:hover:not(:disabled) { border-color: #ffffff; background: rgba(255, 255, 255, 0.07); }

.tvb-btn-block { width: 100%; margin-top: 14px; }

.tvb-option-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #8c8c8c;
  text-align: center;
  text-wrap: pretty;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* Start over */
.tvb-startover { text-align: center; margin: 26px 0 0; }
.tvb-startover-link {
  color: #8c8c8c; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.tvb-startover-link:hover { color: #ffffff; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.tvb-spinner-wrap { display: flex; flex-direction: column; align-items: center; padding: 52px 0; gap: 22px; }
.tvb-spinner {
  width: 42px; height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: tvb-spin 0.8s linear infinite;
}
@keyframes tvb-spin { to { transform: rotate(360deg); } }
.tvb-spinner-text {
  color: #8c8c8c; font-size: 0.78rem; margin: 0;
  text-transform: uppercase; letter-spacing: 0.16em;
}

/* ── Analyzing (progress bar) ─────────────────────────────────────────────── */
.tvb-analyze-wrap {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 24px 0;
}
.tvb-analyze-wrap .tvb-subhead { max-width: 460px; }
.tvb-progress {
  width: 100%; max-width: 380px; height: 3px;
  background: rgba(255, 255, 255, 0.14);
  margin: 4px auto 0; overflow: hidden;
}
.tvb-progress-fill {
  height: 100%; width: 0; background: #ffffff;
  transition: width 0.4s linear;
}
.tvb-progress-status {
  color: #8c8c8c; font-size: 0.72rem; margin: 18px 0 0;
  text-transform: uppercase; letter-spacing: 0.16em;
}

/* ── Teaser ──────────────────────────────────────────────────────────────── */
.tvb-teaser-table { margin: 24px 0 28px 0; display: flex; flex-direction: column; }
.tvb-teaser-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tvb-teaser-row:first-child { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.tvb-teaser-label { font-size: 0.78rem; color: #cfcfcf; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.tvb-teaser-blur { font-size: 0.95rem; color: #9a9a9a; filter: blur(5px); user-select: none; letter-spacing: 0.05em; }
.tvb-lock-icon { font-style: normal; filter: none; }

/* ── Reveal ──────────────────────────────────────────────────────────────── */
.tvb-reveal-table { margin: 24px 0 28px 0; }
.tvb-reveal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tvb-reveal-row:first-child { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.tvb-reveal-total { border-bottom-width: 2px; border-bottom-color: rgba(255, 255, 255, 0.35); }
.tvb-reveal-total .tvb-reveal-label,
.tvb-reveal-total .tvb-reveal-range { color: #ffffff; font-size: 1.05rem; font-weight: 700; }
.tvb-reveal-label { font-size: 0.78rem; color: #cfcfcf; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.tvb-reveal-range { font-family: Georgia, serif; font-size: 1.05rem; color: #ffffff; font-weight: 500; }

.tvb-drivers { margin: 0 0 24px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.tvb-driver-item { font-size: 0.9rem; color: #9a9a9a; line-height: 1.55; }

/* ── Full detail (unused in widget now, kept for admin/PDF parity) ─────────── */
.tvb-detail-section { margin-bottom: 28px; }
.tvb-detail-cat {
  color: #ffffff; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  margin: 0 0 12px 0; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.tvb-line-table { }
.tvb-line-row {
  display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 10px; align-items: center;
  padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.875rem;
}
.tvb-line-hdr { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: #767676; }
.tvb-line-subtotal { font-weight: 600; color: #ffffff; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.tvb-line-name { color: #cfcfcf; }
.tvb-line-range { color: #ffffff; font-weight: 600; text-align: right; }
.tvb-line-note { color: #767676; font-size: 0.8rem; }

.tvb-download-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 30px 0 20px 0; }
.tvb-email-note { font-size: 0.85rem; color: #767676; margin: 0; }

/* ── Pending ─────────────────────────────────────────────────────────────── */
.tvb-pending-wrap { padding: 30px 0; text-align: center; }
.tvb-pending-text { color: #9a9a9a; font-size: 0.98rem; line-height: 1.65; }

/* ── Disclaimer ──────────────────────────────────────────────────────────── */
.tvb-disclaimer {
  font-size: 0.8rem; color: #767676; line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 18px; margin: 24px 0 0 0;
}
.tvb-disclaimer-link { color: #ffffff; text-decoration: underline; text-underline-offset: 2px; }
.tvb-disclaimer-link:hover { color: #c9c9c9; }

/* ── Error ───────────────────────────────────────────────────────────────── */
.tvb-error { color: #f08a8a; font-size: 0.875rem; margin: 8px 0; }
.tvb-error-wrap { padding: 24px 0; display: flex; flex-direction: column; gap: 18px; }
.tvb-hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .tvb-widget { padding: 34px 24px; }
  .tvb-heading { font-size: 1.55rem; }
  .tvb-name-row { flex-direction: column; gap: 26px; }
  .tvb-line-row { grid-template-columns: 1fr 1fr; }
  .tvb-line-note { display: none; }
}
