/* Content top bar — quick nav + search + member info */
#contentTopBar {
	width: 100%;
	position: relative;
	z-index: 500;
	margin: 0 0 12px;
	box-sizing: border-box;
}

.contentTopBar_inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px 16px;
	min-height: 44px;
	padding: 8px 14px;
	background: linear-gradient(180deg, rgba(26, 26, 26, 0.98) 0%, rgba(14, 14, 14, 0.98) 100%);
	border: 1px solid #2e2e2e;
	border-radius: 10px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
	box-sizing: border-box;
}

.contentTopBar_nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}

.contentTopBar_link {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 12px;
	border-radius: 8px;
	color: #bdbdbd !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.contentTopBar_link:hover {
	background: rgba(76, 175, 80, 0.12);
	color: #fff !important;
	text-decoration: none;
}

.contentTopBar_link.is-active {
	background: rgba(76, 175, 80, 0.22);
	color: #8ee08e !important;
	box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.45);
}

.contentTopBar_actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px 12px;
	min-width: 0;
	margin-left: auto;
}

.contentTopBar_login {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 14px;
	border-radius: 8px;
	background: linear-gradient(135deg, #3bb9ff 0%, #1589ff 100%);
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(21, 137, 255, 0.35);
}

.contentTopBar_login:hover {
	filter: brightness(1.08);
	text-decoration: none;
}

/* Movie search */
#movieSearch_wrapper.contentTopBar_search {
	width: auto;
	max-width: 100%;
	float: none;
	position: static;
	top: auto;
	text-align: left;
	flex: 0 1 320px;
}

.contentTopBar_searchField {
	display: flex;
	align-items: center;
	gap: 0;
	width: 100%;
	min-width: 220px;
	height: 38px;
	padding: 0 4px 0 0;
	background: linear-gradient(180deg, #161616 0%, #0d0d0d 100%);
	border: 1px solid #404040;
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contentTopBar_searchField:focus-within {
	border-color: #4caf50;
	box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.contentTopBar_searchIcon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-left: 14px;
	opacity: 0.55;
	background-color: #9e9e9e;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.contentTopBar_searchField:focus-within .contentTopBar_searchIcon {
	opacity: 0.9;
	background-color: #8ee08e;
}

#txtMovieSearch,
.contentTopBar_searchInput {
	flex: 1;
	min-width: 0;
	width: auto;
	height: 36px;
	border: 0;
	background: transparent;
	color: #f5f5f5;
	font-size: 13px;
	font-family: "Segoe UI", Tahoma, "Noto Sans Thai", sans-serif;
	position: static;
	top: auto;
	outline: none;
	padding: 0 10px 0 8px;
	margin: 0;
}

#txtMovieSearch::placeholder,
.contentTopBar_searchInput::placeholder {
	color: #777;
}

#txtMovieSearch::-webkit-search-cancel-button,
.contentTopBar_searchInput::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.contentTopBar_searchBtn,
#btnMovieSearch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	flex-shrink: 0;
	height: 32px;
	margin: 0 2px 0 4px;
	padding: 0 14px 0 12px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #5ec462 0%, #3d9a40 100%);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	font-family: "Segoe UI", Tahoma, "Noto Sans Thai", sans-serif;
	cursor: pointer;
	position: static;
	top: auto;
	box-shadow: 0 2px 6px rgba(76, 175, 80, 0.35);
	transition: filter 0.15s ease, transform 0.1s ease;
}

.contentTopBar_searchBtnIcon {
	width: 14px;
	height: 14px;
	background-color: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.contentTopBar_searchBtn:hover,
#btnMovieSearch:hover {
	filter: brightness(1.1);
}

.contentTopBar_searchBtn:active,
#btnMovieSearch:active {
	transform: scale(0.97);
}

.contentTopBar_searchBtnText {
	line-height: 1;
	white-space: nowrap;
}

/* Package info chips */
#packageInfo.contentTopBar_package {
	position: static;
	float: none;
	top: auto;
	min-width: 0;
	height: auto;
	padding: 0;
	text-align: right;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px 8px;
}

#packageInfo .pkg_chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 32px;
	padding: 0 10px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid #333;
	border-radius: 999px;
	color: #aaa;
	font-size: 12px;
	white-space: nowrap;
}

#packageInfo .pkg_chip .pkg_label {
	color: #888;
	font-size: 12px;
}

#packageInfo .pkg_chip .packageInfo_val,
#packageInfo .pkg_chip .packageInfo_val span {
	color: #8ee08e;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
}

#packageInfo .img_login_sessions {
	width: 18px;
	height: 18px;
	vertical-align: middle;
}

#packageInfo .login_session_count {
	color: #3bb9ff;
	font-weight: 700;
	font-size: 12px;
}

#packageInfo .current_session_count {
	font-size: 12px;
	color: #8ee08e;
}

#packageInfo strong.package_info_vip {
	color: #3bb9ff;
	font-size: 13px;
}

#packageInfo .packageInfo_val a {
	color: #8ee08e;
	font-size: 12px;
}

/* Criteria popup */
#criteriaBox {
	width: min(700px, calc(100vw - 24px));
	height: auto;
	max-height: calc(100vh - 40px);
	background: #141414;
	display: none;
	border-radius: 16px;
	border: 1px solid #333;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
	overflow: hidden;
}

#criteriaBox * {
	box-sizing: border-box;
}

.movieSearch_popup {
	padding: 0;
}

.movieSearch_popup_head {
	padding: 18px 20px 12px;
	background: linear-gradient(180deg, #1e1e1e 0%, #161616 100%);
	border-bottom: 1px solid #2a2a2a;
}

.movieSearch_popup_title {
	margin: 0 0 4px;
	font-size: 1.05rem;
	font-weight: 800;
	color: #fff;
}

.movieSearch_popup_hint {
	margin: 0;
	font-size: 0.82rem;
	color: #888;
}

.movieSearch_popup_body {
	padding: 16px 20px 20px;
}

.movieSearch_popup_input,
#txtMovieSearch_Keywords {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #3a3a3a;
	border-radius: 10px;
	background: #0a0a0a;
	color: #fff;
	font-size: 14px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.movieSearch_popup_input:focus,
#txtMovieSearch_Keywords:focus {
	border-color: #4caf50;
	box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

#criteriaBox .buttons_container {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 14px;
	padding: 0;
	background: transparent;
	text-align: center;
	border-radius: 0;
}

.movieSearch_btn_ok,
.movieSearch_btn_close {
	min-width: 100px;
	padding: 10px 20px !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
	cursor: pointer;
}

#movieTag_search,
.movieSearch_tags {
	margin-top: 16px;
	width: auto;
	max-height: 340px;
	overflow-x: hidden;
	overflow-y: auto;
	padding-right: 4px;
}

div.searchTagContainer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0 0 8px;
	padding: 10px 12px;
	border: 1px solid #2a2a2a;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.02);
	width: auto;
	min-height: 0;
}

div.searchTagContainer:last-of-type {
	margin-bottom: 0;
}

div.searchTagContainer label {
	width: auto;
	max-width: none;
	color: #ddd;
	display: inline;
	margin-left: 0;
	cursor: pointer;
	font-size: 13px;
}

div.searchTagContainer label.searchTagEn {
	color: #888;
	font-size: 12px;
}

@media (max-width: 960px) {
	.contentTopBar_inner {
		flex-direction: column;
		align-items: stretch;
	}

	.contentTopBar_nav {
		justify-content: center;
	}

	.contentTopBar_actions {
		justify-content: center;
		margin-left: 0;
	}

	#packageInfo.contentTopBar_package {
		justify-content: center;
	}
}

@media (max-width: 520px) {
	.contentTopBar_link {
		padding: 0 8px;
		font-size: 12px;
	}

	#movieSearch_wrapper.contentTopBar_search {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.contentTopBar_searchField {
		min-width: 0;
	}

	#txtMovieSearch,
	.contentTopBar_searchInput {
		font-size: 16px;
	}

	.contentTopBar_searchBtnText {
		display: none;
	}

	.contentTopBar_searchBtn,
	#btnMovieSearch {
		width: 36px;
		height: 36px;
		padding: 0;
		margin: 0 2px 0 0;
		border-radius: 50%;
	}
}
