/* Stats Cards Container - For the 4-column stats display */
.stats-cards-container {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin: 0px 12px 12px 12px;
}

.stats-card {
	flex: 1;
	height: 50px;
	min-width: 0;
	background: #FAFAFA;
	border: 1px solid var(--Border-Stroke-Brand-Light, #CADFEE);
	border-radius: 4px !important;
	padding: 8px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
	border-color: var(--Border-Stroke-Brand, #2980B9);
	box-shadow: 0 2px 8px rgba(41, 128, 185, 0.12);
}

.stats-card.active {
	border: 1px solid var(--Border-Stroke-Brand, #2980B9);
	background: #F0F8FF;
	box-shadow: 0 2px 10px rgba(41, 128, 185, 0.14);
}

.stats-card-label {
	font-weight: 500;
	font-size: 12px;
	line-height: 100%;
	letter-spacing: -0.5px;
	color: #000;
	margin-bottom: 8px;
}

.stats-card-value {
	font-weight: 400;
	font-size: 14px;
	line-height: 100%;
	letter-spacing: -0.5px;
}

/* RSI Status Badge */
.rsi-status-badge {
	padding: 8px 12px;
	background: #F5F5F5;
	border-radius: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.rsi-status-text {
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
}

/* HRSI Info Box */
.hrsi-info-box {
	width: 100%;
	padding: 8px;
	background: #F5F5F5;
	border-radius: 4px;
	border-left: 1px solid #2980B9;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 2px;
	display: inline-flex;
}

.hrsi-info-header {
	align-self: stretch;
	justify-content: flex-start;
	align-items: center;
	gap: 4px;
	display: inline-flex;
}

.hrsi-info-title {
	color: black;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 500;
	word-wrap: break-word;
}

.hrsi-info-status {
	font-size: 12px;
	font-family: Roboto;
	font-weight: 500;
	word-wrap: break-word;
}

.hrsi-info-description {
	align-self: stretch;
	justify-content: center;
	display: flex;
	flex-direction: column;
	color: black;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

.hashtag-container {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	width: 100%;
	gap: 4px;
}

.hashtag-item {
	display: block;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
	word-break: break-word;
	white-space: pre-line;
	color: #000;
}

/* Action recommendation text - display as bullet list */
.hashtag-container>.hashtag-item:first-child {
	width: 100%;
	padding-left: 12px;
}

/* Each line starting with # should have bullet point */
.recommendation-list {
	list-style-type: disc;
	padding-left: 16px;
	margin: 0 0 2px 0;
	width: 100%;
}

.recommendation-list li {
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	color: #000;
	line-height: 1.3;
}

.hashtag-row {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
}

/* Span containers for sectors and stocks */
#hashtag-section-3,
#hashtag-section-4 {
	display: contents;
}

.hashtag-clickable {
	display: flex;
	padding: 4px 8px;
	background: #E5EFF7;
	border-radius: 4px;
	outline: 1px solid #CADFEE;
	outline-offset: -1px;
	cursor: pointer;
	transition: all 0.2s ease;
	color: #2980B9;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
	justify-content: flex-start;
	align-items: center;
	gap: 4px;
}

.hashtag-clickable:hover {
	background: #D0E8F9;
	outline-color: #2980B9;
}

.hashtag-clickable:active {
	background: #CADFEE;
	transform: scale(0.98);
}

/* Color variants for different stats */
.stats-card-value.positive {
	color: #1AA67C;
}

.stats-card-value.warning {
	color: #E78B03;
}

.stats-card-value.negative {
	color: #F5222D;
}

/* RSI Status Colors */
.stats-card-value.strong-increase {
	color: #1AA67C;
}

.stats-card-value.increase {
	color: #54BD9D;
}

.stats-card-value.average {
	color: #FADB14;
}

.stats-card-value.decrease {
	color: #FFA940;
}

.stats-card-value.strong-decrease {
	color: #FF4D4F;
}

.stats-card-value.neutral {
	color: #666666;
}

/* Default state for stats cards when no data */
.stats-card-value:empty,
.stats-card-value:not([ng-bind]) {
	color: #666666;
}

/* RSI Status Text Colors */
.rsi-status-text.strong-increase,
.hrsi-info-status.strong-increase {
	color: #1AA67C;
}

.rsi-status-text.increase,
.hrsi-info-status.increase {
	color: #54BD9D;
}

.rsi-status-text.average,
.hrsi-info-status.average {
	color: #FADB14;
}

.rsi-status-text.decrease,
.hrsi-info-status.decrease {
	color: #FFA940;
}

.rsi-status-text.strong-decrease,
.hrsi-info-status.strong-decrease {
	color: #FF4D4F;
}

.rsi-status-text.neutral,
.hrsi-info-status.neutral {
	color: #666666;
}

/* Right sidebar dropdown styling */
.right-dropdown-container {
	position: relative;
	display: inline-block;
	flex-shrink: 0;
	z-index: 1000;
}

.right-dropdown-toggle {
	position: relative;
}

.right-dropdown-arrow {
	width: 16px;
	height: 16px;
	margin-left: 4px;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.right-dropdown-toggle.active .right-dropdown-arrow {
	transform: rotate(180deg);
}

.right-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	z-index: 99999;
	display: none;
	margin-top: 2px;
	min-width: 150px;
}

.right-dropdown-menu.show {
	display: block;
}

.right-dropdown-item {
	display: block;
	padding: 8px 12px;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.2s ease;
}

.right-dropdown-item:last-child {
	border-bottom: none;
}

.right-dropdown-item:hover {
	background-color: #f5f5f5;
	color: #000;
}

.right-dropdown-item:active {
	background-color: #e0e0e0;
}

/* Responsive design for stats cards */
@media (max-width: 768px) {
	.stats-cards-container {
		gap: 8px;
	}

	.stats-card {
		padding: 3px 6px;
	}

	.stats-card-label {
		font-size: 11px;
	}

	.stats-card-value {
		font-size: 13px;
	}

	.hrsi-info-box {
		padding: 10px;
	}

	.hrsi-info-title,
	.hrsi-info-status,
	.hrsi-info-description {
		font-size: 11px;
	}
}

@media (max-width: 480px) {
	.stats-cards-container {
		flex-wrap: wrap;
		gap: 6px;
	}

	.stats-card {
		flex: 1 1 calc(50% - 3px);
		min-width: calc(50% - 3px);
	}
}

/* RSI Container Styles */
.rsi-container {
	width: 100%;
	padding: 12px 12px 0 12px;
	background: white;
}

.rsi-container-title {
	font-weight: bold;
	font-size: 16px;
	margin-bottom: 12px;
	color: #333;
}

.rsi-main-section {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	min-width: 0;
	/* Allow flex items to shrink */
}

.rsi-gauge-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	/* Prevent gauge from shrinking */
}

.gauge-container {
	width: 145px;
	height: 140px;
}

.gauge-chart {
	width: 145px;
	height: 140px;
}

.stats-cards-grid {
	flex: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	align-content: center;
	min-width: 0;
	/* Allow grid to shrink */
}

/* Responsive RSI Section */
@media (max-width: 1650px) {
	.rsi-main-section {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.rsi-gauge-section {
		align-items: center;
		justify-content: center;
		width: 100%;
	}

	.stats-cards-grid {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		width: 100%;
	}
}

@media (max-width: 600px) {
	.rsi-main-section {
		gap: 12px;
	}

	.stats-cards-grid {
		grid-template-columns: 1fr 1fr;
		gap: 6px;
	}

	.gauge-container {
		width: 130px;
		height: 130px;
	}

	.gauge-chart {
		width: 130px;
		height: 130px;
	}
}

@media (max-width: 480px) {
	.stats-cards-grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.gauge-container {
		width: 120px;
		height: 120px;
	}

	.gauge-chart {
		width: 120px;
		height: 120px;
	}
}

/* Analysis Section Styles */
.analysis-section {
	width: 100%;
	float: left;
	padding-top: 5px;
	padding-bottom: 12px;
}

.analysis-header {
	display: flex;
	align-items: center;
}

.analysis-title {
	display: flex;
	align-items: center;
}

.analysis-title-indicator {
	border-left: 2px solid #2196F3;
	height: 14px;
	margin-right: 4px;
}

.analysis-title-text {
	font-weight: 500;
	font-size: 16px;
	color: #111;
	letter-spacing: -0.5px;
	line-height: 18px;
	padding: 8px 0;
}

.analysis-actions {
	display: flex;
	align-items: center;
	margin-left: auto;
	gap: 8px;
}

.analysis-history-link {
	font-weight: 400;
	font-size: 12px;
	line-height: 100%;
	letter-spacing: -0.5px;
	vertical-align: middle;
	color: #2980B9;
	padding: 5px 12px;
	text-decoration: none;
}

.analysis-history-link:hover {
	color: #1f5f8b;
	text-decoration: underline;
}

.analysis-fullscreen-btn {
	width: 24px;
	height: 28px;
	padding: 5px 0 5px 0 !important;
}

.analysis-fullscreen-btn img {
	width: 16px;
	height: 16px;
}

/* Analysis Item Styles */

.analysis-list {
	padding-bottom: 12px;

}

.analysis-item {
	padding: 8px 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	border-bottom: 0.5px solid #D9D9D9;
}

.analysis-item-header {
	display: flex;
	align-items: center;
	font-weight: 400;
	font-size: 12px;
	line-height: 100%;
	letter-spacing: -0.5px;
	vertical-align: middle;
}

.analysis-stock-code {
	font-weight: 700;
	color: #222;
}

.analysis-price-change {
	margin-left: 6px;
	color: #1AA67C;
	font-weight: 500;
}

.analysis-price-change.negative {
	color: #F5222D;
}

.analysis-arrow-icon {
	width: 14px;
	height: 14px;
	margin: 0 4px 0 4px;
	vertical-align: middle;
}

.analysis-current-price {
	color: #1AA67C;
	font-weight: 500;
}

.analysis-current-price.negative {
	color: #F5222D;
}

.analysis-percentage {
	color: #1AA67C;
	font-weight: 400;
	margin-left: 2px;
}

.analysis-percentage.negative {
	color: #F5222D;
}

.text-body3-ellipsis {
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	color: var(--Text-Text-Primary, #000);
	font-feature-settings: 'liga' off, 'clig' off;
	text-overflow: ellipsis;
	white-space: normal;

	font-size: 12px;
	font-style: normal;
	font-weight: 400;
	line-height: normal;
	letter-spacing: -0.5px;
}

.analysis-description {
	font-weight: 400;
	font-size: 12px;
	line-height: 100%;
	color: #222;
	margin-top: 4px;
}

.price-up {
	color: #1AA67C !important;
}

.price-down {
	color: #F5222D !important;
}

.analysis-timestamp {
	font-weight: 400;
	font-size: 12px;
	line-height: 100%;
	color: #B0B0B0;
}

/* Responsive design for analysis section */
@media (max-width: 768px) {
	.analysis-title-text {
		font-size: 14px;
	}

	.analysis-history-link {
		font-size: 11px;
		padding: 4px 8px;
	}

	.analysis-item-header {
		font-size: 11px;
	}

	.analysis-description,
	.analysis-timestamp {
		font-size: 11px;
	}
}

@media (max-width: 480px) {
	.analysis-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.analysis-actions {
		margin-left: 0;
		width: 100%;
		justify-content: space-between;
	}
}

/* Tab styles for Watchlist and Suggest tabs */
.tab-watchlist-btn,
.tab-suggest-btn {
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	outline: none;
	cursor: pointer;
	color: #111;
	border-bottom: 2px solid transparent;
	padding-top: 8px;
	padding-bottom: 8px;
	opacity: 1;
	font-family: Roboto;
	font-weight: 400;
	font-style: Regular;
	font-size: 14px;
	line-height: 100%;
	letter-spacing: -0.5px;
}

.tab-watchlist-btn.active,
.tab-suggest-btn.active {
	color: #2980B9 !important;
	border-bottom: 2px solid #2980B9 !important;
}

/* Category buttons */
.right-category-btn {
	border: 1px solid #ddd;
	background: #fff;
	color: #222;
	border-radius: 4px !important;
	height: 28px;
	padding: 0 8px;
	font-family: 'Roboto', sans-serif;
	font-size: 12px;
	font-weight: 400;
	font-style: normal;
	line-height: 100%;
	letter-spacing: -0.5px;
	cursor: pointer;
	flex: 0 0 auto;
	white-space: nowrap;
	flex-shrink: 0;
}

/* .right-category-btn.active {
	background: #E5EFF7;
	color: #2980B9;
	border: 1px solid #2980B9;
} */

/* Categories container */
.categories-container {
	flex: 1;
	overflow: hidden;
}

/* Top watchlists container */
#topWatchlists {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Action filter scroll container */
.action-filter-scroll {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: visible;
	white-space: nowrap;
	position: relative;
	z-index: 1000;
}

/* Settings container */
.settings-container {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	margin-left: 8px;
}

/* Settings button */
.settings-btn {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.settings-btn:hover {
	background: #f5f5f5;
	border-color: #2980B9;
}

.settings-btn img {
	width: 16px;
	height: 16px;
}

/* Settings dropdown */
.settings-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	min-width: 150px;
	z-index: 99999;
	padding: 8px;
	margin-top: 2px;
}

.settings-dropdown.show {
	display: block;
}

.settings-dropdown a {
	display: block;
	padding: 8px 12px;
	color: #333;
	text-decoration: none;
	border-radius: 2px;
	font-size: 14px;
	transition: background-color 0.2s ease;
}

.settings-dropdown a:hover {
	background-color: #f5f5f5;
	color: #000;
}

.settings-dropdown a:active {
	background-color: #e0e0e0;
}

/* Simple dropdown styles */
#categoryDropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	min-width: 150px;
	z-index: 99999;
	padding: 8px;
	overflow: visible;
	/* Allow bridge to extend outside */
	margin-top: 2px;
	/* Explicitly match other dropdowns if needed, or if user sees a gap */
}

/* Add bridge for gap */
#categoryDropdown::before {
	content: "";
	position: absolute;
	top: -10px;
	left: 0;
	width: 100%;
	height: 10px;
	background: transparent;
	z-index: 1;
}

#categoryDropdown a {
	display: block;
	padding: 4px 8px;
	color: #333;
	text-decoration: none;
	border-radius: 2px;
}

#categoryDropdown a:hover {
	background-color: #f5f5f5;
}

/* Active state for dropdown item */
#categoryDropdown a.active {
	background-color: #E5EFF7;
	color: #2980B9;
	font-weight: 500;
}

/* Suggest dropdown - same style as categoryDropdown */
#suggestDropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: white;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	min-width: 150px;
	z-index: 99999;
	padding: 8px;
	margin-top: 2px;
}

#suggestDropdown::before {
	content: "";
	position: absolute;
	top: -10px;
	left: 0;
	width: 100%;
	height: 10px;
	background: transparent;
	z-index: 1;
}

#suggestDropdown a {
	display: block;
	padding: 4px 8px;
	color: #333;
	text-decoration: none;
	border-radius: 2px;
}

#suggestDropdown a:hover {
	background-color: #f5f5f5;
}

#suggestDropdown a.active {
	background-color: #E5EFF7;
	color: #2980B9;
	font-weight: 500;
}

/* Danh mục theo dõi */

#watchlistSection {
	display: flex;
	padding: 4px 8px;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	flex: 1 0 0;
	align-self: stretch;
}

#ContentWatchlist {
	background: #fff;
	align-items: flex-start;
	border-radius: 6px;
}

.portlet-body.right {
	padding: 0px !important;
}

/* New Watchlist Card Styles */
.watchlist-cards-container {
	width: 100%;
	height: 100%;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 8px;
	display: inline-flex;
}

.watchlist-card {
	align-self: stretch;
	padding: 8px 12px;
	border-radius: 8px !important;
	flex-direction: row;
	justify-content: flex-start;
	align-items: stretch;
	gap: 0;
	display: flex;
	transition: background-color 0.2s ease;
}

.watchlist-card:hover {
	background-color: #F0F8FF !important;
	/* AliceBlue or similar light blue */
}

.watchlist-card.alt-bg {
	background: #F5F5F5;
}

.watchlist-card.white-bg {
	background: white;
}

.watchlist-card-header {
	align-self: stretch;
	justify-content: space-between;
	align-items: flex-start;
	display: inline-flex;
}

.watchlist-stock-code {
	color: black;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 500;
	word-wrap: break-word;
}

.watchlist-stock-price {
	color: black;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

/* Price flash effect when price changes */
.watchlist-stock-price span.price-flash {
	padding: 2px 6px;
	border-radius: 3px;
	animation: flashFade 1.8s ease-out;
	transition: background-color 1.8s ease-out;
}

@keyframes flashFade {
	0% {
		filter: brightness(1.05);
	}

	100% {
		filter: brightness(1);
		background-color: transparent;
	}
}

/* Parent container needs min-width: 0 to allow children to shrink below content size */
.watchlist-card-content {
	align-self: stretch;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	display: flex;
	min-width: 0;
	/* Crucial for nested flex truncation */
}

.watchlist-stock-name {
	flex: 1 1 auto !important;
	/* Allow shrinking */
	min-width: 0 !important;
	/* Allow shrinking below content size */
	max-width: 100%;
	/* Ensure it doesn't overflow parent */
	color: black;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	margin-right: 4px;
}

.watchlist-price-info {
	justify-content: flex-end;
	/* Align content to the right */
	align-items: center;
	gap: 2px;
	display: flex;
	flex-wrap: nowrap !important;
	/* Prevent wrapping */
	align-content: center;
	flex-shrink: 0 !important;
	/* Prevent shrinking */
	margin-left: auto;
	/* Push to the right */
}




.watchlist-price-change {
	text-align: right;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

.watchlist-price-percent {
	text-align: right;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
	min-width: 32px;
}

/* Override any fixed max-height that might be set by JavaScript */
.watchlist-cards-container {
	max-height: none !important;
	height: calc(100vh - 250px) !important;
	overflow-y: hidden;
}

.watchlist-cards-container:hover {
	overflow-y: auto;
}

/* Custom scrollbar for watchlist */
.watchlist-cards-container::-webkit-scrollbar {
	width: 6px;
}

.watchlist-cards-container::-webkit-scrollbar-track {
	background: transparent;
}

.watchlist-cards-container::-webkit-scrollbar-thumb {
	background-color: #c1c1c1;
	border-radius: 3px;
}

.watchlist-cards-container {
	scrollbar-width: thin;
	scrollbar-color: #c1c1c1 transparent;
}

/* Ensure parent containers use flexbox */
#watchlistSection {
	display: flex;
	flex-direction: column;
	/* height: 100%; */
}

#ContentWatchlist {
	display: flex;
	flex-direction: column;
	/* height: 100%; */
}

/* Watchlist inline styles converted to classes */
.watchlist-loading-state {
	text-align: center;
	padding: 20px;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.watchlist-loading-more-state {
	text-align: center;
	padding: 10px;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.watchlist-empty-state {
	text-align: center;
	padding: 20px;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.watchlist-stock-link {
	color: inherit;
	text-decoration: none;
	font-weight: 500;
}

.watchlist-stock-no-price {
	color: #999;
}

.watchlist-price-change,
.watchlist-price-percent {
	font-weight: 500;
}

.watchlist-price-dot {
	display: inline-block;
	width: 4px;
	height: 4px;
	border-radius: 50% !important;
	background: #F59E0B;
	margin-right: 4px;
}

.watchlist-sentinel {
	height: 1px;
}

/* Settings Modal Styles */
.settings-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: none;
	justify-content: center;
	align-items: center;
	padding: 20px;
	box-sizing: border-box;
	overflow: auto;
}

.settings-modal-overlay.show {
	display: flex;
}

.settings-modal {
	width: 800px;
	height: 512px;
	background: white;
	box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	border-radius: 8px;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	display: flex;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
}

.settings-modal-header {
	align-self: stretch;
	height: 44px;
	padding: 12px 12px 8px 12px;
	background: #FAFAFA;
	border-bottom: 1px solid #F0F0F0;
	justify-content: flex-start;
	align-items: center;
	gap: 10px;
	display: inline-flex;
}

.settings-modal-title {
	flex: 1 1 0;
	justify-content: flex-start;
	align-items: center;
	gap: 2px;
	display: flex;
}

.settings-modal-title-text {
	color: black;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 500;
	word-wrap: break-word;
}

.settings-modal-close {
	width: 24px;
	height: 24px;
	position: relative;
	overflow: hidden;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.settings-modal-close img {
	width: 24px;
	height: 24px;
}

.settings-modal-content {
	align-self: stretch;
	flex: 1 1 0;
	padding: 8px 12px;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 4px;
	display: flex;
}

.settings-modal-body {
	align-self: stretch;
	flex: 1 1 0;
	background: white;
	overflow: visible;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	display: flex;
}

.settings-modal-main-content {
	align-self: stretch;
	flex: 1 1 0;
	padding: 8px 0;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 8px;
	display: inline-flex;
}

.settings-modal-left-panel {
	align-self: stretch;
	overflow: hidden;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 8px;
	display: inline-flex;
}

.settings-modal-section {
	align-self: stretch;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 8px;
	display: flex;
}

.settings-modal-section-title {
	align-self: stretch;
	height: 28px;
	justify-content: flex-start;
	align-items: center;
	gap: 10px;
	display: inline-flex;
}

.settings-modal-section-title-text {
	color: black;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 500;
	word-wrap: break-word;
}

.settings-modal-input-group {
	align-self: stretch;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 8px;
	display: inline-flex;
}

.settings-modal-input {
	flex: 1 1 0;
	height: 28px;
	padding: 0 12px;
	background: white;
	overflow: hidden;
	border-radius: 4px;
	outline: 1px solid #D9D9D9;
	outline-offset: -1px;
	justify-content: flex-start;
	align-items: center;
	display: flex;
}

.settings-modal-input input {
	flex: 1 1 0;
	justify-content: center;
	display: flex;
	flex-direction: column;
	color: #BFBFBF;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
	border: none;
	outline: none;
	background: transparent;
}

.settings-modal-input input::placeholder {
	color: var(--Text-Text-Placeholder, #BFBFBF);
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

.settings-modal-button {
	height: 28px;
	padding: 8px;
	background: #2980B9;
	border-radius: 4px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	display: flex;
	cursor: pointer;
	border: none;
}

.settings-modal-button-text {
	justify-content: center;
	display: flex;
	flex-direction: column;
	color: white;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

.settings-modal-divider {
	width: 240px;
	height: 1px;
	background: #D9D9D9;
}

.settings-modal-sample-category {
	width: 240px;
	padding: 8px;
	background: #E5EFF7;
	border-radius: 4px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	display: inline-flex;
}

.settings-modal-sample-icon {
	width: 20px;
	height: 20px;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.settings-modal-sample-icon img {
	width: 20px;
	height: 20px;
}

.settings-modal-sample-text {
	flex: 1 1 0;
	color: #2980B9;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

.settings-modal-vertical-divider {
	width: 1px;
	align-self: stretch;
	background: #D9D9D9;
}

.settings-modal-right-panel {
	flex: 1 1 0;
	align-self: stretch;
	overflow: visible;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 12px;
	display: inline-flex;
}

.settings-modal-right-header {
	align-self: stretch;
	justify-content: space-between;
	align-items: center;
	display: inline-flex;
	position: relative;
	z-index: 3;
}

.settings-modal-right-title {
	color: black;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 500;
	word-wrap: break-word;
}

.settings-modal-search {
	width: auto;
	padding: 6px 8px;
	background: white;
	overflow: hidden;
	border-radius: 4px;
	outline: 1px solid #D9D9D9;
	outline-offset: -1px;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	display: flex;
	position: relative;
	z-index: 2;
}

.settings-modal-search input {
	flex: 1 1 0;
	padding-right: 12px;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	display: flex;
	border: none;
	outline: none;
	background: transparent;
	color: #BFBFBF;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
}

.settings-modal-search input::placeholder {
	color: var(--Text-Text-Placeholder, #BFBFBF);
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

/* Modal stock search dropdown (match outside dropdown look) */
.ui-autocomplete.ui-autocomplete-stock {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	max-height: 200px;
	overflow-y: auto;
	padding: 8px;
	margin-top: 8px;
	min-width: 216px !important;
	z-index: 99999;
}

.ui-autocomplete.ui-autocomplete-stock .ui-menu-item-wrapper {
	padding: 0;
	border: 0;
	background: transparent;
}

.ui-autocomplete.ui-autocomplete-stock li {
	border-bottom: 1px solid #f0f0f0;
}

.ui-autocomplete.ui-autocomplete-stock li:last-child {
	border-bottom: none;
}

.ui-autocomplete.ui-autocomplete-stock .stock-option-row {
	display: flex;
	align-items: flex-start;
	padding: 8px 12px;
	cursor: pointer;
	border-radius: 2px;
}

.ui-autocomplete.ui-autocomplete-stock .stock-option-row:hover {
	background: #f5f5f5;
}

/* Match hover/active highlight like outside dropdown */
.ui-autocomplete.ui-autocomplete-stock li:hover .checkbox-item,
.ui-autocomplete.ui-autocomplete-stock li.ui-state-focus .checkbox-item,
.ui-autocomplete.ui-autocomplete-stock li.ui-state-active .checkbox-item {
	background: #f5f5f5;
}

/* Remove jQuery UI default active styles */
.ui-autocomplete.ui-autocomplete-stock .ui-state-active,
.ui-autocomplete.ui-autocomplete-stock .ui-state-focus {
	border: 0;
	background: transparent;
	margin: 0;
}

.ui-autocomplete.ui-autocomplete-stock .stock-option-code {
	font-weight: 500;
	color: #222;
	font-size: 14px;
	line-height: 1.2;
}

.ui-autocomplete.ui-autocomplete-stock .stock-option-exchange {
	color: #666;
	margin-left: 4px;
}

.ui-autocomplete.ui-autocomplete-stock .stock-option-name {
	font-size: 12px;
	color: #666;
	margin-top: 2px;
	line-height: 1.2;
}

.settings-modal-table-container {
	align-self: stretch;
	flex: 1 1 0;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	display: flex;
}

.settings-modal-table {
	align-self: stretch;
	background: #F0F0F0;
	justify-content: flex-start;
	align-items: flex-start;
	display: inline-flex;
}

.settings-modal-table-header {
	width: 64px;
	padding: 8px;
	justify-content: flex-start;
	align-items: center;
	gap: 10px;
	display: flex;
}

.settings-modal-table-header-text {
	justify-content: center;
	display: flex;
	flex-direction: column;
	color: black;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 500;
	word-wrap: break-word;
}

.settings-modal-table-header-wide {
	flex: 1 1 0;
	padding: 8px;
	justify-content: flex-start;
	align-items: center;
	gap: 10px;
	display: flex;
}

.settings-modal-table-row {
	align-self: stretch;
	height: 32px;
	width: 100%;
	background: white;
	justify-content: flex-start;
	align-items: flex-start;
	display: inline-flex;
}

.settings-modal-table-row-alt {
	align-self: stretch;
	height: 32px;
	width: 100%;
	background: #F5F5F5;
	justify-content: flex-start;
	align-items: flex-start;
	display: inline-flex;
}

.settings-modal-table-cell {
	width: 64px;
	align-self: stretch;
	padding: 0 8px;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	display: flex;
}

.settings-modal-table-cell-wide {
	flex: 1 1 0;
	align-self: stretch;
	padding: 0 8px;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	display: flex;
}

.settings-modal-table-cell-text {
	flex: 1 1 0;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	display: inline-flex;
}

.settings-modal-table-cell-content {
	align-self: stretch;
	justify-content: center;
	display: flex;
	flex-direction: column;
	color: black;
	font-size: 12px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

.settings-modal-table-cell-icon {
	display: flex;
	align-items: center;
	width: 100%;
	height: 100%;
}

.settings-modal-table-cell-icon img {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

.settings-modal-table-cell-icon img.delete {
	cursor: pointer;
}

.settings-modal-table-cell-icon img.delete:hover {
	opacity: 0.7;
}

/* Drag and drop styles */
.settings-modal-table-row {
	cursor: move;
	transition: all 0.2s ease;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

.settings-modal-table-row:hover {
	background-color: #f0f8ff !important;
}

.settings-modal-table-row.dragging {
	opacity: 0.5;
	transform: rotate(2deg);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.settings-modal-table-row.drag-over {
	border-top: 2px solid #007bff;
	background-color: #e3f2fd !important;
}

.settings-modal-table-cell-icon img[title="Sắp xếp"] {
	cursor: grab;
}

.settings-modal-table-cell-icon img[title="Sắp xếp"]:active {
	cursor: grabbing;
}

/* jQuery UI Sortable styles for drag clone */
.ui-sortable-helper {
	background-color: white !important;
	border: 1px solid #ddd !important;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
	opacity: 0.9 !important;
	display: flex !important;
	width: 100% !important;
}

.ui-sortable-helper .settings-modal-table-cell {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.ui-sortable-helper .settings-modal-table-cell-text {
	color: #333 !important;
	font-weight: normal !important;
}

.ui-sortable-helper .settings-modal-table-cell-content {
	color: #333 !important;
	font-weight: normal !important;
}

.ui-sortable-helper .settings-modal-table-cell-icon {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.ui-sortable-helper .settings-modal-table-cell-icon img {
	opacity: 1 !important;
	width: 16px !important;
	height: 16px !important;
}

/* Placeholder for drop zone */
.ui-sortable-placeholder {
	background-color: #f0f8ff !important;
	border: 2px dashed #007bff !important;
	height: 32px !important;
	margin: 2px 0 !important;
	visibility: visible !important;
}

.settings-modal-footer {
	align-self: stretch;
	padding: 8px 16px;
	background: white;
	border-top: 1px solid #F0F0F0;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	display: inline-flex;
}

.settings-modal-footer-button {
	padding: 8px 12px;
	background: white;
	border-radius: 4px;
	outline: 1px solid #D9D9D9;
	outline-offset: -1px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	display: flex;
	cursor: pointer;
	border: none;
}

.settings-modal-footer-button-primary {
	display: flex;
	padding: 8px var(--Size-sizeSM, 12px);
	justify-content: center;
	align-items: center;
	gap: 8px;
	border-radius: var(--Size-sizeXXS, 4px);
	background: var(--Primary-Brand, #2980B9);
	outline: 1px solid var(--Primary-Brand, #2980B9);
	outline-offset: -1px;
	cursor: pointer;
	border: none;
	color: #fff;
	transition: background-color .2s ease, opacity .2s ease;
}

.settings-modal-footer-button-primary:hover {
	background: #1f6ea0;
	outline-color: #1f6ea0;
}

.settings-modal-footer-button-primary.disabled {
	background: rgba(0, 0, 0, 0.04);
	outline: 1px solid #D9D9D9;
	cursor: not-allowed;
	color: rgba(0, 0, 0, .45);
}

.settings-modal-footer-button-text {
	justify-content: center;
	display: flex;
	flex-direction: column;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

.settings-modal-footer-button-text-disabled {
	justify-content: center;
	display: flex;
	flex-direction: column;
	color: #BFBFBF;
	font-size: 14px;
	font-family: Roboto;
	font-weight: 400;
	word-wrap: break-word;
}

/* Responsive design for modal */
@media (max-width: 768px) {
	.settings-modal {
		width: 95%;
		height: 90vh;
		max-width: 95%;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.settings-modal-main-content {
		flex-direction: column;
	}

	.settings-modal-vertical-divider {
		width: 100%;
		height: 1px;
	}

	.settings-modal-left-panel,
	.settings-modal-right-panel {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.settings-modal {
		width: 100%;
		height: 100vh;
		max-width: 100%;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		border-radius: 0;
	}
}

/* Settings Modal Watchlist Styles */
.settings-modal-watchlist-container {
	overflow: auto;
	width: 100%;
	max-height: 300px;
}

.settings-modal-watchlist-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border: 1px solid #eee;
	border-radius: 4px;
	cursor: pointer;
	margin-bottom: 8px;
	background: #fff;
}

.settings-modal-watchlist-item.active {
	background: #E5EFF7;
}

.settings-modal-watchlist-icon {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.settings-modal-watchlist-icon img {
	width: 20px;
	height: 20px;
	cursor: grab;
}

.settings-modal-watchlist-icon .delete {
	cursor: pointer;
}

.settings-modal-watchlist-content {
	flex: 1;
	min-width: 0;
}

.settings-modal-watchlist-name {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #111;
}

.settings-modal-watchlist-item.active .settings-modal-watchlist-name {
	color: #2980B9;
}


.settings-modal-watchlist-empty {
	color: #888;
	font-size: 12px;
}

.settings-modal-table-body {
	max-height: 304px;
	width: 100%;
	overflow: auto;
	padding-bottom: 8px;
}

.settings-modal-table-empty {
	padding: 12px;
	color: #888;
}

.settings-modal-search input {
	width: 100%;
	min-width: 200px;
}

/* Input field styling for modal */
.settings-modal-input input,
.settings-modal-search input {
	color: #000 !important;
}

.settings-modal-input input::placeholder,
.settings-modal-search input::placeholder {
	color: #999 !important;
}

/* Highlight effect for updated positions */
.highlight-updated {
	background-color: #e3f2fd !important;
	animation: highlightPulse 0.5s ease-in-out;
}

@keyframes highlightPulse {
	0% {
		background-color: #e3f2fd;
		box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);
	}

	50% {
		background-color: #bbdefb;
		box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.1);
	}

	100% {
		background-color: #e3f2fd;
		box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
	}
}

/* Watchlist card drag and drop styles */
.watchlist-card-placeholder {
	align-self: stretch;
	padding: 8px 12px;
	border-radius: 8px !important;
	background: #E5EFF7 !important;
	border: 2px dashed #2980B9 !important;
	min-height: 50px;
	opacity: 1 !important;
}

.watchlist-card-dragging {
	cursor: grabbing !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
	opacity: 0.95 !important;
	background: #fff !important;
}

.watchlist-cards-container .watchlist-card {
	cursor: default;
}