/*
 * The shared parts of the old theme (header, side bar, FAQ, request form, footer) dressed in the
 * design-system tokens (ds.css). Loaded with the new look (App\Support\Redesign, SITE_REDESIGN).
 *
 * Dark theme: <html data-theme="dark">, applied on pages that are ready for it (<body class="dark-ready">).
 * Colours are never set here directly: ds.css redefines the tokens for the dark theme.
 */

/* ---------- page base in the dark theme ---------- */

html[data-theme="dark"] body.dark-ready {
    background: var(--ds-bg);
    color: var(--ds-muted);
    /* the old theme's own variables, mapped onto the tokens */
    --btc: var(--ds-muted);
    --color-secondary: var(--ds-ink);
    --border-color: var(--ds-line);
    --light-border: var(--ds-line);
    --accordion-section: none;
}
html[data-theme="dark"] body.dark-ready h1,
html[data-theme="dark"] body.dark-ready h2,
html[data-theme="dark"] body.dark-ready h3,
html[data-theme="dark"] body.dark-ready h4,
html[data-theme="dark"] body.dark-ready h5,
html[data-theme="dark"] body.dark-ready h6 { color: var(--ds-ink); }
/* white text on the blue hero reads well in both themes */
html[data-theme="dark"] body.dark-ready .dz-hero h1 { color: #fff; }
html[data-theme="dark"] body.dark-ready .alice__blue { background: var(--ds-bg-soft); }
html[data-theme="dark"] body.dark-ready .dz-card:hover { box-shadow: var(--ds-shadow); }
html[data-theme="dark"] body.dark-ready .dz-btn--light { background: var(--ds-bg-accent); color: var(--ds-link); }
html[data-theme="dark"] body.dark-ready .dz-pill--good,
html[data-theme="dark"] body.dark-ready .sl-features li::before { background: var(--ds-good-soft); color: var(--ds-good); }
html[data-theme="dark"] body.dark-ready .sl-package--highlight { box-shadow: var(--ds-shadow); }

/* ---------- header ---------- */

/* sticky header follows the page surface */
html[data-theme="dark"] body.dark-ready .rts-header.header-sticky {
    background: var(--ds-bg);
    box-shadow: 0 1px 0 var(--ds-line);
}
html[data-theme="dark"] body.dark-ready .rts-header.header-sticky .mm__trigger { color: var(--ds-ink); }
html[data-theme="dark"] body.dark-ready .rts-header.header-sticky .logo-dark { display: none !important; }
html[data-theme="dark"] body.dark-ready .rts-header.header-sticky .logo-white { display: inline-block !important; }

/* design-system pages (new home): a solid header on the page surface instead of a transparent one over a blue hero */
body.ds-page .rts-header {
    position: relative;
    background: var(--ds-bg);
    border-bottom: 1px solid var(--ds-line);
}
body.ds-page .rts-header .rts-ht__bg { background: var(--ds-inv-bg); }
body.ds-page .rts-header .mm__trigger { color: var(--ds-ink); }
body.ds-page .rts-header .logo-white { display: none !important; }
body.ds-page .rts-header .logo-dark { display: inline-block !important; }
body.ds-page .rts-header .menu-btn { color: var(--ds-ink); }
html[data-theme="dark"] body.ds-page.dark-ready .rts-header .logo-dark { display: none !important; }
html[data-theme="dark"] body.ds-page.dark-ready .rts-header .logo-white { display: inline-block !important; }

/* mobile side bar */
html[data-theme="dark"] body.dark-ready .side-bar { background-color: var(--ds-surface); }
html[data-theme="dark"] body.dark-ready .side-bar a,
html[data-theme="dark"] body.dark-ready .side-bar .mainmenu li a { color: var(--ds-ink); }
html[data-theme="dark"] body.dark-ready .mm-mobile__group { color: var(--ds-subtle); }
html[data-theme="dark"] body.dark-ready .mm-mobile__item .mm__icon,
html[data-theme="dark"] body.dark-ready .mm-mobile__item img { background: var(--ds-bg-accent); }

/* ---------- request form ---------- */

html[data-theme="dark"] body.dark-ready .rts-contact-form .form,
html[data-theme="dark"] body.dark-ready .rts-contact-form .form__content {
    background: var(--ds-surface);
    border-color: var(--ds-line);
}
html[data-theme="dark"] body.dark-ready .rts-contact-form .form h3,
html[data-theme="dark"] body.dark-ready .rts-contact-form .form label { color: var(--ds-ink); }
html[data-theme="dark"] body.dark-ready .rts-contact-form .form__content .input-form,
html[data-theme="dark"] body.dark-ready .rts-contact-form .form__content textarea {
    background: transparent;
    color: var(--ds-ink);
    border-color: var(--ds-line);
}

/* ---------- domain search: the zone list ---------- */

html[data-theme="dark"] body.dark-ready .dz-search .nice-select,
html[data-theme="dark"] body.dark-ready .dz-search__select,
html[data-theme="dark"] body.dark-ready .dz-search__field input[type="text"] {
    background-color: var(--ds-surface);
    color: var(--ds-ink);
    border-color: var(--ds-line);
}
html[data-theme="dark"] body.dark-ready .dz-search .nice-select .list { background: var(--ds-surface); border: 1px solid var(--ds-line); }
html[data-theme="dark"] body.dark-ready .dz-search .nice-select .option:hover,
html[data-theme="dark"] body.dark-ready .dz-search .nice-select .option.focus,
html[data-theme="dark"] body.dark-ready .dz-search .nice-select .option.selected.focus { background: var(--ds-bg-accent); }
html[data-theme="dark"] body.dark-ready .dz-search__select option { background: var(--ds-surface); color: var(--ds-ink); }

/* ---------- footer: navy (inverse palette) on every page, both themes ---------- */

.rts-footer,
.rts-footer__copyright-two {
    --ds-ink: var(--ds-inv-ink);
    --ds-muted: var(--ds-inv-muted);
    --ds-line: var(--ds-inv-line);
    /* the theme colours footer titles and text with its own variables */
    --color-secondary: var(--ds-inv-ink);
    --btc: var(--ds-inv-muted);
    background: var(--ds-inv-bg) !important;
    color: var(--ds-inv-muted);
}
.rts-footer { border-top: 0; }
.rts-footer::before,
.rts-footer::after { display: none; }
.rts-footer .rts-footer__widget,
.rts-footer .rts-footer__widget p,
.rts-footer .rts-footer__widget a,
.rts-footer .contact-method a,
.rts-footer__copyright-two .copyright { color: var(--ds-inv-muted); }
.rts-footer .rts-footer__widget a:hover { color: var(--ds-inv-ink); }
.rts-footer .widget-title,
.rts-footer h5.widget-title { color: var(--ds-inv-ink); font-size: 15px; font-weight: 600; }
.rts-footer .separator { background: var(--ds-inv-line); }
.rts-footer__copyright-two { border-top: 1px solid var(--ds-inv-line); }
.rts-footer .newsletter input,
.rts-footer input {
    background: var(--ds-inv-surface);
    color: var(--ds-inv-ink);
    border: 1px solid var(--ds-inv-line);
    box-shadow: none;
}
.rts-footer input::placeholder { color: var(--ds-inv-muted); }
/* the white logo of the header reads on navy */
.footer__logo-dark { display: none; }
.rts-footer .footer__logo-light:has(+ .footer__logo-dark) { display: none; }
.rts-footer .footer__logo-dark { display: inline-block; }

/* ---------- light / dark toggle in the top bar ---------- */

.ht-theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: background .2s;
}
.ht-theme:hover { background: rgba(255, 255, 255, .22); }
.ht-theme:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ht-theme .icon { width: 17px; height: 17px; }
.ht-theme .icon-sun { display: none; }
html[data-theme="dark"] .ht-theme .icon-sun { display: block; }
html[data-theme="dark"] .ht-theme .icon-moon { display: none; }

/* ---------- 13.11.2026 (#44): sentence case and the footer on phones ---------- */
/* the theme capitalizes every word («Умови Та Правила»), which is not how Ukrainian is written */
/* the theme rule is .rts-footer__widget h3.widget-title, so ours needs one more class */
.rts-footer .rts-footer__widget .widget-title, .rts-footer__widget--menu ul li a,
body .social__media .social__media-title, .rts-blog .primary__btn { text-transform: none; }
/* menus two per row on phones; site.purged.css has no .col-6 until it is rebuilt (scripts/build-css.sh) */
@media (max-width: 767px) {
    .rts-footer.footer-style-default { padding-top: 56px; }
    .rts-footer .row > .col-6 { flex: 0 0 auto; width: 50%; }
    .rts-footer .rts-footer__widget--column { margin-bottom: 28px; }
}
/* the same theme capitalize on product pages (scan of 18 pages at 390px, 13.11): buttons, feature titles, section titles.
   !important: the theme rules differ in weight from page to page, and this is only about letter case */
.rts-btn.btn-primary, .buy__plan.btn__two, .cloud-feature .title, .rts-section-title-area .section-title,
.rts-hosting-banner .starting__price { text-transform: none !important; }
/* product page banners: on phones the stock illustration stood under the text and took a whole screen */
@media (max-width: 991px) {
    .rts-hosting-banner .rts-hosting-banner__image { display: none; }
}
/* FAQ accordion (faqProductBlock) in the dark theme: the theme gradient ends in #F4F9FF, so the bottom of every item
   turned white under white text (seen on /domains, 13.11). The same fade, into the dark surface */
html[data-theme="dark"] body.dark-ready,
html[data-theme="dark"] body.dark-ready .rts-hosting-faq {
    --accordion-active: linear-gradient(180deg, rgba(25, 39, 65, 0) 0%, var(--ds-surface-soft) 100%);
    --faq-accordion: linear-gradient(180deg, rgba(25, 39, 65, 0) 0%, var(--ds-surface-soft) 100%);
}

/* ---------- product pages in the dark theme (13.11.2026, #44) ----------
   found by a scan of /hosting, /vps, /dedicated, /cloud-vps, /ssl, /ftp: the theme paints these white (some with
   Bootstrap .bg-white, hence !important), and the headings on them turned light on white */
html[data-theme="dark"] body.dark-ready .trust-row { background: var(--ds-bg-soft) !important; border-color: var(--ds-line); }
html[data-theme="dark"] body.dark-ready :is(.rts-cms-optimization, .rts-hosting-feature, .rts-vps-marketing,
    .rts-dedicated-marketing, .rts-pricing-plan.table-pricing) { background: var(--ds-bg) !important; }
html[data-theme="dark"] body.dark-ready :is(.cloud-feature, .single-plan, .vps-card, .dedicated-card, .feature-card, .card-feature) {
    background: var(--ds-surface) !important; border-color: var(--ds-line) !important; box-shadow: none;
}
html[data-theme="dark"] body.dark-ready .rts-pricing-plan.table-pricing :is(td, th) {
    background: var(--ds-surface) !important; border-color: var(--ds-line) !important; color: var(--ds-muted);
}
/* text the theme colours dark (#2d3c58, #1c273c), found by a contrast scan in the dark theme */
html[data-theme="dark"] body.dark-ready :is(.trust-row li, .feature__list .feature__item, .marketing-list li) { color: var(--ds-muted) !important; }
html[data-theme="dark"] body.dark-ready :is(.rts-vps-marketing, .rts-dedicated-marketing) .title { color: var(--ds-ink); }
html[data-theme="dark"] body.dark-ready .cms-card { background: var(--ds-surface) !important; border-color: var(--ds-line) !important; }
html[data-theme="dark"] body.dark-ready .buy__plan.btn__two { background: var(--ds-bg-accent); color: var(--ds-link); border-color: var(--ds-line-accent); }
/* /vps and /dedicated marketing blocks keep their colours in style="" attributes, hence !important */
html[data-theme="dark"] body.dark-ready :is(.rts-vps-marketing, .rts-dedicated-marketing) :is(.title, .marketing-list li) { color: var(--ds-ink) !important; }
html[data-theme="dark"] body.dark-ready :is(.rts-vps-marketing, .rts-dedicated-marketing) .description { color: var(--ds-muted) !important; }
html[data-theme="dark"] body.dark-ready .card-plan__cartbtn .buy__plan.btn__two { background: var(--ds-bg-accent) !important; color: var(--ds-link) !important; }
/* catalog filters (servers-v4.css): the active segment was primary blue on the dark accent, 2.5:1 */
html[data-theme="dark"] body.dark-ready :is(.sv-seg, .sv-sort) button.is-active { color: var(--ds-link); }
/* Cloud VPS family names keep their colour, a bit lighter on the dark surface (CCX purple was 2.4:1) */
html[data-theme="dark"] body.dark-ready .sv-family b { color: color-mix(in srgb, var(--sv-fam) 65%, #fff); }
/* /ssl «what SSL gives» and the step cards: the theme gradient #d8eaff → #f6f6f6 under white headings */
html[data-theme="dark"] body.dark-ready :is(.single__feature--box, .feature-wrapper .overlay) {
    background: linear-gradient(180deg, var(--ds-surface-soft) 0, var(--ds-surface) 100%) !important;
}
/* one-colour line icons uploaded in the admin (dark grey SVG <img>): lighten them on the dark cards */
html[data-theme="dark"] body.dark-ready :is(.cloud-feature, .single__feature--box) img { filter: brightness(0) invert(1); opacity: .7; }

/* ---------- home and /contact in the dark theme (13.11.2026, #44) ---------- */
/* white buttons on the blue hero and support band stay white with dark text */
html[data-theme="dark"] body.dark-ready .primary__btn.white__bg { color: #13213f !important; }
/* the «ask a question» side of /contact has no panel in the light theme: it stays on the page background */
html[data-theme="dark"] body.dark-ready .contact-form__content { background: transparent !important; }
html[data-theme="dark"] body.dark-ready :is(.rts-hosting-type__single, .rts-service__single, .rts-blog__single,
    .single-contact-method) {
    background: var(--ds-surface) !important; border-color: var(--ds-line) !important; box-shadow: none;
}
html[data-theme="dark"] body.dark-ready :is(.rts-contact-form, .rts-blog.bg-light-1) { background: var(--ds-bg) !important; }
html[data-theme="dark"] body.dark-ready .rts-about-shape { display: none; }
html[data-theme="dark"] body.dark-ready :is(.rts-service__single--title, .rts-blog__single .title, .contact-form__content--title,
    .single-contact-method .info, .single-contact-method .info a, .hh-plan__price) { color: var(--ds-ink) !important; }
html[data-theme="dark"] body.dark-ready :is(.rts-service__single--excerpt, .rts-service__single--btn, .read-more-btn,
    .contact-form__content--description, .contact-phone-off, .hh-specs span, .hh-plan__price small, .hh-hint) { color: var(--ds-muted) !important; }
html[data-theme="dark"] body.dark-ready .hh-specs li { border-bottom-color: var(--ds-line); }
html[data-theme="dark"] body.dark-ready :is(.hh-icon, .hosting-icon) { background: var(--ds-bg-accent); }
html[data-theme="dark"] body.dark-ready .rts-blog__single :is(.cat, .date, .author__content span) { color: var(--ds-muted) !important; }
html[data-theme="dark"] body.dark-ready .rts-blog__single--author { border-top-color: var(--ds-line); }
html[data-theme="dark"] body.dark-ready .rts-about__content--single .image { background: var(--ds-bg-accent) !important; }

/* ---------- other pages in the dark theme (13.11.2026, #44) ---------- */
/* the theme's light section background (/technology «geographically distributed», blog carousel) */
html[data-theme="dark"] body.dark-ready .bg-light-1 { background: var(--ds-bg-soft) !important; }
/* zone price tables (/domain-transfer, /domains): the theme stripes rows with #F6F6F6 */
html[data-theme="dark"] body.dark-ready .rts-pricing-plan table.table .table__content tr { background: var(--ds-surface); }
html[data-theme="dark"] body.dark-ready .rts-pricing-plan table.table .table__content tr:nth-child(2n+1) { background: var(--ds-surface-soft); }
html[data-theme="dark"] body.dark-ready .rts-pricing-plan table.table .table__content :is(td, td *) { color: var(--ds-ink); }
/* /domain-transfer: its own table, rows #F4F9FF */
html[data-theme="dark"] body.dark-ready .transfer-domain .table__content tr { background: var(--ds-surface); }
html[data-theme="dark"] body.dark-ready .transfer-domain .table__content tr:nth-child(2n) { background: var(--ds-surface-soft); }
html[data-theme="dark"] body.dark-ready .transfer-domain .table__content :is(td, td *) { color: var(--ds-ink); }

/* ---------- 14.11.2026 (#44, John: «футер за високий… причесати»): a tighter footer ----------
   It was 609 px on a 1440 screen, half of it padding (120 + 180) and 42 px per link.
   Five columns on a grid from 992 px; on tablets the brand and the newsletter share the first row. */
.rts-footer.footer-style-default { padding-top: 64px; padding-bottom: 48px; }
.rts-footer .rts-footer__widget a.footer__logo { margin-bottom: 20px; }
.rts-footer .rts-footer__widget .widget-title { margin-bottom: 14px; }
.rts-footer .rts-footer__widget--menu ul li:not(:last-child) { margin-bottom: 8px; }
.rts-footer .rts-footer__widget--menu ul li a { font-size: 15px; line-height: 22px; }
.rts-footer .rts-footer__widget.extra-padding { margin-left: 0; }
/* contacts: one small icon style for mail, the support line and the address (the mail had a 34 px blue tile) */
.rts-footer .rts-footer__widget .contact-method { gap: 10px; font-size: 15px; line-height: 22px; }
.rts-footer .rts-footer__widget .contact-method > * { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.rts-footer .rts-footer__widget .contact-method > p { display: block; padding-left: 26px; position: relative; }
.rts-footer .rts-footer__widget .contact-method span:has(> i) {
    width: 16px; height: 22px; margin: 0; background: none; border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    color: var(--ds-inv-ink); font-size: 14px;
}
.rts-footer .rts-footer__widget .contact-method > p > span:has(> i) { position: absolute; left: 0; top: 0; }
.rts-footer .rts-footer__widget .contact-method .address { font-size: 14px; }
/* newsletter on navy: the input in the inverse palette, no glow; the theme gives the form 40 px above and below */
.rts-footer .rts-footer__widget form.newsletter { margin: 0 0 20px; }
.rts-footer .rts-footer__widget form.newsletter input,
.rts-footer .rts-footer__widget form.newsletter input.home-one {
    padding: 12px 52px 12px 46px;
    background: var(--ds-inv-surface);
    border: 1px solid var(--ds-inv-line);
    box-shadow: none;
    color: var(--ds-inv-ink);
}
.rts-footer .rts-footer__widget form.newsletter span.icon { color: var(--ds-inv-muted); left: 18px; }
.rts-footer .footer__news .rts-footer__widget > p { margin-bottom: 14px; }
.rts-footer .social__media .social__media-title { font-size: 15px; margin-bottom: 12px; color: var(--ds-inv-ink); }
.rts-footer .social__media--list .media { border-color: var(--ds-inv-line); color: var(--ds-inv-muted); }
.rts-footer .social__media--list .media:hover { color: var(--ds-inv-ink); }
.rts-footer__copyright-two .rts-footer__copyright-two__wrapper { padding-top: 20px; padding-bottom: 20px; }

@media (min-width: 768px) {
    .rts-footer > .container > .row { display: grid; column-gap: 40px; row-gap: 32px; margin: 0; }
    .rts-footer > .container > .row > .rts-footer__widget--column { width: auto; max-width: none; padding: 0; margin: 0; }
    .rts-footer .rts-footer__widget.w-230 { max-width: none; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .rts-footer > .container > .row { grid-template-columns: repeat(3, 1fr); }
    .rts-footer .footer__brand { grid-column: 1; grid-row: 1; }
    .rts-footer .footer__news { grid-column: 2 / span 2; grid-row: 1; }
}
@media (min-width: 992px) {
    .rts-footer > .container > .row { grid-template-columns: 1.25fr 1fr 1fr 1fr 1.35fr; }
}
@media (max-width: 767px) {
    .rts-footer.footer-style-default { padding-top: 48px; }
    .rts-footer .rts-footer__widget--column { margin-bottom: 24px; }
    /* the third menu would stand alone in its row: full width, its links in the same two columns */
    .rts-footer .row > .footer__links:nth-child(4) { width: 100%; }
    .rts-footer .row > .footer__links:nth-child(4) ul { column-count: 2; column-gap: calc(var(--bs-gutter-x, 1.5rem)); }
    .rts-footer .row > .footer__links:nth-child(4) li { break-inside: avoid; }
}
