/* WebHosting|4U branding overlay for Postal.
 * Added 2026-11-20. Served by nginx at /wh4u-static/wh4u.css and injected
 * into every Postal HTML page by snippets/wh4u-branding.conf.
 *
 * Nothing inside the Postal container is modified. If a future Postal release
 * renames these classes the rules simply stop matching and the stock blue UI
 * returns - Postal keeps working either way. `wh4u-branding-check` reports it.
 *
 * Palette taken from webhosting4u.gr. Postal's own accent is #0e69d5.
 * Editing this file needs no nginx reload.
 */

:root {
  --wh4u-primary: #dc431b;
  --wh4u-primary-dark: #b83715;
  --wh4u-tint: #fff5f3;
  --wh4u-tint-edge: #ffd4c7;
}

/* ---- main application header (every page once logged in) ---- */

/* Postal ships .siteHeader at background #0e69d5. */
.siteHeader { background: var(--wh4u-primary); }

/* The header wordmark is plain text ("Postal"), not an image, so it is
 * replaced with generated content. font-size:0 collapses the original text
 * while the anchor itself stays clickable. */
.siteHeader__logo a { font-size: 0; }
.siteHeader__logo a::after {
  content: "WebHosting|4U";
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Stock tagline: "The open source e-mail platform". A static <p> with no
 * children, so hiding it is safe. */
.siteHeader__version { display: none; }

/* ---- login / password-reset pages (layout "sub", no .siteHeader) ---- */

/* Colour-only changes: safe on all three sub pages because they touch no text. */
.subPageBox { border-top-color: var(--wh4u-primary); }
.subPageBox__title {
  background: var(--wh4u-tint);
  border-bottom-color: var(--wh4u-tint-edge);
  color: var(--wh4u-primary-dark);
}

/* The title text differs per page - "Welcome to Postal", "Reset your
 * password", "Choose a new password" - and all three share both
 * .subPageBox__title and .loginForm, so neither can scope a text swap.
 * form[action="/login"] is unique to the login page (reset posts to
 * /login/reset), so only that title is rewritten and the reset pages keep
 * their own wording. If a browser lacks :has() the selector is dropped and
 * the stock title shows - no breakage either way. */
.subPageBox:has(form[action="/login"]) .subPageBox__title { font-size: 0; }
.subPageBox:has(form[action="/login"]) .subPageBox__title::after {
  content: "Welcome to WebHosting|4U";
  font-size: 16px;
  font-weight: 600;
}

/* To use a real logo image instead of the header wordmark, drop the file in
 * /var/www/wh4u-branding/ and swap the .siteHeader__logo a::after rule for:
 *
 * .siteHeader__logo a::after {
 *   content: "";
 *   display: block; width: 132px; height: 20px;
 *   background: url(/wh4u-static/logo.svg) left center/contain no-repeat;
 * }
 */
