/**
 * SWAPNEWS Phase 3b — Regional Editions Styles
 *
 * - Region taxonomy archive
 * - Region selector widget
 * - Region detection toast
 */

/* =========================================================================
 * REGION TAXONOMY ARCHIVE
 * ====================================================================== */
.sn-region {
	font-family: 'Heebo', sans-serif;
	color: var(--font-color, #111);
}

.sn-region__hero {
	background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
	background-size: cover;
	background-position: center;
	color: #fff;
	padding: 50px 20px 40px;
	margin-bottom: 30px;
}
.sn-region__hero-inner {
	max-width: 1024px;
	margin: 0 auto;
}
.sn-region__label {
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #fbbf24;
	margin: 0 0 8px;
}
.sn-region__title {
	font-size: 40px;
	font-weight: 800;
	margin: 0 0 14px;
	line-height: 1.1;
	color: #fff;
}
.sn-region__desc {
	font-size: 16px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 18px;
	max-width: 600px;
}
.sn-region__meta {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}
.sn-region-follow {
	background: #fff;
	color: #1e3a8a;
	border: none;
	padding: 8px 18px;
	border-radius: 999px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: all .15s;
}
.sn-region-follow:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.sn-region-follow .sn-region-follow__on { display: none; }
.sn-region-follow.is-followed {
	background: #fbbf24;
	color: #1e3a8a;
}
.sn-region-follow.is-followed .sn-region-follow__off { display: none; }
.sn-region-follow.is-followed .sn-region-follow__on { display: inline; }

/* Container */
.sn-region__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 30px;
}
.sn-region__sidebar { min-width: 0; }
@media (max-width: 900px) {
	.sn-region__container { grid-template-columns: 1fr; }
}

/* Featured */
.sn-region__featured {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 20px;
	background: var(--bg-color-dua, #fff);
	padding: 16px;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
	text-decoration: none;
	color: var(--font-color, #111);
	margin-bottom: 30px;
	transition: transform .2s, box-shadow .2s;
}
.sn-region__featured:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.sn-region__featured-thumb img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}
.sn-region__featured-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.sn-region__featured-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #fff;
	background: #fbbf24;
	padding: 3px 8px;
	border-radius: 4px;
	margin-bottom: 10px;
	width: fit-content;
}
.sn-region__featured-title {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 8px;
}
.sn-region__featured-meta {
	font-size: 13px;
	color: #888;
	margin: 0;
}

@media (max-width: 600px) {
	.sn-region__featured { grid-template-columns: 1fr; }
}

/* Section title */
.sn-region__section-title {
	font-size: 14px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #1e3a8a;
	margin: 0 0 18px;
	padding-bottom: 8px;
	border-bottom: 2px solid rgba(30, 58, 138, 0.2);
}

/* Feed */
.sn-region__feed-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.sn-region__feed-item {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	color: var(--font-color, #111);
	text-decoration: none;
	transition: background .15s;
}
.sn-region__feed-item:hover {
	background: rgba(30, 58, 138, 0.04);
}
.sn-region__feed-item:last-child { border-bottom: none; }
.sn-region__feed-thumb img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}
.sn-region__feed-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}
.sn-region__feed-cat {
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #1e3a8a;
	margin-bottom: 4px;
}
.sn-region__feed-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 4px;
}
.sn-region__feed-time {
	font-size: 12px;
	color: #999;
	margin: 0;
}

.sn-region__pagination {
	margin: 30px 0;
	text-align: center;
}
.sn-region__pagination .page-numbers {
	display: inline-block;
	margin: 0 4px;
	padding: 8px 14px;
	background: rgba(0, 0, 0, 0.06);
	color: var(--font-color, #111);
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
}
.sn-region__pagination .page-numbers.current {
	background: #1e3a8a;
	color: #fff;
}

/* Sidebar — other regions */
.sn-region__other {
	background: var(--bg-color-dua, #fff);
	padding: 18px 20px;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	margin-bottom: 24px;
}
.sn-region__other h3 {
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: #1e3a8a;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid rgba(30, 58, 138, 0.15);
}
.sn-region__other-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sn-region__other-list li {
	margin: 0;
}
.sn-region__other-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	color: var(--font-color, #111);
	text-decoration: none;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	font-size: 14px;
	font-weight: 600;
	transition: color .15s, padding-left .15s;
}
.sn-region__other-list a:hover {
	color: #1e3a8a;
	padding-left: 6px;
}
.sn-region__other-list li:last-child a { border-bottom: none; }
.sn-region__other-name { font-weight: 600; }
.sn-region__other-count {
	font-size: 11px;
	background: rgba(30, 58, 138, 0.1);
	color: #1e3a8a;
	padding: 2px 8px;
	border-radius: 999px;
	font-weight: 700;
}

/* Empty state */
.sn-region__empty {
	padding: 40px 20px;
	text-align: center;
	color: #999;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 8px;
}

/* =========================================================================
 * REGION SELECTOR WIDGET
 * ====================================================================== */
.sn-region-selector {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.sn-region-selector select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	background: var(--bg-color, #fff);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--font-color, #111);
	cursor: pointer;
}
.sn-region-detect-btn {
	padding: 10px 14px;
	background: #1e3a8a;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, transform .15s;
}
.sn-region-detect-btn:hover {
	background: #1e40af;
	transform: translateY(-1px);
}
.sn-region-detect-btn:disabled {
	background: #999;
	cursor: not-allowed;
	transform: none;
}
.sn-region-detect-status {
	font-size: 12px;
	color: #666;
	margin: 0;
	min-height: 16px;
}
.sn-region-detect-status.is-success {
	color: #16a34a;
	font-weight: 600;
}
.sn-region-detect-status.is-error {
	color: #dc2626;
}

/* =========================================================================
 * Mobile fine-tuning
 * ====================================================================== */
@media (max-width: 600px) {
	.sn-region__title { font-size: 28px; }
	.sn-region__hero { padding: 36px 16px 28px; }
	.sn-region__featured-title { font-size: 18px; }
}

/* =========================================================================
 * Dark mode
 * ====================================================================== */
[data-theme="dark"] .sn-region__featured,
[data-theme="dark"] .sn-region__other {
	background: #1a1a1a;
	border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .sn-region__feed-item {
	border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .sn-region__feed-item:hover {
	background: rgba(30, 58, 138, 0.15);
}
