/* 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;
	}
}

/* Trainer locations map */
.swg-trainers-nav-link {
	color: #ffcc80;
	text-decoration: underline;
}

.swg-trainers-nav-link:hover {
	color: #ffffff;
}

.swg-trainer-map-panel {
	margin: 0 0 1.5rem;
	padding: 1.4rem 1.5rem;
	border-radius: 2px;
	border: 1px solid #2e3a40;
	background: #222d32;
}

.swg-trainer-map-head {
	margin: 0 0 1rem;
}

.swg-trainer-map-title {
	margin: 0 0 0.4rem;
	font-size: 1.6rem;
	font-weight: 600;
	color: #fafafa;
}

.swg-trainer-map-help {
	margin: 0;
	font-size: 1.2rem;
	color: #ae8e8e;
	line-height: 1.45;
}

.swg-trainer-map {
	position: relative;
	width: min(100%, 640px);
	aspect-ratio: 1 / 1;
	margin: 0 auto;
	border: 1px solid #0d1113;
	border-radius: 2px;
	background:
		linear-gradient(to right, rgba(194, 110, 0, 0.08) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
		linear-gradient(to bottom, rgba(194, 110, 0, 0.08) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
		#263238;
	box-shadow: inset 0 0 0 1px rgba(46, 58, 64, 0.8);
	overflow: hidden;
}

.swg-trainer-map-grid {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.swg-trainer-map-grid::before,
.swg-trainer-map-grid::after {
	content: "";
	position: absolute;
	background: rgba(194, 110, 0, 0.55);
	z-index: 1;
}

/* Origin crosshair */
.swg-trainer-map-grid::before {
	left: 50%;
	top: 0;
	bottom: 0;
	width: 1px;
	transform: translateX(-0.5px);
}

.swg-trainer-map-grid::after {
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	transform: translateY(-0.5px);
}

.swg-map-origin {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: #c26e00;
	border: 1px solid #fafafa;
	z-index: 2;
}

.swg-map-axis {
	position: absolute;
	font-size: 1.1rem;
	color: #ae8e8e;
	z-index: 2;
	letter-spacing: 0.04em;
}

.swg-map-axis-n { top: 0.4rem; left: 50%; transform: translateX(-50%); }
.swg-map-axis-s { bottom: 0.4rem; left: 50%; transform: translateX(-50%); }
.swg-map-axis-w { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.swg-map-axis-e { right: 0.5rem; top: 50%; transform: translateY(-50%); }

.swg-map-pin {
	position: absolute;
	display: block;
	pointer-events: auto;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: #b03b05;
	border: 1px solid #ffcc80;
	box-shadow: 0 0 0 1px rgba(13, 17, 19, 0.55);
	z-index: 3;
	transform: translateZ(0);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.swg-map-pin:hover,
.swg-map-pin:focus {
	transform: scale(1.45);
	box-shadow: 0 0 0 2px rgba(194, 110, 0, 0.85);
	z-index: 5;
	outline: none;
}

.swg-map-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.2rem;
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	font-size: 1.2rem;
	color: #cccccc;
	justify-content: center;
}

.swg-map-legend li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.swg-map-dot {
	display: inline-block;
	width: 0.9rem;
	height: 0.9rem;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: #b03b05;
}

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

/* Planet pin colors */
.swg-planet-naboo, .swg-map-pin.swg-planet-naboo { background: #4caf50; border-color: #a5d6a7; }
.swg-planet-corellia, .swg-map-pin.swg-planet-corellia { background: #42a5f5; border-color: #90caf9; }
.swg-planet-tatooine, .swg-map-pin.swg-planet-tatooine { background: #c26e00; border-color: #ffcc80; }
.swg-planet-rori, .swg-map-pin.swg-planet-rori { background: #8bc34a; border-color: #c5e1a5; }
.swg-planet-talus, .swg-map-pin.swg-planet-talus { background: #26a69a; border-color: #80cbc4; }
.swg-planet-lok, .swg-map-pin.swg-planet-lok { background: #8d6e63; border-color: #bcaaa4; }
.swg-planet-dathomir, .swg-map-pin.swg-planet-dathomir { background: #ab47bc; border-color: #ce93d8; }
.swg-planet-dantooine, .swg-map-pin.swg-planet-dantooine { background: #5c6bc0; border-color: #9fa8da; }
.swg-planet-all, .swg-map-pin.swg-planet-all,
.swg-planet-unknown, .swg-map-pin.swg-planet-unknown { background: #b03b05; border-color: #ffab91; }

@media (max-width: 700px) {
	.swg-trainer-map {
		width: 100%;
	}

	.swg-trainers-table .swg-col-city {
		display: none;
	}
}


/* Sub-header: title on its own line, count + links below */
#sub-header.swg-sub-header .chunk {
	display: block;
}
#sub-header.swg-sub-header .sub-header-title {
	display: block;
	float: none;
	margin: 0;
}
#sub-header.swg-sub-header .sub-header-title h2 {
	display: block;
	margin: 0;
	line-height: 1.2;
}
#sub-header.swg-sub-header .swg-sub-meta {
	display: block;
	clear: both;
	float: none;
	margin: 0.5rem 0 0;
	padding: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	vertical-align: baseline;
	position: static;
	top: auto;
}
#sub-header.swg-sub-header .swg-trainers-nav-link {
	margin-left: 0.25rem;
	vertical-align: baseline;
}


.swg-trainer-map-head-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem 1.2rem;
	margin: 0 0 0.4rem;
}

.swg-map-toolbar {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.swg-map-btn {
	min-width: 2.4rem;
	padding: 0.25rem 0.55rem;
	line-height: 1.2;
}

.swg-map-zoom-label {
	min-width: 3.6rem;
	text-align: center;
	font-size: 1.2rem;
	color: #cccccc;
	font-variant-numeric: tabular-nums;
}

.swg-trainer-map-viewport {
	position: relative;
	width: min(100%, 640px);
	aspect-ratio: 1 / 1;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid #0d1113;
	border-radius: 2px;
	cursor: grab;
	touch-action: none;
	user-select: none;
	background: #1a2226;
}

.swg-trainer-map-viewport.swg-map-dragging {
	cursor: grabbing;
}

.swg-trainer-map-viewport .swg-trainer-map {
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	transform-origin: 0 0;
	will-change: transform;
}

.swg-trainer-map-viewport.swg-map-zoomed {
	box-shadow: inset 0 0 0 1px rgba(194, 110, 0, 0.35);
}

@media (max-width: 700px) {
	.swg-trainer-map-viewport {
		width: 100%;
	}
}
