/* Wrapper & header */
.ttb-lec-wrapper {
  background: #f3f4f6;
  border-radius: 16px;
  padding: 24px;
  margin: 20px auto;
  max-width: 980px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.ttb-lec-title {
  margin: 0 0 4px 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
}

.ttb-lec-subtitle {
  margin: 0 0 12px 0;
  color: #4b5563;
  font-size: 14px;
}

/* Toolbar (improved look) */
.ttb-lec-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 16px;
}

.ttb-lec-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 10px;
  font-weight: 600;
  color: #111827;
}

.ttb-lec-toggle input { transform: translateY(1px); }

.ttb-lec-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 10px;
  color: #111827;
  font-weight: 600;
}
.ttb-lec-select label { font-size: 13px; color: #374151; }
.ttb-lec-select select {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 8px 28px 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%),
    linear-gradient(to right, #d1d5db, #d1d5db);
  background-position:
    calc(100% - 18px) calc(1em - 1px),
    calc(100% - 13px) calc(1em - 1px),
    calc(100% - 2.2em) 0.35em;
  background-size: 5px 5px, 5px 5px, 1px 1.4em;
  background-repeat: no-repeat;
}

/* Count chips */
/* Chips + Clear button */
.ttb-lec-chips {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.ttb-lec-chip {
  background: #eef2ff;
  color: #1e3a8a;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 12px;
}
.ttb-lec-chip--valid { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.ttb-lec-chip--removed { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.ttb-lec-btn--clear {
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  margin-left: 10px;
}
.ttb-lec-btn--clear:hover {
  background: #dc2626;
}


/* Buttons */
.ttb-lec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.02s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.ttb-lec-btn:active { transform: translateY(1px); }
.ttb-lec-btn--primary { background: #111827; color: #fff; border-color: #111827; flex-grow: 1; }
.ttb-lec-btn--primary:hover { box-shadow: 0 3px 10px rgba(17,24,39,0.25); }

/* Card blocks */
.ttb-lec-card {
  background: #fff;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 16px;
  position: relative;
}
.ttb-lec-label { font-weight: 700; color: #111827; display: inline-block; margin-bottom: 8px; }
.ttb-lec-hint { font-size: 12px; color: #6b7280; margin-top: 8px; }

/* Stacked outputs header with Copy button */
.ttb-lec-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ttb-copy-btn {
  background-color: #10b981;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

/* Textareas */
.ttb-lec-textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  font-size: 14px;
  border: 1px solid #c7c7c7;
  border-radius: 10px;
  resize: vertical;
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Section titles */
.ttb-lec-h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}
.ttb-lec-muted { color: #6b7280; font-weight: 600; font-size: 13px; }

/* Removed list */
.ttb-lec-removed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.ttb-lec-removed-list li {
  background: #fff;
  border: 1px dashed #e5e7eb;
  border-left: 4px solid #ef4444;
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ttb-lec-removed-email {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #111827;
  word-break: break-all;
}

.ttb-lec-reason { color: #b91c1c; font-weight: 800; }

