#cf-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Lexend Deca', sans-serif;
}

/* ── Trigger button ── */
#cf-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FF007F;
  border: none;
  border-radius: 100px;
  padding: 12px 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,0,127,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: 'Lexend Deca', sans-serif;
}

#cf-trigger:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 28px rgba(255,0,127,0.5);
}

#cf-trigger-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.8);
}

/* ── Overlay ── */
#cf-overlay {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#cf-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#cf-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,8,40,0.7);
  backdrop-filter: blur(5px);
}

/* ── Panel ── */
#cf-panel {
  position: relative;
  width: min(94vw, 1040px);
  height: min(86vh, 780px);
  background: #100E40;
  border: 1px solid #2e2b7a;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 340px 1fr;
  transform: translateY(16px);
  transition: transform 0.3s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

#cf-overlay.open #cf-panel {
  transform: translateY(0);
}

/* ── Chat sidebar ── */
#cf-chat {
  background: #0a0820;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e1c50;
}

#cf-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #1e1c50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#cf-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

#cf-brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF007F;
}

#cf-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: #F2F2F2;
  letter-spacing: -0.01em;
}

#cf-beta {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FF007F;
  background: rgba(255,0,127,0.12);
  border: 1px solid rgba(255,0,127,0.25);
  padding: 2px 7px;
  border-radius: 100px;
}

#cf-close {
  background: none;
  border: none;
  color: #444;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px;
  font-family: 'Lexend Deca', sans-serif;
}

#cf-close:hover { color: #F2F2F2; }

/* ── Messages ── */
#cf-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #2a2926 transparent;
}

.cf-msg { font-size: 13px; line-height: 1.6; }

.cf-bot {
  color: #a8a6c8;
  background: #14112e;
  border: 1px solid #1e1c50;
  border-radius: 4px 12px 12px 12px;
  padding: 11px 14px;
}

.cf-user {
  color: #fff;
  background: #FF007F;
  border-radius: 12px 4px 12px 12px;
  padding: 10px 14px;
  align-self: flex-end;
  max-width: 220px;
}

/* ── Suggestions ── */
#cf-suggestions {
  padding: 0 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cf-sug {
  font-size: 12px;
  color: #444;
  border: 1px solid #1e1c50;
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  background: none;
  text-align: left;
  transition: border-color 0.15s, color 0.15s;
  font-family: 'Lexend Deca', sans-serif;
}

.cf-sug:hover { border-color: #FF007F; color: #FF007F; }

/* ── Input row ── */
#cf-input-row {
  padding: 12px 16px;
  border-top: 1px solid #1e1c50;
  display: flex;
  gap: 8px;
}

#cf-input {
  flex: 1;
  background: #14112e;
  border: 1px solid #1e1c50;
  border-radius: 8px;
  color: #F2F2F2;
  font-size: 13px;
  font-family: 'Lexend Deca', sans-serif;
  padding: 9px 13px;
  outline: none;
  transition: border-color 0.2s;
}

#cf-input:focus { border-color: #FF007F; }
#cf-input::placeholder { color: #333; }

#cf-send {
  background: #FF007F;
  border: none;
  border-radius: 8px;
  color: white;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
  font-family: 'Lexend Deca', sans-serif;
}

#cf-send:hover { background: #d4006a; }

/* ── Results panel ── */
#cf-results {
  display: flex;
  flex-direction: column;
  background: #100E40;
  overflow: hidden;
}

#cf-results-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid #2e2b7a;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: #160f4a;
}

#cf-results-title {
  font-size: 19px;
  font-weight: 600;
  color: #F2F2F2;
  letter-spacing: -0.01em;
}

#cf-results-count { font-size: 12px; color: #a8a6c8; }

#cf-results-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: #2e2b7a transparent;
}

#cf-empty {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  font-size: 13px;
  color: #a8a6c8;
  text-align: center;
  line-height: 1.8;
}

/* ── Work cards ── */
.cf-card {
  background: #160f4a;
  border: 1px solid #2e2b7a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.18s;
  cursor: pointer;
}

.cf-card:hover {
  border-color: #FF007F;
  transform: translateY(-2px);
}

.cf-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1760;
  display: block;
  overflow: hidden;
}

.cf-card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cf-card-thumb-placeholder {
  font-size: 10px;
  color: #2e2b7a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cf-card-body {
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cf-card-client {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #04D960;
}

.cf-card-title {
  font-size: 12px;
  font-weight: 500;
  color: #F2F2F2;
  line-height: 1.35;
}

.cf-card-type { font-size: 11px; color: #a8a6c8; }

/* ── Media badges ── */
.cf-card-badge {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 100px;
}

.cf-badge-video { background: rgba(255,0,127,0.85); color: #fff; }
.cf-badge-audio { background: rgba(4,217,96,0.85); color: #0a0820; }
.cf-badge-pdf   { background: rgba(249,220,92,0.85); color: #0a0820; }

/* ── Typing indicator ── */
.cf-typing { color: #555 !important; font-style: italic; }

.cf-dot {
  display: inline-block;
  animation: cfDotBounce 1.2s infinite;
  font-style: normal;
}

.cf-dot:nth-child(2) { animation-delay: 0.2s; }
.cf-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes cfDotBounce {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-3px); }
}

/* ── In-widget lightbox ── */
#cf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(10,8,40,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#cf-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

#cf-lb-panel {
  background: #160f4a;
  border: 1px solid #2e2b7a;
  border-radius: 14px;
  width: min(92vw, 860px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #2e2b7a transparent;
}

#cf-lb-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  color: #555; font-size: 20px;
  cursor: pointer; line-height: 1;
  transition: color 0.2s; padding: 4px;
  font-family: 'Lexend Deca', sans-serif;
}

#cf-lb-close:hover { color: #F2F2F2; }

#cf-lb-title {
  font-size: 20px; font-weight: 600;
  color: #F2F2F2; line-height: 1.2;
  padding-right: 32px;
}

#cf-lb-type {
  font-size: 13px; color: #04D960;
  font-weight: 500;
}

#cf-lb-desc {
  font-size: 14px; font-weight: 300;
  color: #a8a6c8; line-height: 1.75;
}

/* Media containers */
.cf-lb-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0; overflow: hidden;
  border-radius: 8px;
  background: #0a0820;
}

.cf-lb-video iframe,
.cf-lb-video video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none; border-radius: 8px;
}

.cf-lb-image img {
  width: 100%; height: auto;
  border-radius: 8px; display: block;
}

.cf-lb-audio audio {
  width: 100%; margin-top: 8px;
}

.cf-lb-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px; font-weight: 500;
  color: #04D960;
  border: 1px solid #04D960;
  padding: 10px 18px; border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  width: fit-content;
  margin-top: 4px;
}

.cf-lb-pdf-btn:hover { background: #04D960; color: #0a0820; }

#cf-widget .cf-card-thumb img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
}
