/* SWG Reckoning Creatures — Ravaio / Reckoning palette
   Root html font-size is 10px; use rem for readable scale. */

.swg-creatures-chunk,
.swg-creatures,
.swg-creatures-filters,
.swg-creatures-table-wrap,
.swg-creatures .action-bar-top,
.swg-creatures .action-bar-bottom {
	width: 100%;
	max-width: 100%;
	clear: both;
	display: block;
	box-sizing: border-box;
}

.swg-creatures {
	margin: 0 0 1.5rem;
	color: #e0e0e0;
	font-size: 1.4rem;
	line-height: 1.5;
}

/* Compact in-chunk title (fallback when #sub-header not used) */
.swg-creatures-hero {
	margin: 0 0 1.5rem;
	padding: 0 0 1rem;
	border-bottom: 1px solid #2e3a40;
	background: none;
	border-radius: 0;
	box-shadow: none;
}

.swg-creatures-title,
.swg-creatures .pages-title {
	margin: 0 0 0.4rem;
	font-size: 2.4rem;
	font-weight: 300;
	letter-spacing: 0.02em;
	color: #fafafa;
}

.swg-creatures-sub {
	margin: 0;
	color: #cccccc;
	font-size: 1.3rem;
}

.swg-creatures-back {
	margin: 0 0 1.2rem;
	font-size: 1.3rem;
}

.swg-creatures-back a {
	color: #cccccc;
}

.swg-creatures-back a:hover {
	color: #b03b05;
}

/* Filters */
.swg-creatures-filters {
	margin: 0 0 1.5rem;
	padding: 1.4rem 1.5rem;
	border-radius: 2px;
	border: 1px solid #2e3a40;
	background: #222d32;
	font-size: 1.4rem;
}

.swg-filter-search {
	margin-bottom: 1rem;
}

.swg-search-input,
.swg-filter-field .inputbox,
.swg-filter-field select,
.swg-filter-field input[type="number"] {
	width: 100%;
	box-sizing: border-box;
	background: #263238;
	border: 1px solid #0d1113;
	color: #e0e0e0;
	border-radius: 2px;
	padding: 0.6rem 0.8rem;
	font-size: 1.3rem;
	min-height: 3.2rem;
}

.swg-search-input:focus,
.swg-filter-field .inputbox:focus,
.swg-filter-field select:focus,
.swg-filter-field input[type="number"]:focus {
	border-color: #b03b05;
	outline: none;
}

.swg-filter-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem 1.2rem;
	margin-bottom: 1rem;
}

.swg-filter-field label {
	display: block;
	font-size: 1.2rem;
	margin-bottom: 0.35rem;
	color: #c9a0a0;
}

.swg-filter-flags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem 1.4rem;
	margin-bottom: 1.1rem;
}

.swg-flag {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.3rem;
	color: #e0e0e0;
	cursor: pointer;
}

/* Visible checkboxes (Ravaio often hides native inputs) */
.swg-flag input[type="checkbox"] {
	-webkit-appearance: checkbox;
	appearance: checkbox;
	width: 1.6rem;
	height: 1.6rem;
	min-width: 1.6rem;
	min-height: 1.6rem;
	margin: 0;
	accent-color: #b03b05;
	cursor: pointer;
	opacity: 1;
	visibility: visible;
	position: static;
	flex-shrink: 0;
}

.swg-filter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
}

/* Reckoning orange apply button */
.swg-creatures-filters .button,
.swg-creatures .button {
	border-radius: 2px;
	background: #b03b05;
	color: #fafafa !important;
	border: none;
	box-shadow: none;
	font-size: 1.3rem;
	padding: 0.9rem 1.8rem;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.swg-creatures-filters .button:hover,
.swg-creatures .button:hover {
	background: #c26e00;
	color: #ffffff !important;
}

.swg-reset {
	color: #ae8e8e;
	font-size: 1.3rem;
	text-decoration: underline;
}

.swg-reset:hover {
	color: #b03b05;
}

/* Action bars — force full width clear */
.swg-creatures .action-bar-top,
.swg-creatures .action-bar-bottom {
	clear: both;
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	text-align: left;
	font-size: 1.3rem;
}

.swg-creatures .action-bar-top {
	border-bottom: 1px solid #2e3a40;
	margin: 0 0 1.5rem;
	padding-bottom: 0.6rem;
}

.swg-creatures .action-bar-bottom {
	border-top: 1px solid #2e3a40;
	margin: 1.2rem 0 1.5rem;
	padding-top: 0.6rem;
}

.swg-creatures .action-bar-top .pagination,
.swg-creatures .action-bar-bottom .pagination {
	float: none;
	display: block;
	width: 100%;
	font-size: 1.3rem;
	line-height: 1.5;
	color: #cccccc;
}

/* Table */
.swg-creatures-table-wrap {
	overflow-x: auto;
	border-radius: 2px;
	border: 1px solid #2e3a40;
	background: #222d32;
	margin-bottom: 1.2rem;
}

.swg-creatures-table,
table.table.swg-creatures-table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	border: none;
	margin: 0;
	table-layout: auto;
	box-sizing: border-box;
}

.swg-creatures-table th,
.swg-creatures-table td {
	padding: 1rem 1.2rem;
	border-bottom: 1px solid #2e3a40;
	text-align: left;
	vertical-align: middle;
	font-size: 1.3rem;
	color: #e0e0e0;
}

.swg-creatures-table th {
	background: #2e3a40;
	color: #fafafa;
	font-weight: 600;
	font-size: 1.2rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.swg-creatures-table th a {
	color: #fafafa;
	text-decoration: none;
}

.swg-creatures-table th a:hover {
	color: #ffcc80;
}

.swg-creatures-table tbody tr:hover {
	background: rgba(176, 59, 5, 0.14);
}

.swg-creatures-table tbody tr:last-child td {
	border-bottom: none;
}

.swg-creatures-table a,
.swg-creature-link {
	color: #f0f0f0;
	font-weight: 600;
}

.swg-creatures-table a:hover,
.swg-creature-link:hover {
	color: #b03b05;
}

.swg-col-cl,
.swg-col-ham,
.swg-col-damage {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.swg-col-meat,
.swg-col-hide,
.swg-col-bone {
	font-size: 1.2rem;
	white-space: nowrap;
	max-width: 14rem;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Chips */
.swg-chip {
	display: inline-block;
	margin: 0 0.25rem 0.25rem 0;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 1.1rem;
	line-height: 1.4;
	border: 1px solid rgba(176, 59, 5, 0.45);
	background: rgba(194, 110, 0, 0.22);
	color: #ffcc80;
	white-space: nowrap;
}

.swg-chip-ok {
	border-color: rgba(90, 180, 120, 0.45);
	background: rgba(70, 150, 100, 0.22);
	color: #81c784;
}

.swg-chip-warn {
	border-color: rgba(220, 170, 70, 0.45);
	background: rgba(180, 130, 40, 0.22);
	color: #ffcc80;
}

.swg-chip-danger {
	border-color: rgba(220, 90, 90, 0.45);
	background: rgba(160, 50, 50, 0.25);
	color: #ef9a9a;
}

.swg-chip-accent {
	border-color: rgba(176, 59, 5, 0.6);
	background: rgba(176, 59, 5, 0.28);
	color: #ffab91;
}

#sub-header .swg-chip {
	vertical-align: middle;
}

.swg-creatures-empty {
	text-align: center;
	padding: 2.4rem 1.2rem;
	color: #cccccc;
	font-size: 1.4rem;
	background: #222d32;
	border: 1px dashed #374c56;
	border-radius: 2px;
}

/* Detail */
.swg-detail-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.2rem;
	clear: both;
	width: 100%;
}

.swg-detail-card {
	background: #222d32;
	border: 1px solid #2e3a40;
	border-radius: 2px;
	padding: 1.2rem 1.4rem;
	box-sizing: border-box;
}

.swg-detail-card h3 {
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #374c56;
	font-size: 1.4rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fafafa;
}

.swg-dl {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(9em, 42%) 1fr;
	gap: 0.45rem 0.9rem;
	font-size: 1.3rem;
}

.swg-dl dt {
	margin: 0;
	color: #ae8e8e;
	font-size: 1.2rem;
}

.swg-dl dd {
	margin: 0;
	font-weight: 600;
	color: #e8e8e8;
}

.swg-resist-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.swg-resist-row {
	display: grid;
	grid-template-columns: 8em 1fr 4em;
	gap: 0.6rem;
	align-items: center;
	margin-bottom: 0.5rem;
	font-size: 1.3rem;
}

.swg-resist-label {
	font-size: 1.2rem;
	color: #c9a0a0;
}

.swg-resist-bar-wrap {
	height: 0.7rem;
	border-radius: 999px;
	background: #2e3a40;
	overflow: hidden;
}

.swg-resist-bar {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #c26e00, #b03b05);
}

.swg-resist-value {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-size: 1.2rem;
	color: #e0e0e0;
}

.swg-resist-empty {
	opacity: 0.45;
}

.swg-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

@media (max-width: 900px) {
	.swg-creatures-table .swg-col-meat,
	.swg-creatures-table .swg-col-hide,
	.swg-creatures-table .swg-col-bone {
		display: none;
	}
}

@media (max-width: 700px) {
	.swg-creatures-table .swg-col-damage,
	.swg-creatures-table .swg-col-flags {
		display: none;
	}

	.swg-resist-row {
		grid-template-columns: 6.5em 1fr 3.5em;
	}

	.swg-dl {
		grid-template-columns: 1fr;
		gap: 0.15rem 0;
	}

	.swg-dl dt {
		margin-top: 0.5rem;
	}
}
