/* ─────────────────────────────────────────────────────────────────────────
   Dark theme for the freelancer pages when they are FRAMED INSIDE the
   dashboard (/user/... → iframe with ?vai_embed=1&vai_theme=dark).

   Why this file exists at all: the freelancer app has no dark mode, and the
   dashboard's own dark stylesheet cannot cross an iframe boundary — so in
   dark mode the framed page painted pure white inside a black shell.

   Two guard rails, because this app also serves the PUBLIC freelancer site
   from the same stylesheets:
     1. The <link> is only emitted when the page is framed.
     2. Every selector below is scoped to html[data-vai-theme="dark"], which
        is only ever stamped inside that frame.
   Nothing here can reach volnyn.com/freelancer.

   Palette mirrors assets/user/css/dashboard-dark.css so the frame reads as
   part of the dashboard rather than a window onto another site.
   ───────────────────────────────────────────────────────────────────────── */

html[data-vai-theme="dark"] {
  /* The theme's own variables carry most components; overriding them here
     does the bulk of the work and keeps brand colours (green price, orange
     "Fixed" badge) exactly as they are. */
  --section-bg-1: #000000;
  --section-bg-2: #000000;
  --white: #0a0a0a;
  --heading-color: #ffffff;
  --paragraph-color: #cfcfcf;
  --body-color: #a8a8a8;
  --border-color: #262626;
  --border-color-2: #262626;

  --vai-dark-bg: #000000;
  --vai-dark-surface: #0a0a0a;
  --vai-dark-line: #262626;
  --vai-dark-text: #eaeaea;
  --vai-dark-muted: #8a8a8a;

  background-color: var(--vai-dark-bg);
  color-scheme: dark;
}

html[data-vai-theme="dark"] body {
  background-color: var(--vai-dark-bg) !important;
  color: var(--vai-dark-text);
}

/* ── Page shell ──────────────────────────────────────────────────────────── */
html[data-vai-theme="dark"] .preview-area,
html[data-vai-theme="dark"] .section-bg-1,
html[data-vai-theme="dark"] .section-bg-2,
html[data-vai-theme="dark"] .blue-bg,
html[data-vai-theme="dark"] .breadcrumb-area {
  background-color: var(--vai-dark-bg) !important;
}

html[data-vai-theme="dark"] .breadcrumb-contents-title { color: #ffffff !important; }
html[data-vai-theme="dark"] .breadcrumb-contents-list-item,
html[data-vai-theme="dark"] .breadcrumb-contents-list-item-link { color: var(--vai-dark-muted) !important; }

/* ── Category strip across the top ───────────────────────────────────────── */
html[data-vai-theme="dark"] .categorySub-area.category-light.bg-white,
html[data-vai-theme="dark"] .categorySub-area,
html[data-vai-theme="dark"] .categorySub,
html[data-vai-theme="dark"] .bg-white {
  background-color: var(--vai-dark-bg) !important;
  border-bottom-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .categorySub-area.category-light.border-top {
  border-top-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .categorySub-list-slide-link {
  border-color: var(--vai-dark-line) !important;
  background-color: #101010 !important;
}
/* The chip label is set by `.categorySub-area.category-light .…-list > a`,
   which is !important and more specific than the class on its own. */
html[data-vai-theme="dark"] .categorySub-area .categorySub-list-slide-list > a {
  color: var(--vai-dark-text) !important;
}
html[data-vai-theme="dark"] .categorySub-list-slide-link:hover,
html[data-vai-theme="dark"] .categorySub-list-slide-list.active .categorySub-list-slide-link {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
}
/* Prev / next arrows sit on a white pill by default. */
html[data-vai-theme="dark"] .categorySub-arrow::before {
  background-color: #141414 !important;
  color: var(--vai-dark-text) !important;
  box-shadow: 0 0 0 1px var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .categorySub-slide-submenu {
  background-color: var(--vai-dark-surface) !important;
  border-color: var(--vai-dark-line) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .6) !important;
}

/* ── Results bar: count, sort, mobile filter toggle, search ──────────────── */
html[data-vai-theme="dark"] .showing-results { color: var(--vai-dark-muted) !important; }
html[data-vai-theme="dark"] .filter-toggle-btn,
html[data-vai-theme="dark"] .sort-by-select,
html[data-vai-theme="dark"] .jobFilter-wrapper-search {
  background: var(--vai-dark-surface) !important;
  background-color: var(--vai-dark-surface) !important;
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .jobFilter-wrapper-search input {
  background: transparent !important;
  color: var(--vai-dark-text) !important;
}

/* ── Filter sidebar (shared filter-01 component, all !important upstream) ── */
html[data-vai-theme="dark"] .filter-wrap-01-shared {
  background: var(--vai-dark-surface) !important;
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .filter-header-01-shared {
  background: #101010 !important;
  border-bottom-color: var(--vai-dark-line) !important;
  color: #ffffff !important;
}
html[data-vai-theme="dark"] .filter-title-01-shared { color: #ffffff !important; }
/* The panel's own heading is a bare <h5> coloured by an !important rule. */
html[data-vai-theme="dark"] .filter-header-01-shared h5 { color: #ffffff !important; }
html[data-vai-theme="dark"] .filter-section-01-shared { border-bottom-color: var(--vai-dark-line) !important; }
html[data-vai-theme="dark"] .filter-checkbox-label-01-shared { color: var(--vai-dark-text) !important; }
/* Each option's text lives in a child span with its own !important colour. */
html[data-vai-theme="dark"] .filter-checkbox-label-01-shared span { color: var(--vai-dark-text) !important; }
html[data-vai-theme="dark"] .filter-checkbox-label-01-shared:hover { background: rgba(255, 255, 255, .06) !important; }
html[data-vai-theme="dark"] .filter-search-01-shared,
html[data-vai-theme="dark"] .filter-price-label-01-shared input {
  background: #000000 !important;
  color: var(--vai-dark-text) !important;
  border-color: #2a2a2a !important;
}
html[data-vai-theme="dark"] .filter-search-01-shared::placeholder { color: #6f6f6f !important; }
/* The price pill and the reset button carry their own light fills. */
html[data-vai-theme="dark"] .filter-price-label-01-shared {
  background: #101010 !important;
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .filter-reset-btn-01-shared {
  background: #101010 !important;
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .filter-reset-btn-01-shared:hover { background: #1a1a1a !important; }
html[data-vai-theme="dark"] .filter-slider-track-01-shared { background: #2a2a2a !important; }
html[data-vai-theme="dark"] .filter-close-btn-01-shared { color: var(--vai-dark-muted) !important; }
html[data-vai-theme="dark"] .filter-overlay-01-shared { background: rgba(0, 0, 0, .7) !important; }

/* ── Job cards ───────────────────────────────────────────────────────────── */
html[data-vai-theme="dark"] .categoryWrap-wrapper-item {
  background-color: var(--vai-dark-surface) !important;
  border: 1px solid var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .single-jobs-title,
html[data-vai-theme="dark"] .single-jobs-title a { color: #ffffff !important; }
html[data-vai-theme="dark"] .single-jobs-date,
html[data-vai-theme="dark"] .single-jobs-para,
html[data-vai-theme="dark"] .categoryWrap-wrapper-item-bottom-list-item,
html[data-vai-theme="dark"] .categoryWrap-wrapper-item-bottom-list-item .item-icon,
html[data-vai-theme="dark"] .categoryWrap-wrapper-item-bottom-list-item .item-para {
  color: var(--vai-dark-muted) !important;
}
html[data-vai-theme="dark"] .categoryWrap-wrapper-item-bottom-list-item .item-para strong { color: var(--vai-dark-text) !important; }
/* Card footer strip (location / proposals / verified / duration) sits on its
   own off-white band upstream. */
html[data-vai-theme="dark"] .categoryWrap-wrapper-item-bottom {
  background-color: #101010 !important;
  border-top-color: var(--vai-dark-line) !important;
}
/* Skill chips: outline only, so just the outline and label need moving. */
html[data-vai-theme="dark"] .single-jobs-tag-link {
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
  background-color: transparent !important;
}
html[data-vai-theme="dark"] .jobbookmark,
html[data-vai-theme="dark"] .click-wishlist { color: var(--vai-dark-muted) !important; }

/* ── Generic form controls + the theme's white-input rule ────────────────── */
html[data-vai-theme="dark"] .form-control,
html[data-vai-theme="dark"] .single-input .form-control,
html[data-vai-theme="dark"] select,
html[data-vai-theme="dark"] textarea,
html[data-vai-theme="dark"] input[type="text"],
html[data-vai-theme="dark"] input[type="search"],
html[data-vai-theme="dark"] input[type="number"] {
  background: var(--vai-dark-surface) !important;
  background-color: var(--vai-dark-surface) !important;
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] ::placeholder { color: #6f6f6f !important; }

/* select2 (country picker) renders its dropdown at the end of <body>. */
html[data-vai-theme="dark"] .select2-container--default .select2-selection--single,
html[data-vai-theme="dark"] .select2-container--default .select2-selection--multiple,
html[data-vai-theme="dark"] .select2-dropdown,
html[data-vai-theme="dark"] .select2-search__field {
  background-color: var(--vai-dark-surface) !important;
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .select2-results__option { background-color: var(--vai-dark-surface) !important; color: var(--vai-dark-text) !important; }
html[data-vai-theme="dark"] .select2-results__option--highlighted { background-color: #1a1a1a !important; }

/* ── Pagination + empty states ───────────────────────────────────────────── */
html[data-vai-theme="dark"] .page-link,
html[data-vai-theme="dark"] .pagination .page-item .page-link {
  background-color: var(--vai-dark-surface) !important;
  color: var(--vai-dark-text) !important;
  border-color: var(--vai-dark-line) !important;
}
html[data-vai-theme="dark"] .pagination .page-item.active .page-link {
  background-color: #1f1f1f !important;
  color: #ffffff !important;
}

/* Scrollbars inside the frame, so the country list doesn't show a light rail. */
html[data-vai-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-vai-theme="dark"] ::-webkit-scrollbar-track { background: #0a0a0a; }
html[data-vai-theme="dark"] ::-webkit-scrollbar-thumb { background: #2c2c2c; border-radius: 6px; }
html[data-vai-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }
