/* ==========================================================================
   EMBL Feature Extractor — Tool-specific styles
   Shared Benchling-style framework: tools/common/tbb-sequence-tools.css
   ========================================================================== */

/* ── Textarea ────────────────────────────────────────────────────────────── */
.tbb-embl-feat-extractor .tbb-seq-textarea {
	min-height: 240px;
}

/* ── Output max-height ───────────────────────────────────────────────────── */
@media ( min-width: 900px ) {
	.tbb-embl-feat-extractor .tbb-seq-output-pre {
		max-height: 500px;
	}
}

/* ── Output mode selector ────────────────────────────────────────────────── */
.tbb-efe-mode-row {
	display:     flex;
	align-items: center;
	gap:         10px;
	flex-wrap:   wrap;
	margin-top:  12px;
	margin-bottom: 4px;
}

.tbb-efe-mode-label {
	font-size:   13px;
	font-weight: 600;
	color:       var(--tbb-seq-text);
	white-space: nowrap;
	flex-shrink: 0;
}

.tbb-efe-mode-select {
	flex:         1 1 auto;
	min-width:    200px;
	max-width:    420px;
	padding:      6px 28px 6px 10px;
	font-size:    13px;
	font-family:  inherit;
	color:        var(--tbb-seq-text);
	background:   var(--tbb-seq-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236e7781'/%3E%3C/svg%3E") no-repeat right 10px center;
	background-size: 10px 6px;
	border:       1px solid var(--tbb-seq-border);
	border-radius: var(--tbb-seq-radius-sm);
	appearance:   none;
	-webkit-appearance: none;
	cursor:       pointer;
	transition:   border-color 120ms ease, box-shadow 120ms ease;
}

.tbb-efe-mode-select:focus {
	outline:    none;
	border-color: var(--tbb-seq-primary);
	box-shadow: 0 0 0 3px var(--tbb-seq-primary-light);
}

/* ── Feature-type chip grid ──────────────────────────────────────────────── */
.tbb-efe-type-grid {
	display:   flex;
	flex-wrap: wrap;
	gap:       8px;
	margin-top: 4px;
}

.tbb-efe-chip {
	display:        inline-flex;
	align-items:    center;
	gap:            0;
	border-radius:  var(--tbb-seq-radius-sm);
	font-size:      12px;
	font-weight:    500;
	border:         1px solid transparent;
	overflow:       hidden;
	line-height:    1;
}

/* Feature key (left pill, coloured) */
.tbb-efe-chip-key {
	padding:     5px 8px;
	font-weight: 700;
	font-family: var(--tbb-seq-font-mono);
	font-size:   11px;
	white-space: nowrap;
}

/* Human-readable label (centre section) */
.tbb-efe-chip-label {
	padding:     5px 8px;
	white-space: nowrap;
	border-left: 1px solid rgba(0,0,0,.08);
	border-right: 1px solid rgba(0,0,0,.08);
}

/* Count badge (right, always slightly dark) */
.tbb-efe-chip-count {
	padding:     5px 8px;
	font-weight: 700;
	font-size:   11px;
	background:  rgba(0,0,0,.06);
	white-space: nowrap;
}

/* Colour variants ── 6-colour rotating palette */
.tbb-efe-chip--blue {
	background:   var(--tbb-seq-primary-light);
	border-color: var(--tbb-seq-primary);
	color:        var(--tbb-seq-primary);
}
.tbb-efe-chip--blue .tbb-efe-chip-key { background: var(--tbb-seq-primary); color: #fff; }

.tbb-efe-chip--green {
	background:   var(--tbb-seq-success-light);
	border-color: var(--tbb-seq-success);
	color:        var(--tbb-seq-success);
}
.tbb-efe-chip--green .tbb-efe-chip-key { background: var(--tbb-seq-success); color: #fff; }

.tbb-efe-chip--purple {
	background:   #ede9fe;
	border-color: #7c3aed;
	color:        #5b21b6;
}
.tbb-efe-chip--purple .tbb-efe-chip-key { background: #7c3aed; color: #fff; }

.tbb-efe-chip--teal {
	background:   #ccfbf1;
	border-color: #0f766e;
	color:        #0f766e;
}
.tbb-efe-chip--teal .tbb-efe-chip-key { background: #0f766e; color: #fff; }

.tbb-efe-chip--orange {
	background:   #fef3c7;
	border-color: #d97706;
	color:        #92400e;
}
.tbb-efe-chip--orange .tbb-efe-chip-key { background: #d97706; color: #fff; }

.tbb-efe-chip--rose {
	background:   #ffe4e6;
	border-color: #e11d48;
	color:        #9f1239;
}
.tbb-efe-chip--rose .tbb-efe-chip-key { background: #e11d48; color: #fff; }

/* ── Warnings panel ──────────────────────────────────────────────────────── */
.tbb-efe-warnings {
	padding:       10px 14px;
	background:    var(--tbb-seq-warning-light);
	border:        1px solid #eac54f;
	border-radius: var(--tbb-seq-radius-sm);
	margin-bottom: 0;
}

.tbb-efe-warn-list {
	display:        flex;
	flex-direction: column;
	gap:            6px;
}

.tbb-efe-warn-item {
	display:     flex;
	align-items: flex-start;
	gap:         8px;
	font-size:   12px;
	color:       #7d5700;
	line-height: 1.45;
}

.tbb-efe-warn-icon {
	flex-shrink: 0;
	font-style:  normal;
	margin-top:  1px;
}

/* ── Warnings section label ──────────────────────────────────────────────── */
.tbb-efe-warn-heading {
	font-size:     11px;
	font-weight:   700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color:         #92400e;
	margin-bottom: 8px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.tbb-efe-mode-row { flex-direction: column; align-items: flex-start; }
	.tbb-efe-mode-select { max-width: 100%; }
	.tbb-efe-chip-label { display: none; } /* save space on small screens */
}

@media ( prefers-reduced-motion: reduce ) {
	.tbb-efe-mode-select { transition: none; }
}
