/* ==========================================================================
   Astromart Dark Mode Stylesheet
   ========================================================================== */

/* --- Theme Switcher in Top Navigation --- */
.theme-switch-nav-item {
  display: inline-flex;
  align-items: center;
}

@media screen and (min-width: 991px) {
  .navbar .navbar-nav--top .theme-switch-nav-item::after {
    display: none !important;
    content: "" !important;
  }
}

.theme-switch-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 3px 10px;
  margin-left: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  transition: all 0.2s ease-in-out;
  vertical-align: middle;
}

.theme-switch-btn:hover,
.theme-switch-btn:focus {
  border-color: #f4ba2f;
  color: #f4ba2f;
  outline: none;
}

.theme-switch-pill {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  transition: background-color 0.25s ease;
  vertical-align: middle;
}

.theme-switch-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease, background-color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
  font-size: 9px;
}

.theme-switch-handle .theme-icon-sun {
  display: none;
}
.theme-switch-handle .theme-icon-moon {
  display: inline-block;
}

/* When dark mode is active on html */
html.dark-theme .theme-switch-btn {
  border-color: rgba(244, 186, 47, 0.6);
  color: #f4ba2f;
}

html.dark-theme .theme-switch-pill {
  background-color: #f4ba2f;
}

html.dark-theme .theme-switch-handle {
  transform: translateX(14px);
  background-color: #1a1a1a;
  color: #f4ba2f;
}

html.dark-theme .theme-switch-handle .theme-icon-moon {
  display: none;
}
html.dark-theme .theme-switch-handle .theme-icon-sun {
  display: inline-block;
}

/* Smooth Transitions */
body,
.box,
.box .content,
.table,
.table td,
.table th,
.table-striped tbody tr:nth-of-type(odd),
.flex-table-row,
.form-control,
.breadcrumb,
.card-post,
.post-body,
.Media__author,
.Media__content,
.comment-content,
.comment-meta,
.comment-footer,
.pagination li a,
#filters {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* --- Dark Theme Core Overrides --- */
html.dark-theme {
  color-scheme: dark;
}

html.dark-theme body {
  background-color: #121212;
  color: #d6d9dc;
}

/* Headings & Text */
html.dark-theme h1,
html.dark-theme h2,
html.dark-theme h3,
html.dark-theme h4,
html.dark-theme h5,
html.dark-theme h6,
html.dark-theme .title,
html.dark-theme .col-first h1 {
  color: #f0f3f6 !important;
}

html.dark-theme p,
html.dark-theme span,
html.dark-theme label {
  color: #d6d9dc;
}

html.dark-theme a {
  color: #58a6ff;
}

html.dark-theme a:hover,
html.dark-theme a:focus {
  color: #8cc2ff;
}

html.dark-theme hr {
  border-top-color: #2e3238;
}

/* ==========================================================================
   Buttons (ensure <a> buttons aren't broken by 'html.dark-theme a')
   ========================================================================== */
html.dark-theme .btn,
html.dark-theme a.btn {
  text-decoration: none;
}

html.dark-theme .btn-third,
html.dark-theme a.btn-third {
  background-color: #2e3238 !important;
  border: 1px solid #444b55 !important;
  color: #f0f3f6 !important;
}

html.dark-theme .btn-third:hover,
html.dark-theme a.btn-third:hover,
html.dark-theme .btn-third:focus,
html.dark-theme a.btn-third:focus {
  background-color: #3b4149 !important;
  border-color: #58a6ff !important;
  color: #ffffff !important;
}

html.dark-theme .btn-secondary,
html.dark-theme a.btn-secondary {
  background-color: #252830 !important;
  border: 1px solid #3e4451 !important;
  color: #f0f3f6 !important;
}

html.dark-theme .btn-secondary:hover,
html.dark-theme a.btn-secondary:hover,
html.dark-theme .btn-secondary:focus,
html.dark-theme a.btn-secondary:focus {
  background-color: #303540 !important;
  color: #ffffff !important;
}

html.dark-theme .btn-primary,
html.dark-theme a.btn-primary {
  color: #ffffff !important;
}

html.dark-theme .btn-success,
html.dark-theme a.btn-success {
  color: #ffffff !important;
}

html.dark-theme .btn-danger,
html.dark-theme a.btn-danger {
  color: #ffffff !important;
}

html.dark-theme .btn-warning,
html.dark-theme a.btn-warning {
  color: #212529 !important;
}

html.dark-theme .btn-info,
html.dark-theme a.btn-info {
  color: #ffffff !important;
}

/* ==========================================================================
   Filter Forms (#filters) - Classifieds, Auctions, Search Within
   ========================================================================== */
html.dark-theme #filters,
html.dark-theme form#filters {
  background: #1c1d1f !important;
  color: #d6d9dc !important;
  border: 1px solid #2e3238 !important;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

html.dark-theme #filters label,
html.dark-theme form#filters label {
  color: #d6d9dc !important;
  margin-left: 2px;
  margin-right: 6px;
  margin-bottom: 0;
  cursor: pointer;
}

html.dark-theme #filters select,
html.dark-theme form#filters select,
html.dark-theme #filters input[type="text"],
html.dark-theme form#filters input[type="text"],
html.dark-theme #filters input[type="search"],
html.dark-theme form#filters input[type="search"] {
  background-color: #252830 !important;
  color: #f0f3f6 !important;
  border: 1px solid #3e4451 !important;
  border-radius: 3px;
  padding: 3px 6px;
  margin: 0 4px;
}

html.dark-theme #filters input[type="submit"],
html.dark-theme form#filters input[type="submit"] {
  background-color: #363b44 !important;
  color: #ffffff !important;
  border: 1px solid #4a5160 !important;
  border-radius: 3px;
  padding: 3px 12px;
  margin-left: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

html.dark-theme #filters input[type="submit"]:hover,
html.dark-theme form#filters input[type="submit"]:hover {
  background-color: #444b57 !important;
  border-color: #58a6ff !important;
}

/* ==========================================================================
   Boxes / Panels
   ========================================================================== */
html.dark-theme .box {
  background: #1c1d1f;
  border-color: #2e3238;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

html.dark-theme .box .content {
  color: #d6d9dc;
}

html.dark-theme .box--plain {
  background: #1c1d1f;
  border-color: #2e3238;
}

html.dark-theme .box--latest,
html.dark-theme .box--featured {
  background: #1c1d1f;
  border-color: #2e3238;
}

html.dark-theme .box--featured footer {
  background: #161719;
  border-color: #2e3238;
}

html.dark-theme .box--news {
  background: #1c1d1f;
  border-color: #2e3238;
}

html.dark-theme .box--news footer {
  background: #161719;
  border-color: #2e3238;
}

html.dark-theme .box--news footer .btn-secondary {
  background-color: #2a2c30;
  border-color: #3e4451;
  color: #e4e6eb;
}

html.dark-theme .box--list .content ul li a {
  color: #79b8ff;
}

html.dark-theme .box--list .content ul li a:hover {
  color: #a8d1ff;
}

/* ==========================================================================
   Tables & Lists
   ========================================================================== */
html.dark-theme table,
html.dark-theme .table {
  color: #d6d9dc;
  background-color: #1c1d1f;
}

html.dark-theme .table td,
html.dark-theme .table th {
  border-top-color: #2e3238;
  border-color: #2e3238;
}

html.dark-theme .table th {
  background: #252830;
  color: #f3f4f6;
  border-bottom: 2px solid #363b44;
}

html.dark-theme .table-striped tbody tr:nth-of-type(odd) {
  background-color: #23252a;
}

html.dark-theme .table-hover tbody tr:hover {
  background-color: #2a2e38;
}

html.dark-theme .table-bordered {
  border: 1px solid #2e3238;
}

html.dark-theme .table-bordered td,
html.dark-theme .table-bordered th {
  border: 1px solid #2e3238;
}

/* Flex Table */
html.dark-theme .flex-table {
  color: #d6d9dc;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--header {
  background: #252830 !important;
  color: #f3f4f6 !important;
  border-bottom: 2px solid #363b44 !important;
  border-top: 1px solid #363b44 !important;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--header a {
  color: #58a6ff !important;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--header a:hover {
  color: #8cc2ff !important;
}

html.dark-theme .flex-table.flex-table-striped .flex-table-row.flex-table-row--body:nth-of-type(odd) {
  background: #23252a !important;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--body {
  border-bottom: 1px solid #2e3238;
  color: #d6d9dc !important;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--body:hover {
  background: #2a2e38 !important;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--body a {
  color: #58a6ff !important;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--body a:visited {
  color: #b392f0 !important;
}

html.dark-theme .flex-table .flex-table-row.flex-table-row--body a:hover {
  color: #8cc2ff !important;
}

/* Classifieds Table */
html.dark-theme .classifieds td {
  color: #d6d9dc !important;
}

html.dark-theme .classifieds a {
  color: #58a6ff !important;
}

html.dark-theme .classifieds a:visited {
  color: #b392f0 !important;
}

html.dark-theme .classifieds .type-for-sale {
  color: #f87171 !important;
}

html.dark-theme .classifieds .type-wanted {
  color: #60a5fa !important;
}

/* Forum Table & Flex Forum */
html.dark-theme .table-forum {
  background-color: #1c1d1f;
  color: #c9ccd0;
}

html.dark-theme .table-forum td {
  border-color: #2e3238;
}

html.dark-theme .table-forum .forum-title-td h4 a,
html.dark-theme .table-forum .thread-title-td h4 a {
  color: #f0f3f6;
}

html.dark-theme .table-forum .time {
  color: #8b949e;
}

html.dark-theme .flex-table-forum {
  border-color: #2e3238;
}

html.dark-theme .flex-table-forum .flex-table-row.flex-table-row--body {
  border-bottom-color: #2e3238;
}

html.dark-theme .flex-table-forum .flex-table-row.flex-table-row--body:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

html.dark-theme .flex-table-forum .flex-table-row .flex-table-col {
  border-right-color: #2e3238;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
html.dark-theme .form-control,
html.dark-theme input.form-control,
html.dark-theme select.form-control,
html.dark-theme textarea.form-control,
html.dark-theme input[type="text"],
html.dark-theme input[type="email"],
html.dark-theme input[type="password"],
html.dark-theme input[type="number"],
html.dark-theme input[type="search"],
html.dark-theme select,
html.dark-theme textarea {
  background-color: #252830;
  border-color: #3e4451;
  color: #f0f3f6;
}

html.dark-theme .form-control:focus,
html.dark-theme input:focus,
html.dark-theme select:focus,
html.dark-theme textarea:focus {
  background-color: #2a2e38;
  border-color: #58a6ff;
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

html.dark-theme .form-control:disabled,
html.dark-theme .form-control[readonly] {
  background-color: #1a1b1e;
  border-color: #2a2c30;
  color: #6b7280;
}

html.dark-theme select option {
  background-color: #252830;
  color: #f0f3f6;
}

html.dark-theme .input-group-addon {
  background-color: #2a2c30;
  border-color: #3e4451;
  color: #d6d9dc;
}

/* ==========================================================================
   Forum Search Bar & Settings Dropdown
   ========================================================================== */
html.dark-theme .input-search {
  background-color: #252830 !important;
  border-color: #3e4451 !important;
  color: #f0f3f6 !important;
}

html.dark-theme .btn-search-settings {
  background-color: #252830 !important;
  border-color: #3e4451 !important;
  border-left: none !important;
  color: #f0f3f6 !important;
}

html.dark-theme .btn-search-settings:hover,
html.dark-theme .btn-search-settings:focus,
html.dark-theme .btn-search-settings:active {
  background-color: #2f343f !important;
  color: #ffffff !important;
  border-color: #3e4451 !important;
}

html.dark-theme .search-settings {
  background-color: #1c1d1f !important;
  border: 1px solid #3e4451 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6) !important;
  color: #d6d9dc !important;
}

html.dark-theme .search-settings legend,
html.dark-theme legend {
  color: #f0f3f6 !important;
  font-size: 1rem;
  font-weight: 600;
}

html.dark-theme .form-check,
html.dark-theme .form-check-label {
  color: #d6d9dc !important;
}

html.dark-theme .btn-outline-secondary {
  background-color: #252830 !important;
  border-color: #3e4451 !important;
  color: #d6d9dc !important;
}

html.dark-theme .btn-outline-secondary:hover {
  background-color: #303540 !important;
  color: #ffffff !important;
  border-color: #58a6ff !important;
}

/* ==========================================================================
   Breadcrumbs & Pagination
   ========================================================================== */
html.dark-theme .breadcrumb {
  background-color: #1c1d1f;
  border: 1px solid #2e3238;
}

html.dark-theme .breadcrumb-item a {
  color: #79b8ff;
}

html.dark-theme .breadcrumb-item.active {
  color: #a0a6b0;
}

html.dark-theme .breadcrumb-item + .breadcrumb-item::before {
  color: #636b76;
}

html.dark-theme .pagination li a,
html.dark-theme .page-link {
  background-color: #252830;
  border-color: #3e4451;
  color: #d6d9dc;
}

html.dark-theme .pagination li a:hover,
html.dark-theme .pagination li a:focus,
html.dark-theme .page-link:hover {
  background-color: #303540;
  border-color: #58a6ff;
  color: #ffffff;
}

html.dark-theme .pagination li.page-item.active .page-link,
html.dark-theme .page-item.active .page-link {
  background-color: #161616;
  border-color: #f4ba2f;
  color: #f4ba2f;
}

html.dark-theme .page-item.disabled .page-link {
  background-color: #1a1b1e;
  border-color: #2a2c30;
  color: #555b66;
}

/* ==========================================================================
   Forum Posts, Media & Quotes
   ========================================================================== */
html.dark-theme .card-post {
  border: 1px solid #2e3238;
}

html.dark-theme .post-body {
  background-color: #1c1d1f;
  color: #e5e7eb;
}

html.dark-theme .Media__author {
  background-color: #161719;
  color: #c9ccd0;
  border-right: 1px solid #2e3238;
}

html.dark-theme .Media__author .Media__username {
  color: #58a6ff;
}

html.dark-theme .Media__membership {
  color: #f4ba2f !important;
}

html.dark-theme .Media__details p {
  color: #9ca3af !important;
}

html.dark-theme .Media__content {
  color: #e5e7eb !important;
}

html.dark-theme .Media__post {
  color: #e5e7eb !important;
}

html.dark-theme .Media__post p,
html.dark-theme .Media__post div,
html.dark-theme .Media__post span,
html.dark-theme .Media__post li {
  color: #e5e7eb;
}

html.dark-theme .Media__content blockquote {
  background-color: #252830 !important;
  color: #d6d9dc !important;
  border: 1px solid #3e4451 !important;
  border-left: 4px solid #f4ba2f !important;
  box-shadow: none !important;
  padding: 10px 15px;
}

html.dark-theme .attachment {
  background-color: #161719 !important;
  border-color: #2e3238 !important;
}

html.dark-theme .blockquote {
  background-color: #252830 !important;
  color: #d6d9dc !important;
}

/* ==========================================================================
   Comments
   ========================================================================== */
html.dark-theme .comment-meta,
html.dark-theme .comment-footer {
  background-color: #252830;
  color: #f0f3f6;
  border: 1px solid #2e3238;
}

html.dark-theme .comment-content {
  background-color: #1c1d1f;
  color: #d6d9dc;
  border: 1px solid #2e3238;
  border-top: none;
}

html.dark-theme .comment-main + .comment-main {
  border-top-color: #2e3238;
}

html.dark-theme .comment ul li:after {
  background: #3e4451;
}

html.dark-theme .replies_to a {
  color: #f4ba2f;
}

html.dark-theme .comment-count {
  color: #9ca3af !important;
}

/* ==========================================================================
   Auction & Classified Details (dl/dd/dt)
   ========================================================================== */
html.dark-theme .auction-details dl dt {
  color: #9ba1a8 !important;
  border-bottom: 1px solid #2e3238 !important;
}

html.dark-theme .auction-details dl dd {
  color: #f0f3f6 !important;
  border-bottom: 1px solid #2e3238 !important;
  background: transparent !important;
}

html.dark-theme .auction-details dl dd:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.03) !important;
}

@media screen and (max-width: 575px) {
  html.dark-theme .auction-details dl dd {
    background: rgba(255, 255, 255, 0.03) !important;
  }
}

/* ==========================================================================
   Modals, Dropdowns & Popovers
   ========================================================================== */
html.dark-theme .modal-content {
  background-color: #1c1d1f;
  border-color: #3e4451;
  color: #d6d9dc;
}

html.dark-theme .modal-header,
html.dark-theme .modal-footer {
  border-color: #2e3238;
}

html.dark-theme .modal-header .close {
  color: #ffffff;
  text-shadow: none;
  opacity: 0.8;
}

html.dark-theme .modal-header .close:hover {
  opacity: 1;
}

html.dark-theme .dropdown-menu {
  background-color: #1c1d1f;
  border-color: #3e4451;
}

html.dark-theme .dropdown-item {
  color: #d6d9dc;
}

html.dark-theme .dropdown-item:hover,
html.dark-theme .dropdown-item:focus {
  background-color: #252830;
  color: #ffffff;
}

html.dark-theme .dropdown-divider {
  border-top-color: #2e3238;
}

/* Tabs & Tab Panes (Users profile, Notifications, etc.) */
html.dark-theme .tab-content,
html.dark-theme div.tab-content,
html.dark-theme div.tab-content[style*="background"] {
  background: #1c1d1f !important;
  color: #d6d9dc !important;
  border: 1px solid #2e3238 !important;
  border-top: none !important;
  padding: 15px;
}

html.dark-theme .tab-pane {
  background: transparent !important;
  color: #d6d9dc !important;
}

html.dark-theme .nav-tabs {
  border-bottom: 1px solid #3e4451 !important;
}

html.dark-theme .nav-tabs .nav-link {
  color: #a0a6b0 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}

html.dark-theme .nav-tabs .nav-link:hover,
html.dark-theme .nav-tabs .nav-link:focus {
  color: #58a6ff !important;
  border-color: #3e4451 #3e4451 transparent !important;
}

html.dark-theme .nav-tabs .nav-link.active,
html.dark-theme .nav-tabs .nav-item.show .nav-link {
  color: #f4ba2f !important;
  background-color: #1c1d1f !important;
  border-color: #3e4451 #3e4451 #1c1d1f !important;
}

/* User Profile Specifics */
html.dark-theme .my-content {
  color: #d6d9dc !important;
}

/* Polls in threads */
html.dark-theme div[style*="background-color: #F6F6F6"] {
  background-color: #1c1d1f !important;
  border: 1px solid #2e3238 !important;
}

/* Dropzone in gallery/upload */
html.dark-theme .dropzone[style*="background: #eee"] {
  background: #1c1d1f !important;
  border-color: #3e4451 !important;
}

/* List Groups & Cards */
html.dark-theme .list-group-item {
  background-color: #1c1d1f;
  border-color: #2e3238;
  color: #d6d9dc;
}

html.dark-theme .list-group-item-action:hover,
html.dark-theme .list-group-item-action:focus {
  background-color: #252830;
  color: #ffffff;
}

html.dark-theme .card {
  background-color: #1c1d1f;
  border-color: #2e3238;
}

html.dark-theme .card-header {
  background-color: #252830;
  border-bottom-color: #2e3238;
}

html.dark-theme .card-footer {
  background-color: #161719;
  border-top-color: #2e3238;
}

/* Alerts */
html.dark-theme .alert-info {
  background-color: #132a45;
  border-color: #1d436e;
  color: #a5d8ff;
}

html.dark-theme .alert-success {
  background-color: #12331d;
  border-color: #1e5c33;
  color: #a3e6b7;
}

html.dark-theme .alert-warning {
  background-color: #382909;
  border-color: #59410f;
  color: #fde08e;
}

html.dark-theme .alert-danger {
  background-color: #3b1416;
  border-color: #5c1f22;
  color: #ffb3b8;
}

/* Opener buttons for responsive sidebars */
html.dark-theme .opener {
  background: #252830;
  color: #f4ba2f;
  border: 1px solid #3e4451;
}

/* ==========================================================================
   Jumbotron & Forum Form Attachments/Settings
   ========================================================================== */
html.dark-theme .jumbotron,
html.dark-theme .jumbotron-forum {
  background-color: #1c1d1f !important;
  border: 1px solid #2e3238 !important;
  color: #d6d9dc !important;
}

html.dark-theme .jumbotron-forum h4,
html.dark-theme .jumbotron-forum h4.text-center {
  color: #f0f3f6 !important;
}

html.dark-theme .jumbotron-forum label,
html.dark-theme .jumbotron-forum .form-check-label {
  color: #d6d9dc !important;
}

html.dark-theme .jumbotron-forum .text-muted,
html.dark-theme .jumbotron-forum small {
  color: #9ca3af !important;
}

html.dark-theme .jumbotron-forum input[type="file"] {
  color: #d6d9dc !important;
}

/* ==========================================================================
   Date Search Component (.input-group-icon & input-group-prepend)
   ========================================================================== */
html.dark-theme .input-group-icon {
  background-color: #252830 !important;
  border-color: #3e4451 !important;
  color: #f4ba2f !important;
}

html.dark-theme .input-group-prepend + select.form-control,
html.dark-theme #filterForumDate {
  background-color: #252830 !important;
  border-color: #3e4451 !important;
  color: #f0f3f6 !important;
}

/* ==========================================================================
   SCeditor / WYSIWYG Overrides (Square & Default Themes)
   ========================================================================== */
html.dark-theme .sceditor-container {
  background: #1a1b1e !important;
  border: 1px solid #3e4451 !important;
}

html.dark-theme div.sceditor-toolbar {
  background: #252830 !important;
  background-image: none !important;
  border-bottom: 1px solid #3e4451 !important;
}

html.dark-theme div.sceditor-group {
  background: #1c1d1f !important;
  background-image: none !important;
  border-right: 1px solid #3e4451 !important;
  border-left: 1px solid #2a2c32 !important;
  border-bottom: none !important;
}

html.dark-theme .sceditor-button {
  background: transparent !important;
}

html.dark-theme .sceditor-button:hover,
html.dark-theme .sceditor-button.active,
html.dark-theme .sceditor-button:active {
  background: #363b44 !important;
  border: 1px solid #4a5160 !important;
}

html.dark-theme .sceditor-button svg {
  fill: #e5e7eb !important;
}

html.dark-theme .sceditor-container iframe,
html.dark-theme .sceditor-container textarea {
  background: #1a1b1e !important;
  color: #e5e7eb !important;
}

html.dark-theme div.sceditor-dropdown {
  background: #1c1d1f !important;
  border: 1px solid #3e4451 !important;
  color: #e5e7eb !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6) !important;
}

html.dark-theme div.sceditor-dropdown a,
html.dark-theme div.sceditor-dropdown label,
html.dark-theme div.sceditor-dropdown input,
html.dark-theme div.sceditor-dropdown textarea {
  color: #e5e7eb !important;
}

html.dark-theme div.sceditor-dropdown input,
html.dark-theme div.sceditor-dropdown textarea {
  background-color: #252830 !important;
  border-color: #3e4451 !important;
}

html.dark-theme div.sceditor-dropdown .button {
  background: #363b44 !important;
  border-color: #4a5160 !important;
  color: #ffffff !important;
}

html.dark-theme .sceditor-dropdown a:hover,
html.dark-theme .sceditor-font-option:hover,
html.dark-theme .sceditor-fontsize-option:hover,
html.dark-theme .sceditor-format a:hover {
  background: #252830 !important;
  color: #58a6ff !important;
}

/* Datepicker & Calendar */
html.dark-theme .datepicker {
  background-color: #1c1d1f !important;
  border: 1px solid #3e4451 !important;
  color: #f0f3f6 !important;
}

html.dark-theme .datepicker table tr td,
html.dark-theme .datepicker table tr th {
  color: #f0f3f6 !important;
}

html.dark-theme .datepicker table tr td.day:hover,
html.dark-theme .datepicker table tr td.focused {
  background: #252830 !important;
}

html.dark-theme .fc-calendar-container {
  background: #1c1d1f !important;
  box-shadow: none !important;
}

html.dark-theme .fc-calendar .fc-head {
  color: #f0f3f6 !important;
}

html.dark-theme .fc-calendar .fc-row > div {
  background: #252830 !important;
  border-color: #2e3238 !important;
}

html.dark-theme .fc-calendar .fc-row > div > span.fc-date {
  color: #d6d9dc !important;
}

html.dark-theme .custom-inner {
  background: #1c1d1f !important;
}

html.dark-theme .custom-header {
  background: #1c1d1f !important;
  border-bottom-color: #2e3238 !important;
}

html.dark-theme .custom-header h2,
html.dark-theme .custom-header h3,
html.dark-theme .custom-header nav span {
  color: #f0f3f6 !important;
}

/* Rating stars & Results view */
html.dark-theme .results-view ul li a {
  background: #252830 !important;
  color: #d6d9dc !important;
}

html.dark-theme ul.rating li {
  color: #f4ba2f !important;
}

/* ==========================================================================
   Support Level Colors & Brighter Tones for Dark Mode
   Preserves light mode styles while providing WCAG compliant contrast
   ========================================================================== */

/* 1. Lifetime Supporter / Dark Color (e.g. Andy Sedlacek: color:Black; font-weight: bold;)
   In dark mode, invert black text to high-contrast brilliant white with bold weight */
html.dark-theme [style*="color:Black"],
html.dark-theme [style*="color: Black"],
html.dark-theme [style*="color:black"],
html.dark-theme [style*="color: black"],
html.dark-theme [style*="color:#000"],
html.dark-theme [style*="color: #000"],
html.dark-theme [style*="color:black" i],
html.dark-theme [style*="color: black" i] {
  color: #ffffff !important;
  font-weight: bold !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.35);
}

html.dark-theme a[style*="color:Black"]:hover,
html.dark-theme a[style*="color: Black"]:hover,
html.dark-theme a[style*="color:black"]:hover,
html.dark-theme a[style*="color: black"]:hover,
html.dark-theme a[style*="color:black" i]:hover,
html.dark-theme a[style*="color: black" i]:hover {
  color: #e2e8f0 !important;
  text-decoration: underline !important;
}

/* 2. Blue Level (e.g. color: Blue; font-weight: bold;) -> Brighter Sky Blue */
html.dark-theme [style*="color:Blue"],
html.dark-theme [style*="color: Blue"],
html.dark-theme [style*="color:blue"],
html.dark-theme [style*="color: blue"],
html.dark-theme [style*="color:blue" i],
html.dark-theme [style*="color: blue" i] {
  color: #60a5fa !important;
  font-weight: bold !important;
}

html.dark-theme a[style*="color:Blue"]:hover,
html.dark-theme a[style*="color: Blue"]:hover,
html.dark-theme a[style*="color:blue"]:hover,
html.dark-theme a[style*="color: blue"]:hover,
html.dark-theme a[style*="color:blue" i]:hover,
html.dark-theme a[style*="color: blue" i]:hover {
  color: #93c5fd !important;
  text-decoration: underline !important;
}

/* 3. Red Level (e.g. color: Red; font-weight: bold;) -> Brighter Soft Coral Red */
html.dark-theme [style*="color:Red"],
html.dark-theme [style*="color: Red"],
html.dark-theme [style*="color:red"],
html.dark-theme [style*="color: red"],
html.dark-theme [style*="color:red" i],
html.dark-theme [style*="color: red" i] {
  color: #ff7b72 !important;
  font-weight: bold !important;
}

html.dark-theme a[style*="color:Red"]:hover,
html.dark-theme a[style*="color: Red"]:hover,
html.dark-theme a[style*="color:red"]:hover,
html.dark-theme a[style*="color: red"]:hover,
html.dark-theme a[style*="color:red" i]:hover,
html.dark-theme a[style*="color: red" i]:hover {
  color: #ffa198 !important;
  text-decoration: underline !important;
}

/* 4. Green Level (e.g. color: Green; font-weight: bold;) -> Brighter Mint/Emerald Green */
html.dark-theme [style*="color:Green"],
html.dark-theme [style*="color: Green"],
html.dark-theme [style*="color:green"],
html.dark-theme [style*="color: green"],
html.dark-theme [style*="color:green" i],
html.dark-theme [style*="color: green" i] {
  color: #4ade80 !important;
  font-weight: bold !important;
}

html.dark-theme a[style*="color:Green"]:hover,
html.dark-theme a[style*="color: Green"]:hover,
html.dark-theme a[style*="color:green"]:hover,
html.dark-theme a[style*="color: green"]:hover,
html.dark-theme a[style*="color:green" i]:hover,
html.dark-theme a[style*="color: green" i]:hover {
  color: #86efac !important;
  text-decoration: underline !important;
}

/* 5. Purple Level (e.g. color: Purple; font-weight: bold;) -> Brighter Lavender Violet */
html.dark-theme [style*="color:Purple"],
html.dark-theme [style*="color: Purple"],
html.dark-theme [style*="color:purple"],
html.dark-theme [style*="color: purple"],
html.dark-theme [style*="color:purple" i],
html.dark-theme [style*="color: purple" i] {
  color: #c084fc !important;
  font-weight: bold !important;
}

html.dark-theme a[style*="color:Purple"]:hover,
html.dark-theme a[style*="color: Purple"]:hover,
html.dark-theme a[style*="color:purple"]:hover,
html.dark-theme a[style*="color: purple"]:hover,
html.dark-theme a[style*="color:purple" i]:hover,
html.dark-theme a[style*="color: purple" i]:hover {
  color: #d8b4fe !important;
  text-decoration: underline !important;
}

/* 6. Brown Level (e.g. color:Brown; font-weight: bold;) -> Brighter Warm Amber / Caramel */
html.dark-theme [style*="color:Brown"],
html.dark-theme [style*="color: Brown"],
html.dark-theme [style*="color:brown"],
html.dark-theme [style*="color: brown"],
html.dark-theme [style*="color:brown" i],
html.dark-theme [style*="color: brown" i] {
  color: #f0b429 !important;
  font-weight: bold !important;
}

html.dark-theme a[style*="color:Brown"]:hover,
html.dark-theme a[style*="color: Brown"]:hover,
html.dark-theme a[style*="color:brown"]:hover,
html.dark-theme a[style*="color: brown"]:hover,
html.dark-theme a[style*="color:brown" i]:hover,
html.dark-theme a[style*="color: brown" i]:hover {
  color: #fcd34d !important;
  text-decoration: underline !important;
}

/* 7. Orange Style (e.g. color: orange; font-weight: bold;) -> Brighter Warm Peach Orange */
html.dark-theme [style*="color:Orange"],
html.dark-theme [style*="color: Orange"],
html.dark-theme [style*="color:orange"],
html.dark-theme [style*="color: orange"],
html.dark-theme [style*="color:orange" i],
html.dark-theme [style*="color: orange" i] {
  color: #fb923c !important;
  font-weight: bold !important;
}

html.dark-theme a[style*="color:Orange"]:hover,
html.dark-theme a[style*="color: Orange"]:hover,
html.dark-theme a[style*="color:orange"]:hover,
html.dark-theme a[style*="color: orange"]:hover,
html.dark-theme a[style*="color:orange" i]:hover,
html.dark-theme a[style*="color: orange" i]:hover {
  color: #fdba74 !important;
  text-decoration: underline !important;
}

/* 8. Classifieds and Auctions table title overrides - ensure support level colors are respected */
html.dark-theme .classifieds a[style*="color:"],
html.dark-theme .table a[style*="color:"],
html.dark-theme .flex-table a[style*="color:"] {
  font-weight: bold !important;
}

/* 9. Highlighted Row Styles (Yellow Highlighted Sponsor & Gold #F0C008) */
html.dark-theme {
  --classified-bg-sponsor: #3e3204;
  --classified-bg-gold: #45330a;
}

html.dark-theme tr.classified-style-5,
html.dark-theme .flex-table-row.classified-style-5,
html.dark-theme tr[style*="--classified-bg-sponsor"],
html.dark-theme .flex-table-row[style*="--classified-bg-sponsor"],
html.dark-theme tr[style*="background: yellow" i],
html.dark-theme tr[style*="background:yellow" i],
html.dark-theme .flex-table-row[style*="background: yellow" i],
html.dark-theme .flex-table-row[style*="background:yellow" i] {
  background-color: var(--classified-bg-sponsor, #3e3204) !important;
  border-left: 4px solid #facc15 !important;
}

html.dark-theme tr.classified-style-5:hover,
html.dark-theme .flex-table-row.classified-style-5:hover,
html.dark-theme tr[style*="--classified-bg-sponsor"]:hover,
html.dark-theme .flex-table-row[style*="--classified-bg-sponsor"]:hover {
  background-color: #4d3e07 !important;
}

html.dark-theme tr.classified-style-8,
html.dark-theme .flex-table-row.classified-style-8,
html.dark-theme tr[style*="--classified-bg-gold"],
html.dark-theme .flex-table-row[style*="--classified-bg-gold"],
html.dark-theme tr[style*="background: #F0C008" i],
html.dark-theme tr[style*="background:#F0C008" i],
html.dark-theme tr[style*="background: #f0c008" i],
html.dark-theme tr[style*="background:#f0c008" i],
html.dark-theme .flex-table-row[style*="background: #F0C008" i],
html.dark-theme .flex-table-row[style*="background:#F0C008" i],
html.dark-theme .flex-table-row[style*="background: #f0c008" i],
html.dark-theme .flex-table-row[style*="background:#f0c008" i] {
  background-color: var(--classified-bg-gold, #45330a) !important;
  border-left: 4px solid #f0c008 !important;
}

html.dark-theme tr.classified-style-8:hover,
html.dark-theme .flex-table-row.classified-style-8:hover,
html.dark-theme tr[style*="--classified-bg-gold"]:hover,
html.dark-theme .flex-table-row[style*="--classified-bg-gold"]:hover {
  background-color: #553e0d !important;
}

/* Text and Links inside highlighted rows */
html.dark-theme tr.classified-style-5 td,
html.dark-theme .flex-table-row.classified-style-5 .flex-table-col,
html.dark-theme tr.classified-style-8 td,
html.dark-theme .flex-table-row.classified-style-8 .flex-table-col,
html.dark-theme tr[style*="--classified-bg-sponsor"] td,
html.dark-theme .flex-table-row[style*="--classified-bg-sponsor"] .flex-table-col,
html.dark-theme tr[style*="--classified-bg-gold"] td,
html.dark-theme .flex-table-row[style*="--classified-bg-gold"] .flex-table-col {
  color: #f3f4f6 !important;
}

html.dark-theme .flex-table-row.classified-style-5 .flex-table-col--id,
html.dark-theme .flex-table-row.classified-style-8 .flex-table-col--id,
html.dark-theme .flex-table-row[style*="--classified-bg-sponsor"] .flex-table-col--id,
html.dark-theme .flex-table-row[style*="--classified-bg-gold"] .flex-table-col--id {
  color: #ffd54f !important;
}

html.dark-theme tr.classified-style-5 a,
html.dark-theme .flex-table-row.classified-style-5 a,
html.dark-theme tr.classified-style-8 a,
html.dark-theme .flex-table-row.classified-style-8 a,
html.dark-theme tr[style*="--classified-bg-sponsor"] a,
html.dark-theme .flex-table-row[style*="--classified-bg-sponsor"] a,
html.dark-theme tr[style*="--classified-bg-gold"] a,
html.dark-theme .flex-table-row[style*="--classified-bg-gold"] a {
  color: #79b8ff !important;
}

html.dark-theme tr.classified-style-5 a:hover,
html.dark-theme .flex-table-row.classified-style-5 a:hover,
html.dark-theme tr.classified-style-8 a:hover,
html.dark-theme .flex-table-row.classified-style-8 a:hover,
html.dark-theme tr[style*="--classified-bg-sponsor"] a:hover,
html.dark-theme .flex-table-row[style*="--classified-bg-sponsor"] a:hover,
html.dark-theme tr[style*="--classified-bg-gold"] a:hover,
html.dark-theme .flex-table-row[style*="--classified-bg-gold"] a:hover {
  color: #b3d7ff !important;
  text-decoration: underline !important;
}

/* 10. Astromart Supporter Badge (Top Users & Classifieds) */
html.dark-theme .badge-default {
  background-color: rgba(240, 192, 8, 0.15) !important;
  color: #f0c008 !important;
  border: 1px solid rgba(240, 192, 8, 0.45) !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
}
