/**
 * Diễn đàn Nexaboard: đổi các màu xanh sang màu vàng primary của web.
 * Chỉ ghi đè bằng CSS của theme, không sửa plugin.
 * Mọi selector có tiền tố "html body" để luôn mạnh hơn CSS gốc, bất kể thứ tự nạp file.
 */

/* ---------- Biến màu của plugin ---------- */
html body .nexaboard {
	--link: var(--site-primary-color, #F49E00);
	--link-strong: #ffb733;
	--blue: var(--site-primary-color, #F49E00);
	--button: var(--site-primary-color, #F49E00);
	--nexaboard-editor-link: var(--site-primary-color, #F49E00);
}

html body .nexaboard-message-shortcode,
html body .nexaboard-notification-shortcode {
	--link: var(--site-primary-color, #F49E00);
	--link-strong: #ffb733;
}

html body .nexaboard-auth-shortcode-form,
html body .nexaboard-auth-shortcode-notice {
	--nexaboard-auth-link: var(--site-primary-color, #F49E00);
	--nexaboard-auth-link-hover: #ffb733;
	--nexaboard-auth-button-bg: var(--site-primary-color, #F49E00);
	--nexaboard-auth-button-border: var(--site-primary-color, #F49E00);
}

html body .nexaboard-emoji-picker {
	--nexaboard-emoji-active: var(--site-primary-color, #F49E00);
}

/* ---------- Nút: nền vàng, chữ tối cho dễ đọc (nút phụ màu xám giữ nguyên) ---------- */
html body :is(.nexaboard, .nexaboard-auth-modal-form, .nexaboard-auth-shortcode-form) .nexaboard-button.nexaboard-button:not(.nexaboard-button-secondary),
html body :is(.nexaboard, .nexaboard-auth-modal-form, .nexaboard-auth-shortcode-form) .nexaboard-button.nexaboard-button:not(.nexaboard-button-secondary):hover,
html body :is(.nexaboard, .nexaboard-auth-modal-form, .nexaboard-auth-shortcode-form) .nexaboard-button.nexaboard-button:not(.nexaboard-button-secondary):focus,
html body :is(.nexaboard, .nexaboard-auth-modal-form, .nexaboard-auth-shortcode-form) .nexaboard-button.nexaboard-button:not(.nexaboard-button-secondary):active {
	border-color: var(--site-primary-color, #F49E00) !important;
	color: #141414 !important;
}

html body .nexaboard .nexaboard-search-form .nexaboard-search-button,
html body .nexaboard .nexaboard-search-form .nexaboard-search-button:hover,
html body .nexaboard .nexaboard-search-form .nexaboard-search-button:focus {
	background-color: var(--site-primary-color, #F49E00);
	border-color: var(--site-primary-color, #F49E00);
	color: #141414;
}

html body .nexaboard-pagination a.is-current {
	border-color: var(--site-primary-color, #F49E00);
	color: #141414;
}

html body .nexaboard-rich-composer .mce-btn.mce-active,
html body .nexaboard-rich-composer .mce-btn.mce-active:hover,
html body .nexaboard-rich-composer .mce-btn.mce-active:focus,
html body .nexaboard-rich-composer .mce-btn.mce-active.mce-pressed {
	background-color: var(--site-primary-color, #F49E00) !important;
	border-color: var(--site-primary-color, #F49E00) !important;
	color: #141414 !important;
}

html body .nexaboard-sticky-separator {
	background-color: var(--site-primary-color, #F49E00);
}

/* ---------- Link / chữ màu xanh ghi thẳng trong plugin ---------- */
html body .nexaboard-topic-pages a,
html body .nexaboard-topic-page-ellipsis,
html body .nexaboard-message-row.is-unread strong {
	color: var(--site-primary-color, #F49E00);
}

html body .nexaboard-post-edit-link,
html body .nexaboard-report-box > summary.nexaboard-report-trigger,
html body .nexaboard-split-trigger.nexaboard-report-trigger,
html body .nexaboard-like-button:hover,
html body .nexaboard-like-button.is-liked,
html body .nexaboard-share-link:hover,
html body .nexaboard-share-link:focus {
	color: var(--site-primary-color, #F49E00) !important;
}

html body .nexaboard-emoji-category.is-active,
html body .nexaboard-emoji-category.is-active:hover,
html body .nexaboard-emoji-category.is-active:focus {
	color: var(--site-primary-color, #F49E00);
}

/* Link phụ trong form đăng nhập / đăng ký (Quên mật khẩu, Quay lại...) */
html body :is(.nexaboard-auth-shortcode-form, .nexaboard-auth-modal-form, .nexaboard-auth-modal-content) :is(.nexaboard-auth-shortcode-actions, .nexaboard-auth-modal-actions) > .button-link {
	color: var(--site-primary-color, #F49E00) !important;
}

html body :is(.nexaboard-auth-shortcode-form, .nexaboard-auth-modal-form, .nexaboard-auth-modal-content) :is(.nexaboard-auth-shortcode-actions, .nexaboard-auth-modal-actions) > .button-link:is(:hover, :focus, :active) {
	color: #ffb733 !important;
}

/* ---------- Viền + bóng khi focus ô nhập ---------- */
html body .nexaboard .nexaboard-search-form input[type="search"]:focus,
html body .nexaboard-profile-form input:focus,
html body .nexaboard-profile-password-editor input:focus,
html body .nexaboard-auth-shortcode-form input:focus,
html body .nexaboard-auth-modal-form input:focus,
html body .nexaboard-language-select:hover,
html body .nexaboard-language-select:focus,
html body .nexaboard-emoji-picker-search:focus {
	border-color: var(--site-primary-color, #F49E00);
	box-shadow: 0 0 0 1px rgba(244, 158, 0, .25);
}

html body .nexaboard .nexaboard-captcha-answer:focus,
html body .nexaboard-split-modal .nexaboard-topic-tools-form input:focus,
html body .nexaboard-split-modal .nexaboard-topic-tools-form select:focus,
html body .nexaboard-auth-shortcode-form input[type="text"]:focus,
html body .nexaboard-auth-shortcode-form input[type="email"]:focus,
html body .nexaboard-auth-shortcode-form input[type="password"]:focus {
	border-color: var(--site-primary-color, #F49E00) !important;
	box-shadow: 0 0 0 1px rgba(244, 158, 0, .25) !important;
}

/* ---------- Icon diễn đàn có bài mới: bong bóng xanh → vàng ---------- */
html body .nexaboard-forum-icon img[src*="forum-unread.svg"] {
	content: url("../img/forum-unread.svg");
}

/* ---------- Nút lên / xuống đầu trang (chỉ ở trang diễn đàn) ---------- */
html body:has(.nexaboard) .back-to-top,
html body:has(.nexaboard) .back-to-bottom {
	background-color: var(--site-primary-color, #F49E00);
	color: #141414;
}
