/* ===================== Analyse ===================== */
/* Dropzone drag state */
.analyse-dropzone.is-dragover {
  border-color: rgba(64, 255, 192, 0.55);
  box-shadow: 0 0 0 3px rgba(64, 255, 192, 0.18);
  background: rgba(64, 255, 192, 0.06);
}

/* Tabs */
.analyse-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 14px;
  border-bottom: 1px solid var(--border);
}

.analyse-tab {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  user-select: none;
  transition:
    color 0.12s ease,
    border-color 0.12s ease;
}

.analyse-tab:hover {
  color: var(--text);
}

.analyse-tab.is-active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.analyse-tab svg {
  width: 16px;
  height: 16px;
}

/* Two column layout inside panel */
.analyse-grid {
  display: grid;
  grid-template-columns: 1.65fr 0.95fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 980px) {
  .analyse-grid {
    grid-template-columns: 1fr;
  }
}

/* Dropzone */
.analyse-dropzone {
  display: block;
  cursor: pointer;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
  padding: 18px;
  text-align: center;
}
.analyse-dropzone:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.32);
}
.analyse-dropzone:focus-within {
  box-shadow: 0 0 0 3px rgba(64, 255, 192, 0.22);
  border-color: rgba(64, 255, 192, 0.55);
}
.analyse-drop-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(64, 255, 192, 0.12);
  border: 1px solid rgba(64, 255, 192, 0.22);
  color: rgba(64, 255, 192, 0.95);
  margin: 0 auto 10px;
}
.analyse-drop-icon svg {
  width: 22px;
  height: 22px;
}

/* Textarea */
.analyse-textarea {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.92);
  padding: 12px;
  font: inherit;
  outline: none;
}
.analyse-textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.analyse-textarea:focus {
  border-color: rgba(64, 255, 192, 0.45);
  box-shadow: 0 0 0 4px rgba(64, 255, 192, 0.12);
  background: rgba(0, 0, 0, 0.26);
}

/* Help card */
.analyse-help {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}
.analyse-help .k {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}
.analyse-help .muted {
  font-size: 13px;
  line-height: 1.55;
}

/* Selected file row */
.analyse-selected {
  margin-top: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.16);
  padding: 12px;
}
.analyse-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  font-size: 12.5px;
}

/* Demo grid */
.panel-demo {
  margin-top: 14px;
}

.analyse-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .analyse-demo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .analyse-demo-grid {
    grid-template-columns: 1fr;
  }
}

.analyse-demo {
  width: 100%;
  text-align: left;
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.analyse-demo:hover {
  background: rgba(255, 255, 255, 0.06);
}

.analyse-demo.is-selected {
  background: rgba(64, 255, 192, 0.14);
  border-color: rgba(64, 255, 192, 0.35);
}

.analyse-demo-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.analyse-avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.analyse-avatar-icon {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
  flex-shrink: 0;
}

.analyse-avatar-icon svg {
  width: 18px;
  height: 18px;
}

.analyse-demo-title {
  font-weight: 900;
  color: rgba(255, 255, 255, 0.95);
}

.analyse-demo-metaline {
  margin-top: 2px;
  font-size: 11.5px;
  opacity: 0.65;
}

.analyse-demo-fulldesc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.analyse-demo-desc {
  margin-top: 10px;
  font-size: 12.5px;
}

#demoSelectedBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(64, 255, 192, 0.18);
  border: 1px solid rgba(64, 255, 192, 0.35);
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 700;
}

.demo-badge-label {
  opacity: 0.75;
}

.demo-badge-value {
  white-space: nowrap;
}

/* Bottom CTA row */
.analyse-cta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.analyse-cta .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Hide native file input but keep accessible */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
