/* Character search — polished search-first UI */

.dw-search-page {
	max-width: 960px;
	margin: 0 auto;
	padding: 8px 0 24px;
}

.dw-search-shell {
	position: relative;
	padding: 8px 0 0;
}

.dw-search-hero {
	text-align: center;
	padding: 32px 22px 18px;
	margin: 0 0 18px;
	border-radius: 20px;
	border: 1px solid rgba(212, 175, 55, 0.18);
	background:
		radial-gradient(ellipse 70% 80% at 50% 0%, rgba(212, 175, 55, 0.12), transparent 55%),
		linear-gradient(180deg, rgba(28, 22, 14, 0.92) 0%, rgba(10, 9, 8, 0.96) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.04),
		0 18px 50px rgba(0, 0, 0, 0.35);
}

.dw-search-kicker {
	margin: 0 0 10px;
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--dw-text-muted, #8c816d);
}

.dw-search-page .dw-page-title {
	margin: 0 0 10px;
	font-size: clamp(1.7rem, 4vw, 2.35rem);
	line-height: 1.25;
	color: #f0d78a;
	text-shadow: 0 2px 18px rgba(212, 175, 55, 0.18);
}

.dw-search-page .dw-page-lead {
	max-width: 36rem;
	margin: 0 auto 26px;
	line-height: 1.75;
	color: #b7ae99;
	font-size: 0.98rem;
}

.dw-search-form {
	max-width: 640px;
	margin: 0 auto;
}

.dw-search-realm {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 14px;
}

.dw-search-realm .realm-label {
	color: var(--dw-text-muted, #8c816d);
	font-size: 0.9rem;
}

.dw-search-bar {
	display: flex;
	align-items: stretch;
	gap: 0;
	border: 1px solid rgba(212, 175, 55, 0.45);
	border-radius: 16px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.55);
	box-shadow:
		0 0 0 1px rgba(212, 175, 55, 0.08),
		0 14px 40px rgba(0, 0, 0, 0.4);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.dw-search-bar:focus-within {
	border-color: rgba(240, 215, 138, 0.75);
	box-shadow:
		0 0 0 1px rgba(212, 175, 55, 0.22),
		0 0 0 4px rgba(212, 175, 55, 0.1),
		0 16px 48px rgba(0, 0, 0, 0.48);
}

.dw-search-bar__icon {
	flex: 0 0 48px;
	align-self: stretch;
	background:
		radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.2), transparent 65%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / 18px no-repeat;
	opacity: 0.9;
	border-left: 1px solid rgba(212, 175, 55, 0.15);
}

.dw-search-input {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	outline: none !important;
	background: transparent !important;
	color: #f5ecd4 !important;
	font-size: 1.08rem !important;
	padding: 17px 8px 17px 16px !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	height: auto !important;
	direction: rtl;
	text-align: right;
}

.dw-search-input::placeholder {
	color: #7a715f;
}

.dw-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.dw-search-submit {
	flex-shrink: 0;
	border: 0;
	cursor: pointer;
	padding: 0 26px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	color: #1b1207;
	background: linear-gradient(180deg, #e2c45a 0%, #b08622 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
	transition: filter 0.15s, transform 0.15s;
}

.dw-search-submit:hover {
	filter: brightness(1.06);
}

.dw-search-submit:active {
	filter: brightness(0.96);
	transform: translateY(1px);
}

.dw-search-hint {
	margin: 14px 0 0;
	font-size: 0.82rem;
	color: var(--dw-text-muted, #8c816d);
	line-height: 1.55;
}

.dw-search-idle {
	position: relative;
	overflow: hidden;
	text-align: center;
	padding: 56px 24px 60px;
	margin-top: 4px;
	border: 1px solid rgba(212, 175, 55, 0.16);
	border-radius: 18px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2)),
		rgba(12, 10, 8, 0.75);
}

.dw-search-idle__glow {
	position: absolute;
	inset: auto 20% -40% 20%;
	height: 180px;
	background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.18), transparent 70%);
	pointer-events: none;
}

.dw-search-idle__icon {
	position: relative;
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #e2c45a;
	border: 1px solid rgba(212, 175, 55, 0.35);
	background:
		radial-gradient(circle at 50% 40%, rgba(212, 175, 55, 0.16), transparent 68%),
		rgba(0, 0, 0, 0.35);
	box-shadow:
		0 0 24px rgba(212, 175, 55, 0.12),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dw-search-idle__icon svg {
	display: block;
	width: 32px;
	height: 32px;
}

.dw-search-idle__title {
	position: relative;
	margin: 0 0 8px;
	font-family: var(--dw-font-display, Vazirmatn, serif);
	font-size: 1.3rem;
	color: var(--dw-gold, #d4af37);
}

.dw-search-idle__text {
	position: relative;
	margin: 0 auto;
	max-width: 28rem;
	color: var(--dw-text-muted, #8c816d);
	font-size: 0.95rem;
	line-height: 1.7;
}

.dw-search-results {
	margin-top: 4px;
	padding: 18px 16px 10px;
	background:
		linear-gradient(180deg, rgba(28, 22, 14, 0.55), rgba(8, 7, 6, 0.85));
	border: 1px solid rgba(212, 175, 55, 0.22);
	border-radius: 18px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.03),
		0 16px 40px rgba(0, 0, 0, 0.28);
}

.dw-search-results__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: 14px;
	padding: 0 6px 12px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.dw-search-results__title {
	margin: 0 0 4px;
	font-family: var(--dw-font-display, Vazirmatn, serif);
	font-size: 1.2rem;
	color: #e8c96a;
}

.dw-search-results__tip {
	margin: 0;
	font-size: 0.8rem;
	color: var(--dw-text-muted, #8c816d);
}

.dw-search-results__meta {
	margin: 0;
	font-size: 0.88rem;
	color: #c4b896;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(212, 175, 55, 0.08);
	border: 1px solid rgba(212, 175, 55, 0.16);
}

.dw-search-results__table {
	overflow-x: auto;
	border-radius: 12px;
}

#results_processing {
	height: 70px;
	color: var(--dw-text-muted, #8c816d);
}

.dw-search-results .dataTables_filter,
.dw-search-results .dataTables_length {
	display: none !important;
}

.dw-search-results .dataTables_info,
.dw-search-results .dataTables_paginate {
	padding: 10px 6px 12px;
}

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

/* Clickable character rows */
table.dataTable tbody tr.dw-char-row {
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

table.dataTable tbody tr.dw-char-row td {
	background-color: rgba(255, 255, 255, 0.025) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
	padding: 14px 12px !important;
}

table.dataTable tbody tr.dw-char-row:hover td,
table.dataTable tbody tr.dw-char-row:focus td {
	background: rgba(212, 175, 55, 0.1) !important;
}

table.dataTable tbody tr.dw-char-row:focus {
	outline: none;
}

table.dataTable tbody tr.dw-char-row:focus-visible td {
	box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.55);
}

.dw-char-name {
	display: inline-block;
	font-weight: 700;
	font-size: 1.02rem;
	color: #f0d78a;
	letter-spacing: 0.01em;
}

.dw-char-level {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	padding: 4px 10px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.92rem;
	color: #f5ecd4;
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.22);
}

.dw-icon-frame {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(212, 175, 55, 0.28);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

.dw-icon-frame img {
	display: block;
	border-radius: 5px;
}

.dw-muted {
	color: #6f6758;
}

.dw-guild-link {
	color: #d9b162 !important;
	text-decoration: none !important;
	font-weight: 600;
}

.dw-guild-link:hover {
	color: #f0d060 !important;
	text-decoration: underline !important;
}

.dw-row-open {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin-inline-start: 10px;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	color: #1b1207;
	background: linear-gradient(180deg, #e2c45a 0%, #b08622 100%);
	opacity: 0.72;
	transition: opacity 0.15s ease, transform 0.15s ease;
	vertical-align: middle;
}

table.dataTable tbody tr.dw-char-row:hover .dw-row-open,
table.dataTable tbody tr.dw-char-row:focus .dw-row-open {
	opacity: 1;
	transform: translateX(-2px);
}

@media (max-width: 700px) {
	.dw-search-hero {
		padding: 22px 14px 14px;
		border-radius: 16px;
	}

	.dw-search-bar {
		flex-wrap: wrap;
		border-radius: 14px;
	}

	.dw-search-bar__icon {
		display: none;
	}

	.dw-search-input {
		flex: 1 1 100%;
		padding: 15px 16px !important;
	}

	.dw-search-submit {
		flex: 1 1 100%;
		padding: 14px 18px;
		border-top: 1px solid rgba(212, 175, 55, 0.25);
	}

	.dw-search-idle {
		padding: 40px 16px 44px;
	}

	.dw-row-open {
		display: none;
	}

	.dw-search-results__tip {
		display: none;
	}
}
