/* ============================================================
   Dark mode for the website. Loaded last by Views/Shared/_Layout.cshtml.
   Nothing here applies until <html> has data-theme="dark", which the switch in the header sets
   (wwwroot/js/theme.js) and remembers in the visitor's browser.

   The file has two parts:
     1. Hand-written rules: the colour names (variables), the page itself, and the template's own parts
        (top bar when scrolled, drop-down panels, form fields, the Log In / Register boxes).
     2. "answers to home.css", "answers to profile.css" ...: for each rule in those files that sets a light
        colour, the same selector with the dark colour. When a light rule is changed, change its answer here too.

   The teal banners, the top bar over them and the footer are already dark and look the same in both modes.
   ============================================================ */

/* ---------- 1. The colour names ---------- */
html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="dark"] .rq-section,
html[data-theme="dark"] .rq-hero {
	--rq-brand-dark: #7fd6d0;   /* only ever used for text, so it becomes a light teal */
	--rq-brand-soft: #12393f;
	--rq-ink: #e6f1f2;
	--rq-text: #a7bdc0;
	--rq-line: #213f46;
}

/* ---------- The page ---------- */
html[data-theme="dark"] body { background-color: #0a1c20; color: #a7bdc0; }
html[data-theme="dark"] #wrapper { background-color: #0a1c20; }
/* ":where" gives these no extra weight, so any class that sets its own colour (white on a banner, for example) still wins */
:where(html[data-theme="dark"]) h1, :where(html[data-theme="dark"]) h2, :where(html[data-theme="dark"]) h3,
:where(html[data-theme="dark"]) h4, :where(html[data-theme="dark"]) h5, :where(html[data-theme="dark"]) h6 { color: #e6f1f2; }
:where(html[data-theme="dark"]) p { color: #a7bdc0; }
:where(html[data-theme="dark"]) a { color: #5fcfc8; }
:where(html[data-theme="dark"]) a:hover { color: #7fd6d0; }
html[data-theme="dark"] hr { border-color: #213f46; }
html[data-theme="dark"] .rq-section { background-color: #0e2327; }
html[data-theme="dark"] .rq-section.rq-section-soft { background-color: #0a1c20; }

/* Headings on the teal banners and in the footer stay white */
html[data-theme="dark"] .rq-hero h1, html[data-theme="dark"] .rq-hero h2, html[data-theme="dark"] .rq-hero p,
html[data-theme="dark"] .intro-banner h3, html[data-theme="dark"] #footer h3 { color: #fff; }
html[data-theme="dark"] .rq-hero a.rq-btn-light, html[data-theme="dark"] .rq-section a.rq-btn-light { color: #3a1408; }
html[data-theme="dark"] a.rq-btn-ghost, html[data-theme="dark"] a.rq-btn-primary { color: #fff; }
html[data-theme="dark"] #footer a { color: rgba(255, 255, 255, 0.74); }
html[data-theme="dark"] #footer a:hover { color: #fff; }

/* ---------- The top bar once the page is scrolled (the template's white copy of it) ---------- */
html[data-theme="dark"] #header,
html[data-theme="dark"] #header-container.cloned,
html[data-theme="dark"] #header-container.cloned #header { background-color: #0e2327; box-shadow: 0 0 18px 0 rgba(0, 0, 0, 0.35); }
html[data-theme="dark"] #header-container.transparent-header,
html[data-theme="dark"] #header-container.transparent-header #header { background-color: transparent; box-shadow: none; }
html[data-theme="dark"] #header-container.cloned #logo .rq-logo { color: #fff; }
html[data-theme="dark"] #header-container.cloned #navigation > ul > li > a { color: #c2d4d6; }
html[data-theme="dark"] #header-container.cloned #navigation > ul > li > a.current,
html[data-theme="dark"] #header-container.cloned #navigation > ul > li:hover > a { color: #7fd6d0; background-color: #12393f; }
html[data-theme="dark"] #header-container.cloned .header-notifications-trigger a { color: #c2d4d6; }
html[data-theme="dark"] #header-container.cloned .header-widget { border-color: #213f46; }

/* ---------- Drop-down panels: the menu's, the bell's and the user's ---------- */
html[data-theme="dark"] #navigation ul ul,
html[data-theme="dark"] .header-notifications-dropdown { background-color: #11282d; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45); }
html[data-theme="dark"] .header-notifications-dropdown:before { border-bottom-color: #11282d; }
html[data-theme="dark"] #navigation ul ul li a { color: #a7bdc0; }
html[data-theme="dark"] #navigation ul ul li:hover > a { color: #7fd6d0; }
html[data-theme="dark"] .header-notifications-headline { border-bottom-color: #213f46; }
html[data-theme="dark"] .header-notifications-headline h4 { color: #e6f1f2; }
html[data-theme="dark"] .header-notifications-headline button { color: #a7bdc0; }
html[data-theme="dark"] .header-notifications-headline button:hover { background-color: #163239; color: #7fd6d0; }
html[data-theme="dark"] .header-notifications-content ul li { border-bottom-color: #213f46; }
html[data-theme="dark"] .header-notifications-content ul li a { color: #a7bdc0; }
html[data-theme="dark"] .header-notifications-content ul li a:hover,
html[data-theme="dark"] .header-notifications-content ul li.notifications-not-read { background-color: #163239; }
html[data-theme="dark"] .header-notifications-content .notification-text strong { color: #e6f1f2; }
html[data-theme="dark"] .header-notifications-content .notification-text .color { color: #5fcfc8; }
html[data-theme="dark"] .header-notifications-content .notification-icon { background-color: #163239; color: #a7bdc0; }
html[data-theme="dark"] a.header-notifications-button, html[data-theme="dark"] a.header-notifications-button:hover { color: #fff; }
html[data-theme="dark"] .user-status { border-bottom-color: #213f46; }
html[data-theme="dark"] .user-details .user-name { color: #e6f1f2; }
html[data-theme="dark"] .user-details .user-name span { color: #7f999c; }
html[data-theme="dark"] ul.user-menu-small-nav li a { color: #a7bdc0; }
html[data-theme="dark"] ul.user-menu-small-nav li a:hover { color: #7fd6d0; }
html[data-theme="dark"] .status-switch { background-color: #163239; }
html[data-theme="dark"] .status-switch label { color: #a7bdc0; }

/* ---------- Form fields everywhere ---------- */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .bootstrap-select.btn-group button {
	background-color: #0e2327;
	border-color: #2a4c54;
	color: #e6f1f2;
	box-shadow: none;
}
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6f8a8d; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] textarea:focus, html[data-theme="dark"] select:focus { border-color: #0f7a86; }
html[data-theme="dark"] .input-with-icon-left i { background-color: #163239; border-color: #2a4c54; color: #8fa9ac; }
html[data-theme="dark"] .bootstrap-select .dropdown-menu { background-color: #11282d; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45); }
html[data-theme="dark"] .bootstrap-select .dropdown-menu li a { color: #a7bdc0; }
html[data-theme="dark"] .bootstrap-select .dropdown-menu li:hover a,
html[data-theme="dark"] .bootstrap-select .dropdown-menu li.selected a { background-color: #163239; color: #7fd6d0; }
html[data-theme="dark"] .bootstrap-select .filter-option { color: #e6f1f2; }
/* The banner's own search boxes sit on teal and stay light */
html[data-theme="dark"] .rq-hero input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] .rq-hero select,
html[data-theme="dark"] .intro-banner .bootstrap-select.btn-group button { background-color: #fff; border-color: transparent; color: #0c2d33; }
html[data-theme="dark"] .rq-hero input::placeholder { color: #8ea5a8; }
/* ...and their opened list is the light one, so its dark words can be read */
html[data-theme="dark"] .rq-hero select { color-scheme: light; }
html[data-theme="dark"] .intro-banner .bootstrap-select .filter-option { color: #0c2d33; }

/* ---------- Log In, Register and the password pages (the template's boxes) ---------- */
html[data-theme="dark"] .login-register-page .welcome-text h3 { color: #e6f1f2; }
html[data-theme="dark"] .login-register-page .welcome-text span { color: #a7bdc0; }
html[data-theme="dark"] .account-type label { background-color: #163239; color: #a7bdc0; }
html[data-theme="dark"] .account-type input:checked ~ label { color: #fff; }
html[data-theme="dark"] .notification.error { background-color: rgba(224, 70, 90, 0.18); color: #ff8fa0; }
html[data-theme="dark"] .notification.error p { color: #ff8fa0; }
html[data-theme="dark"] .notification.success { background-color: rgba(43, 185, 138, 0.18); color: #5fe0b0; }
html[data-theme="dark"] .notification.success p { color: #5fe0b0; }
html[data-theme="dark"] a.forgot-password { color: #8fa9ac; }
html[data-theme="dark"] .social-login-separator:before { background-color: #213f46; }
html[data-theme="dark"] .social-login-separator span { background-color: #0a1c20; color: #7f999c; }

/* ---------- The switch itself (also used in light mode, so these two rules are not under data-theme) ---------- */
.rq-theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	transition: background-color 0.2s;
}
.rq-theme-toggle:hover { background: rgba(255, 255, 255, 0.24); }
/* Light mode shows the moon ("go dark"), dark mode shows the sun ("go light") */
.rq-theme-toggle .icon-feather-sun, html[data-theme="dark"] .rq-theme-toggle .icon-feather-moon { display: none; }
html[data-theme="dark"] .rq-theme-toggle .icon-feather-sun { display: inline; }

#header-container .rq-theme-widget { display: flex; align-items: center; border: 0; padding: 0 10px; }
/* On the white copy of the bar (scrolled, light mode) the switch needs a darker look */
#header-container.cloned .rq-theme-toggle { background: #e1f3f2; color: #0b5563; }
html[data-theme="dark"] #header-container.cloned .rq-theme-toggle { background: #163239; color: #e6f1f2; }


/* ---------- answers to home.css ---------- */
html[data-theme="dark"] .rq-btn-outline { border-color: #2c5a60; }
html[data-theme="dark"] .rq-section { background: #11282d; }
html[data-theme="dark"] .rq-section-soft { background: #0a1c20; }
html[data-theme="dark"] .rq-service { background: #11282d; }
html[data-theme="dark"] .rq-service:hover { border-color: #2c5a60; }
html[data-theme="dark"] .rq-steps li { background: #11282d; }
html[data-theme="dark"] .rq-steps li:not(:last-child):after { border-top: 2px dashed #2a4c54; }
html[data-theme="dark"] .rq-path { background: #0a1c20; }
html[data-theme="dark"] .rq-path-icon { background: #11282d; }

/* ---------- answers to header.css ---------- */
html[data-theme="dark"] body #header-container #navigation ul ul { background-color: #11282d; }
html[data-theme="dark"] body #header-container #navigation > ul ul li a,
html[data-theme="dark"] body #header-container #navigation > ul li:hover ul a { color: #c2d4d6; }
html[data-theme="dark"] body #header-container #navigation > ul ul li a:after,
html[data-theme="dark"] body #header-container #navigation > ul li:hover ul li a:after,
html[data-theme="dark"] body #header-container #navigation > ul li:hover ul li:hover > a:after { color: #7f999c !important; }
html[data-theme="dark"] .rq-notice { background: rgba(224, 168, 0, 0.12); }
html[data-theme="dark"] .rq-notice i { color: #f2c94c; }
html[data-theme="dark"] .rq-notice p { color: #f0d98a; }
html[data-theme="dark"] .rq-notice a { color: #5fcfc8; }
html[data-theme="dark"] .rq-notice a:hover { color: #7fd6d0; }
html[data-theme="dark"] .rq-agree { color: #a7bdc0; }
html[data-theme="dark"] .rq-agree a { color: #5fcfc8; }
html[data-theme="dark"] .header-notifications-content ul li.rq-bell-empty { color: #7f999c; }

/* ---------- answers to profile.css ---------- */
html[data-theme="dark"] .rq-avatar { background: #11282d; }
html[data-theme="dark"] .rq-avatar-edit { border-color: #11282d; }
html[data-theme="dark"] .rq-card { background: #11282d; }
html[data-theme="dark"] .rq-empty { color: #7f999c; }
html[data-theme="dark"] .rq-hint { color: #8fa9ac; }
html[data-theme="dark"] .rq-rows small { color: #8fa9ac; }
html[data-theme="dark"] .rq-work-cover { background: #163239; }
html[data-theme="dark"] .rq-work-date { color: #8fa9ac; }
html[data-theme="dark"] .rq-card select.rq-select { border: 1px solid #2a4c54; color: #a7bdc0; }
html[data-theme="dark"] .rq-x { background: #11282d; }
html[data-theme="dark"] .rq-rows .rq-x { background: #0a1c20; }
html[data-theme="dark"] .rq-no-picture { background: #163239; }
html[data-theme="dark"] .rq-stars small { color: #8fa9ac; }
html[data-theme="dark"] .rq-stars.rq-stars-none { color: #7f999c; }
html[data-theme="dark"] .rq-review-top time { color: #8fa9ac; }
html[data-theme="dark"] .rq-review-from { color: #8fa9ac; }
html[data-theme="dark"] .rq-record-good { color: #5fe0b0; }
html[data-theme="dark"] .rq-record-mixed { color: #f2c94c; }
html[data-theme="dark"] .rq-record-bad { color: #ff8fa0; }
html[data-theme="dark"] .rq-answer-1 { background: rgba(43, 185, 138, 0.18); color: #5fe0b0; }
html[data-theme="dark"] .rq-answer-2 { background: rgba(224, 168, 0, 0.18); color: #f2c94c; }
html[data-theme="dark"] .rq-answer-3 { background: rgba(224, 70, 90, 0.18); color: #ff8fa0; }
html[data-theme="dark"] .rq-outcome-choice:hover { border-color: #2c5a60; }
html[data-theme="dark"] .rq-outcome-1:has(input:checked) { background: rgba(43, 185, 138, 0.10); }
html[data-theme="dark"] .rq-outcome-2:has(input:checked) { background: rgba(224, 168, 0, 0.12); }
html[data-theme="dark"] .rq-outcome-3:has(input:checked) { background: rgba(224, 70, 90, 0.12); }

/* ---------- answers to project.css ---------- */
html[data-theme="dark"] .rq-status-1 { background: rgba(43, 185, 138, 0.18); color: #5fe0b0; }
html[data-theme="dark"] .rq-status-2 { background: rgba(224, 168, 0, 0.18); color: #f2c94c; }
html[data-theme="dark"] .rq-status-3 { background: #213f46; color: #b3c7ca; }
html[data-theme="dark"] .rq-facts i { color: #7f999c; }
html[data-theme="dark"] .rq-project-actions .rq-x { background: #0a1c20; }
html[data-theme="dark"] .rq-sub { color: #8fa9ac; }
html[data-theme="dark"] .rq-tags.rq-tags-soft li { background: #14303a; color: #b3c7ca; }
html[data-theme="dark"] .rq-btn-danger { color: #ff8fa0; border-color: rgba(224, 70, 90, 0.45); background: #11282d; }
html[data-theme="dark"] .rq-person > img { background: #163239; }
html[data-theme="dark"] .rq-person small { color: #8fa9ac; }
html[data-theme="dark"] .rq-pages .rq-btn { background: #11282d; }
html[data-theme="dark"] .rq-offer-1 { background: rgba(224, 168, 0, 0.18); color: #f2c94c; }
html[data-theme="dark"] .rq-offer-2 { background: rgba(43, 185, 138, 0.18); color: #5fe0b0; }
html[data-theme="dark"] .rq-offer-3 { background: #213f46; color: #b3c7ca; }
html[data-theme="dark"] .rq-offer.rq-offer-won { background: rgba(43, 185, 138, 0.10); }
html[data-theme="dark"] .rq-good { background: rgba(43, 185, 138, 0.18); color: #5fe0b0; }
html[data-theme="dark"] .rq-notice-row:hover { background: #0a1c20; }
html[data-theme="dark"] .rq-notice-new { background: #133a40; }
html[data-theme="dark"] .rq-notice-icon { background: #17444b; color: #5fcfc8; }
html[data-theme="dark"] .rq-notice-text small { color: #7f999c; }
html[data-theme="dark"] .rq-notice-text .color { color: #5fcfc8; }

/* ---------- answers to chat.css ---------- */
html[data-theme="dark"] .rq-chat { background: #11282d; }
html[data-theme="dark"] .rq-chat-none { color: #7f999c; }
html[data-theme="dark"] .rq-chat-item:hover { background: #0a1c20; }
html[data-theme="dark"] .rq-chat-item img,
html[data-theme="dark"] .rq-chat-who img { background: #163239; }
html[data-theme="dark"] .rq-chat-item-text small { color: #8fa9ac; }
html[data-theme="dark"] .rq-chat-empty { color: #7f999c; }
html[data-theme="dark"] .rq-chat-who small { color: #8fa9ac; }
html[data-theme="dark"] .rq-chat-back { background: #0a1c20; }
html[data-theme="dark"] .rq-chat-messages { background: #0e2327; }
html[data-theme="dark"] .rq-chat-start { color: #7f999c; }
html[data-theme="dark"] .rq-bubble { background: #11282d; }
html[data-theme="dark"] .rq-bubble time { color: #7f999c; }
html[data-theme="dark"] .rq-chat-form textarea { border: 1px solid #2a4c54; }
html[data-theme="dark"] .rq-chat-error { color: #ff8fa0; }

/* ---------- answers to text.css ---------- */
html[data-theme="dark"] .rq-doc-key { background: rgba(224, 168, 0, 0.12); }
html[data-theme="dark"] .rq-doc-key p { color: #f0d98a; }

/* ---------- the online dot's ring matches the dark surface ---------- */
html[data-theme="dark"] .rq-photo-dot-on:after { box-shadow: 0 0 0 2px #11282d; }

/* ---------- "Suggest a new kind of work" box ---------- */
html[data-theme="dark"] .rq-suggest { background: #0e2327; border-color: #2c5a60; }
html[data-theme="dark"] .rq-suggest-title { color: #7fd6d0; }
html[data-theme="dark"] .rq-suggest .rq-suggest-send { background: #11282d; }
html[data-theme="dark"] .rq-suggest-ok { color: #5fe0b0; }
html[data-theme="dark"] .rq-suggest-no { color: #ff8fa0; }
html[data-theme="dark"] .rq-suggest-login { color: #5fcfc8; }

/* ---------- the matching (Beta) ---------- */
html[data-theme="dark"] .rq-beta-note { background: #12393f; color: #7fd6d0; }
html[data-theme="dark"] .rq-match-score { background: #12393f; color: #7fd6d0; }
html[data-theme="dark"] .rq-why { color: #a7bdc0; }
html[data-theme="dark"] .rq-why i { color: #5fcfc8; }
html[data-theme="dark"] .rq-why b { color: #e6f1f2; }
html[data-theme="dark"] .rq-match-answer { color: #8fa9ac; }
html[data-theme="dark"] .rq-match-btn { background: #11282d; border-color: #2a4c54; color: #a7bdc0; }
html[data-theme="dark"] .rq-match-btn:hover { border-color: #5fcfc8; color: #5fcfc8; }
html[data-theme="dark"] .rq-match-btn.rq-match-on { background: #0f7a86; border-color: #0f7a86; color: #fff; }
html[data-theme="dark"] .rq-match-btn[data-good="false"].rq-match-on { background: #4f686c; border-color: #4f686c; }
html[data-theme="dark"] .rq-match-person { border-top-color: #213f46; }
html[data-theme="dark"] .rq-match-name { color: #e6f1f2; }
html[data-theme="dark"] .rq-match-body > small { color: #8fa9ac; }
