/* Dexi Agent overlay — small, safe UI that doesn't fight the site theme */
:root{
  --tvcf-dexi-radius: 18px;
  --tvcf-dexi-shadow: 0 18px 60px rgba(0,0,0,.35);
}

.tvcf-dexi-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(245,158,11,.95), rgba(245,158,11,.82));
  box-shadow: 0 10px 30px rgba(245,158,11,.18), 0 14px 40px rgba(0,0,0,.25);
  color: #111;
  font-weight: 800;
  letter-spacing: .2px;
}
.tvcf-dexi-fab:hover{ filter: brightness(1.05); }
.tvcf-dexi-fab:active{ transform: translateY(1px); }
.tvcf-dexi-fab .tvcf-dexi-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(16,185,129,.95);
  box-shadow: 0 0 0 4px rgba(16,185,129,.14);
}

.tvcf-dexi-panel{
  position: fixed;
  right: 18px;
  bottom: 74px;
  width: 380px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - 110px);
  z-index: 999999;
  display: none;
  border-radius: var(--tvcf-dexi-radius);
  overflow: hidden;
  box-shadow: var(--tvcf-dexi-shadow);
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(1200px 500px at 20% 10%, rgba(245,158,11,.08), transparent 55%),
              linear-gradient(180deg, rgba(11,16,32,.96), rgba(6,10,20,.96));
  color: #e5e7eb;
}
.tvcf-dexi-panel.is-open{ display: flex; flex-direction: column; }

.tvcf-dexi-header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.tvcf-dexi-title{ display:flex; flex-direction:column; gap:2px; }
.tvcf-dexi-title strong{ font-size: 15px; color:#fff; }
.tvcf-dexi-title span{ font-size:12px; opacity:.8; }

/* Role / context mode bar */
.tvcf-dexi-modebar{
  display:flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.16);
}
.tvcf-dexi-mode{
  cursor:pointer;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.92);
}
.tvcf-dexi-mode:hover{ background: rgba(255,255,255,.08); }
.tvcf-dexi-mode.is-active{
  border-color: rgba(245,158,11,.45);
  background: rgba(245,158,11,.18);
}

/* Next step banner (Phase 4-ish feel) */
.tvcf-dexi-next{
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(245,158,11,.08);
}
.tvcf-dexi-next-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px;
  border: 1px solid rgba(245,158,11,.20);
  background: rgba(0,0,0,.18);
  border-radius: 14px;
  padding: 10px 10px;
}
.tvcf-dexi-next-text{ font-size: 12px; color: rgba(255,255,255,.92); }
.tvcf-dexi-next-btn{
  cursor:pointer;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid rgba(245,158,11,.55);
  background: rgba(245,158,11,.20);
  color: #fff;
  font-weight: 800;
}
.tvcf-dexi-next-btn:hover{ background: rgba(245,158,11,.28); }

.tvcf-dexi-close{
  width: 34px; height: 34px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 10px;
  cursor:pointer;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color:#fff;
}
.tvcf-dexi-close:hover{ background: rgba(255,255,255,.10); }

.tvcf-dexi-body{
  flex: 1;
  padding: 12px;
  overflow: auto;
}

.tvcf-dexi-msg{
  display:flex;
  margin: 10px 0;
}
.tvcf-dexi-msg .bubble{
  max-width: 88%;
  border-radius: 16px;
  padding: 10px 12px;
  line-height: 1.35;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.tvcf-dexi-msg.user{ justify-content:flex-end; }
.tvcf-dexi-msg.user .bubble{
  background: linear-gradient(180deg, rgba(245,158,11,.92), rgba(245,158,11,.74));
  color:#111;
  border-color: rgba(245,158,11,.55);
}

.tvcf-dexi-msg.security .bubble{
  max-width: 96%;
  border-color: rgba(245,158,11,.55);
  background: rgba(245,158,11,.10);
  color: #fff;
  font-size: 12px;
}

.tvcf-dexi-actions{
  display:flex; flex-wrap:wrap;
  gap: 8px;
  margin-top: 8px;
}
.tvcf-dexi-action-btn{
  cursor:pointer;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
}
.tvcf-dexi-action-btn:hover{ background: rgba(255,255,255,.10); }
.tvcf-dexi-action-btn.primary{
  background: rgba(245,158,11,.22);
  border-color: rgba(245,158,11,.35);
  color: #fff;
}

.tvcf-dexi-quick{
  display:flex; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 2px;
}
.tvcf-dexi-pill,
.tvcf-dexi-chip{
  cursor:pointer;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.95);
}
.tvcf-dexi-pill:hover,
.tvcf-dexi-chip:hover{ background: rgba(255,255,255,.08); }

/* Phase 2: highlight + focus helpers */
.tvcf-dexi-highlight{
  outline: 3px solid rgba(245,158,11,.95);
  box-shadow: 0 0 0 6px rgba(245,158,11,.18), 0 25px 80px rgba(0,0,0,.45);
  transform: translateZ(0);
}

.tvcf-dexi-footer{
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.tvcf-dexi-form{ display:flex; gap: 8px; margin-top: 8px; }
.tvcf-dexi-input{
  flex: 1;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff;
  outline: none;
}
.tvcf-dexi-input::placeholder{ color: rgba(229,231,235,.6); }
.tvcf-dexi-send{
  border-radius: 14px;
  padding: 10px 12px;
  cursor:pointer;
  border: 1px solid rgba(245,158,11,.55);
  background: linear-gradient(180deg, rgba(245,158,11,.95), rgba(245,158,11,.78));
  color:#111;
  font-weight: 800;
}
.tvcf-dexi-send:hover{ filter: brightness(1.05); }

/* Checklist drawer */
.tvcf-dexi-drawer{ margin-top: 2px; }
.tvcf-dexi-drawer-toggle{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  cursor:pointer;
  border-radius: 14px;
  padding: 10px 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color:#fff;
}
.tvcf-dexi-drawer-toggle:hover{ background: rgba(255,255,255,.07); }
.tvcf-dexi-drawer-title{ font-weight: 900; font-size: 12px; letter-spacing:.2px; }
.tvcf-dexi-drawer-sub{ font-size: 12px; opacity: .85; }
.tvcf-dexi-drawer-caret{ opacity:.8; }
.tvcf-dexi-drawer.is-open .tvcf-dexi-drawer-caret{ transform: rotate(180deg); }
.tvcf-dexi-drawer-body{
  display: none;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.14);
  padding: 10px;
}
.tvcf-dexi-drawer.is-open .tvcf-dexi-drawer-body{ display:block; }
.tvcf-dexi-taskhead{ display:flex; align-items:flex-start; justify-content:space-between; gap: 10px; margin-bottom: 10px; }
.tvcf-dexi-tasktitle{ color:#fff; font-size: 12px; }
.tvcf-dexi-taskmeta{ font-size: 11px; opacity: .8; margin-top: 2px; }
.tvcf-dexi-taskreset{
  cursor:pointer;
  border-radius: 12px;
  padding: 7px 9px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
}
.tvcf-dexi-taskreset:hover{ background: rgba(255,255,255,.10); }

.tvcf-dexi-tasklist{ display:flex; flex-direction:column; gap: 8px; }
.tvcf-dexi-task{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px;
  border-radius: 14px;
  padding: 8px 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.tvcf-dexi-task.is-done{ opacity: .85; }
.tvcf-dexi-task-left{ display:flex; align-items:center; gap: 10px; }
.tvcf-dexi-task-left input{ width: 16px; height: 16px; }
.tvcf-dexi-task-name{ font-size: 12px; color: rgba(255,255,255,.95); display:flex; align-items:center; gap: 8px; }
.tvcf-dexi-task-tag{
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(245,158,11,.35);
  background: rgba(245,158,11,.18);
  color: rgba(255,255,255,.95);
}
.tvcf-dexi-task-do{
  cursor:pointer;
  border-radius: 12px;
  padding: 7px 9px;
  font-size: 12px;
  border: 1px solid rgba(245,158,11,.45);
  background: rgba(245,158,11,.18);
  color: #fff;
  font-weight: 800;
}
.tvcf-dexi-task-do:hover{ background: rgba(245,158,11,.26); }

@media (max-width: 520px){
  .tvcf-dexi-panel{ width: calc(100vw - 24px); right: 12px; }
  .tvcf-dexi-fab{ right: 12px; }
}
