.container {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-field);
	background: var(--color-bg);
}

.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--s-2) var(--s-3);
	background: var(--color-bg-higher);
	border: none;
	border-radius: var(--radius-field);
	cursor: pointer;
	font-size: var(--font-sm);
	font-weight: var(--weight-semi);
	color: var(--color-text);
	width: 100%;
	text-align: left;

	&:hover {
		background: var(--color-bg-high);
	}
}

.headerTitle {
	flex: 1;
}

.collapseIcon {
	font-size: var(--font-lg);
	font-weight: var(--weight-bold);
	color: var(--color-text-high);
	width: 20px;
	text-align: center;
}

.content {
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
	padding: var(--s-3);
}

.comboRow {
	display: flex;
	align-items: center;
	gap: var(--s-4);
}

.barSection {
	position: relative;
	display: flex;
	flex: 1;
	background-color: var(--color-bg-high);
	border-radius: var(--radius-selector);
	overflow: hidden;
}

.segmentWrapper {
	display: flex;
	flex-direction: column;
	min-width: fit-content;
}

.segment {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--s-1);
	height: 36px;
	padding: 0 var(--s-2);
	color: var(--color-text-inverse);
	font-weight: var(--weight-semi);

	&[data-slot-color="yellow"] {
		background-color: #f5d742;
	}

	&[data-slot-color="pink"] {
		background-color: #f5b8d0;
	}

	&[data-slot-color="green"] {
		background-color: #90e8a8;
	}

	&[data-slot-color="blue"] {
		background-color: #8cd4f5;
	}
}

.damageTypeLabel {
	font-size: var(--font-2xs);
	color: var(--color-text-high);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: var(--s-0-5) var(--s-0-5);
	background: none;
	border: 1px solid transparent;
	border-radius: var(--radius-selector);
	cursor: pointer;

	&:hover {
		text-decoration: line-through;
	}
}

.damageValue {
	font-size: var(--font-sm);
	font-weight: var(--weight-bold);
}

.hitMultiplier {
	font-size: var(--font-2xs);
	font-weight: var(--weight-semi);
	opacity: 0.8;
	margin-left: var(--s-0-5);
}

.weaponIcon {
	min-width: 24px;
	min-height: 24px;
}

.subSpecialWeaponIcon {
	min-width: 18px;
	min-height: 18px;
}

.thresholdLine {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background-image: repeating-linear-gradient(
		to bottom,
		rgb(80 80 100) 0,
		rgb(80 80 100) 5px,
		transparent 5px,
		transparent 10px
	);
	pointer-events: none;
	z-index: 1;
}

.totalSection {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	min-width: 60px;
	flex-shrink: 0;
}

.totalDamage {
	font-size: var(--font-xl);
	font-weight: var(--weight-bold);
}

.hitCount {
	font-size: var(--font-sm);
	color: var(--color-text-high);
}

.singleWeaponToggleRow {
	display: flex;
	padding-block-end: var(--s-3);
	border-block-end: 1px solid var(--color-border);
	margin-block-end: var(--s-1);
}

.filterControlsRow {
	display: flex;
	gap: var(--s-2);
	padding-block-end: var(--s-2);
	border-block-end: 1px solid var(--color-border);
	margin-block-end: var(--s-1);
}

.filterControlButton {
	padding: var(--s-1) var(--s-2);
	background: var(--color-bg-higher);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-field);
	font-size: var(--font-xs);
	color: var(--color-text);
	cursor: pointer;
	transition: background-color 0.15s ease;

	&:hover:not(:disabled) {
		background: var(--color-bg-high);
	}

	&:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}
}

.filteredItemsRow {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	padding-bottom: var(--s-2);
	border-bottom: 1px solid var(--color-border);
	margin-bottom: var(--s-1);
}

.filteredItem {
	display: flex;
	align-items: center;
	gap: var(--s-1);
	padding: var(--s-1) var(--s-2);
	background: var(--color-bg-higher);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-field);
	font-size: var(--font-xs);
	color: var(--color-text-high);
	cursor: pointer;
	transition: background-color 0.15s ease;

	&:hover {
		background: var(--color-bg-high);
	}
}

.slidersContainer {
	display: grid;
	grid-template-columns: auto auto 1fr auto;
	gap: var(--s-2) var(--s-2);
	align-items: center;
	padding-bottom: var(--s-3);
	border-bottom: 1px solid var(--color-border);
	margin-bottom: var(--s-1);
}

@container (width < 640px) {
	.slidersContainer {
		grid-template-columns: auto 1fr auto;
	}

	/* Row 1: icon 1 + label 1 */
	.slidersContainer > :nth-child(1) {
		grid-row: 1;
		grid-column: 1;
	}

	.slidersContainer > :nth-child(2) {
		grid-row: 1;
		grid-column: 2 / -1;
	}

	/* Row 2: slider 1 + value 1 */
	.slidersContainer > :nth-child(3) {
		grid-row: 2;
		grid-column: 1 / 3;
	}

	.slidersContainer > :nth-child(4) {
		grid-row: 2;
		grid-column: 3;
	}

	/* Row 3: icon 2 + label 2 */
	.slidersContainer > :nth-child(5) {
		grid-row: 3;
		grid-column: 1;
	}

	.slidersContainer > :nth-child(6) {
		grid-row: 3;
		grid-column: 2 / -1;
	}

	/* Row 4: slider 2 + value 2 */
	.slidersContainer > :nth-child(7) {
		grid-row: 4;
		grid-column: 1 / 3;
	}

	.slidersContainer > :nth-child(8) {
		grid-row: 4;
		grid-column: 3;
	}
}

.resSliderLabel {
	font-size: var(--font-sm);
	color: var(--color-text-high);
	white-space: nowrap;
}

.resSlider {
	min-width: 100%;
	cursor: pointer;
}

.resSliderValue {
	font-size: var(--font-sm);
	font-weight: var(--weight-semi);
}
.inkTimeSegment {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--s-1);
	height: 36px;
	padding: 0 var(--s-2);
	background: repeating-linear-gradient(
		-45deg,
		var(--color-bg-higher) 0,
		var(--color-bg-higher) 4px,
		var(--color-bg-high) 4px,
		var(--color-bg-high) 8px
	);
	color: var(--color-text);
	font-weight: var(--weight-semi);
	min-width: fit-content;
}

.inkTimeDamage {
	font-size: var(--font-sm);
	font-weight: var(--weight-bold);
	color: var(--color-text);
}

.inkTimeLabel {
	font-size: var(--font-2xs);
	color: var(--color-text-second);
	text-align: center;
	white-space: nowrap;
	padding: var(--s-0-5) var(--s-0-5);
	font-weight: var(--weight-semi);
}
