/**
 * Public frontend coverage.
 *
 * The frontend follows the chosen palette now, but a set of surfaces were still
 * painted by the vendor theme and only happened to look right in dark mode. In
 * light mode the header went pale while its labels stayed white, the toolbar
 * buttons stayed navy, and the footer's own buttons were dark text on a dark
 * plate.
 *
 * Values come from palettes.css, so one set of rules serves both modes. Load
 * after frontend-dark.css.
 */

/* Header. Home overrides this in its own inline style. */
.nav-container .bar,
.nav-container nav.bar,
#menu2.bar,
.bar.bar-2,
.bar.bar-3 {
    background-color: var(--sp-bg-header, #3d2b4a) !important;
    border-bottom: 1px solid var(--sp-border-color, rgba(255, 255, 255, 0.08));
}

.nav-container .bar a,
.nav-container .bar .menu-horizontal > li > a,
#menu2 .menu-horizontal > li > a,
.bar .menu-horizontal > li > a {
    color: var(--sp-text-header, #ffffff);
}

.nav-container .bar .menu-horizontal > li > a:hover,
#menu2 .menu-horizontal > li > a:hover,
.bar .menu-horizontal > li > a:hover,
.nav-container .bar .menu-horizontal > li > a.active {
    color: var(--sp-text-header, #ffffff);
    opacity: 0.75;
}

.nav-container .bar .dropdown__trigger,
.nav-container .bar .sp-mode-toggle {
    color: var(--sp-text-header, #ffffff);
}

/* =============================================
   BUTTONS ON PUBLIC PAGES

   btn-primary and btn-info were the vendor blue, and the toolbar buttons carried
   a fixed navy that stayed navy on a white page.
   ============================================= */
.btn-primary,
.btn-info,
.btn-success,
.sp-btn-upload,
.sp-btn-accent {
    background-color: var(--sp-accent-primary, var(--fe-accent-primary));
    border-color: var(--sp-accent-primary, var(--fe-accent-primary));
    color: #ffffff;
}

.btn-primary:hover,
.btn-info:hover,
.btn-success:hover,
.btn-primary:focus,
.btn-info:focus,
.btn-success:focus {
    background-color: var(--sp-accent-primary, var(--fe-accent-primary));
    border-color: var(--sp-accent-primary, var(--fe-accent-primary));
    color: #ffffff;
    box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.13);
}

.btn-default {
    background-color: var(--sp-bg-card, var(--fe-bg-card));
    border-color: var(--sp-border-color, var(--fe-border-color));
    color: var(--sp-text-primary, var(--fe-text-primary));
}

.btn-default:hover,
.btn-default:focus {
    background-color: var(--sp-bg-card-hover, var(--fe-bg-elevated));
    border-color: var(--sp-accent-primary, var(--fe-accent-primary));
    color: var(--sp-text-primary, var(--fe-text-primary));
}

/* =============================================
   FOOTER

   The DMCA button was a fixed dark plate, so in light mode it carried dark text
   on a dark background. The social buttons keep their brand colours, which is
   what makes them recognisable, but they were relying on inherited text colour
   and vanished on a light page.
   ============================================= */
.sp-footer-social-btn.dmca {
    background-color: var(--sp-bg-card, var(--fe-bg-card));
    border: 1px solid var(--sp-border-color, var(--fe-border-color));
    color: var(--sp-text-primary, var(--fe-text-primary));
}

.sp-footer-social-btn.dmca:hover {
    background-color: var(--sp-bg-card-hover, var(--fe-bg-elevated));
    border-color: var(--sp-accent-primary, var(--fe-accent-primary));
    color: var(--sp-text-primary, var(--fe-text-primary));
}

.sp-footer-social-btn.facebook,
.sp-footer-social-btn.youtube,
.sp-footer-social-btn.twitter {
    color: #ffffff;
}

.sp-footer-social-btn.facebook { background-color: #3b5998; }
.sp-footer-social-btn.youtube { background-color: #c4302b; }
.sp-footer-social-btn.twitter { background-color: #1d9bf0; }

.sp-footer-social-btn.facebook:hover,
.sp-footer-social-btn.youtube:hover,
.sp-footer-social-btn.twitter:hover {
    color: #ffffff;
    box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.13);
}

.sp-footer-heart {
    color: var(--sp-accent-primary, var(--fe-accent-primary));
}

.sp-footer-links a,
.footer-links a {
    color: var(--sp-text-secondary, var(--fe-text-secondary));
}

/* Each label moves as one label.

   The row wraps between items now that the markup carries whitespace between
   them, and the only wrap opportunities left inside an item are the spaces in
   "upload file", "report file" and "link checker". Without this those three
   split across two lines while their neighbours stay whole, which reads as a
   broken row rather than a wrapped one. */
.sp-footer-links a,
.footer-links a {
    white-space: nowrap;
}

.sp-footer-links a:hover,
.footer-links a:hover {
    color: var(--sp-accent-primary, var(--fe-accent-primary));
}

.sp-footer-sep,
.sp-sep {
    color: var(--sp-text-muted, var(--fe-text-muted));
}

/* =============================================
   FOCUS RINGS

   Same reasoning as the account side: the browser's own ring cannot be themed,
   so it is replaced rather than removed.
   ============================================= */
a:focus,
button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--sp-accent-primary, var(--fe-accent-primary));
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible) {
    box-shadow: none;
}

/* No icon family mapping on this side, and the absence is deliberate.

   The account area loads font-awesome 4, where the family is selected by the `fa`
   class alone and `.fas` has no rule, so templates written against version 5 need
   their class names pointed at the version 4 family. theme-coverage-2.css does that
   for the account side.

   The public side loads a different file. assets/frontend/css/font-awesome.min.css
   is version 5, and version 5 declares `.fas`, `.far` and `.fab` itself, on the
   family "Font Awesome 5 Free". A rule copied here from the account side forced
   those three onto the family named FontAwesome, which version 5 does not ship at
   all, so every glyph resolved to nothing. That is the row of empty boxes beside
   each account benefit and in the comparison table on the signed out premium page,
   and it is why the same page inside the account shell was correct: there the
   mapping is true.

   Removed rather than corrected, because with version 5 loaded there is nothing to
   map. */
