/* WDL Footer Solid Background. Author: WDL (https://webdevlimited.bg)

   Replaces the footer's photo background with a solid colour and retunes the
   text, links, rules and the bottom bar around it.

   Palette, and why these values. The site's signature green is #6EA820: it is
   the price colour, the Buy button colour and the most used colour in the
   theme's stylesheets, so the footer stays in that hue family instead of
   introducing a new one. The background is a deep, desaturated version of it.
   The footer logo was measured: its opaque pixels average rgb(179,206,163)
   and 100% of them are light, so it only works on a dark backing. On this
   green it sits at 8.5:1.

   Measured contrast against the background, all well past WCAG AA (4.5 for
   body text, 3.0 for icons):

       headings  #FFFFFF   14.5:1
       links     #FFFFFF   14.5:1
       body text #EAF1E3   12.6:1
       icons     #8FC74A    7.2:1
       logo                 8.5:1
       bottom bar text     12.3:1

   Links are pure white, same as the headings. The two are told apart by
   size and weight instead of colour (18px/600 against 14px/400), which keeps
   the hierarchy without costing the links any legibility. Hover lifts them
   to the accent.

   Retune anything by editing the five values below. The background is the
   only one that affects the others, so if you darken or lighten it, re-check
   the icon colour first since it has the least headroom.

   Delivery note. razsadi.pro has saved theme overrides for common/footer,
   common/header and seven more routes. When a row exists in the theme table
   OpenCart serves the database copy of that template and skips OCMOD for it,
   so an operation against footer.twig or header.twig would be compiled,
   logged as applied, and then discarded at render. PHP controllers are not
   served from that table, so the stylesheet is registered in
   catalog/controller/common/header.php with addStyle(), before that
   controller hands $data['styles'] to the template. */

:root {
	--wdl-footer-bg: #1B2E17;
	--wdl-footer-bg-bottom: #14230F;
	--wdl-footer-heading: #FFFFFF;
	--wdl-footer-link: #FFFFFF;
	--wdl-footer-text: #EAF1E3;
	--wdl-footer-accent: #8FC74A;
	--wdl-footer-rule: rgba(255, 255, 255, .14);
	--wdl-footer-pad-top: 36px;
}

/* The photo and its black overlay were both on background-image, so one
   reset clears the pair. */
.middle-footer {
	background-image: none !important;
	background-color: var(--wdl-footer-bg) !important;
	color: var(--wdl-footer-text);
	padding-top: var(--wdl-footer-pad-top);
}

/* .footer-logo carries background-image: url(image/catalog/logo.png), which
   404s on this store. The logo you actually see is the <img> inside it, so
   this drops a failed request from every page load. */
.middle-footer .footer-logo {
	background-image: none !important;
}

.middle-footer h5,
.middle-footer h5 span {
	color: var(--wdl-footer-heading) !important;
	letter-spacing: .3px;
}

.middle-footer li,
.middle-footer p,
.middle-footer span,
.middle-footer .storeinfo li {
	color: var(--wdl-footer-text);
}

.middle-footer a {
	color: var(--wdl-footer-link);
	transition: color .15s ease;
}

.middle-footer a:hover,
.middle-footer a:focus {
	color: var(--wdl-footer-accent);
}

/* The address and phone icons are inline SVG filled with the brand green,
   which is a touch dark on this backing. The accent lifts them from 5.0:1
   to 7.2:1.
   The Facebook icon is deliberately left alone: the theme styles it inline
   as a green chip with a white glyph, and overriding the glyph colour would
   put light green on that green chip. */
.middle-footer svg {
	fill: var(--wdl-footer-accent);
}

.middle-footer a:hover svg {
	fill: var(--wdl-footer-heading);
}

/* The theme's hairlines were #D8DDD0, meant for a photo. */
.middle-footer .fborder {
	border-color: var(--wdl-footer-rule) !important;
}


/* The copyright strip. Its wrapper holds only floated children and so
   collapsed to zero height, which is why it could never show a background of
   its own; flow-root gives it one. */
.middle-footer > div:not(.container) {
	display: flow-root;
	background-color: var(--wdl-footer-bg-bottom);
	padding: 12px 0;
	margin-top: 6px;
}

.middle-footer > div:not(.container) * {
	color: var(--wdl-footer-text) !important;
}

/* Dead space inside the footer.

   Three blocks were taking vertical room while holding nothing. Together
   they cost 94px on desktop and pushed the first column 111px below the top
   of the footer; it is now a deliberate 36px.

   Each test is written so the block comes back by itself if it ever gets
   content, rather than being hidden outright. */

/* The newsletter slot. Genuinely empty on this store (innerHTML is ""), yet
   it carried 20px of padding top and bottom, a 30px bottom margin and a
   hairline, which read as a blank band with a line under it. :empty stops
   matching the moment a newsletter module is assigned there. */
.middle-footer .news:empty {
	display: none;
}

/* A leftover grid column holding only whitespace. :not(:has(*)) means no
   element children, so it reappears if anything is ever put in it. */
.middle-footer .container > .col-md-3:not(:has(*)) {
	display: none;
}

/* The .copy strip wraps an empty <div class="text-center">, so it is not
   :empty and cannot be tested that way. Its padding and rule are zeroed
   instead of hiding it, which collapses it to nothing while empty but still
   lets it grow if content lands there later. */
.middle-footer .copy {
	padding: 0 !important;
	border-top: 0 !important;
}
