/* Oficjalne znaki Supernova i marek portfolio. */

.sn-wordmark {
    display: inline-flex;
    align-items: center;
    width: 154px;
    min-height: 28px;
    font-size: 0;
    text-decoration: none;
}

.sn-wordmark__image {
    display: block;
    width: 154px;
    height: auto;
}

/*
 * Odoo może zachować w bazie starszy, tekstowy wariant marki w nagłówku.
 * Nagłówek zawsze rysuje jeden oficjalny znak; stopka i ekrany konta nadal
 * korzystają ze zwykłego elementu <img>.
 */
#wrapwrap > header .sn-wordmark {
    background: url('/supernova_theme/static/src/img/logos/supernova-wordmark.png') left center / contain no-repeat;
    color: transparent !important;
    font-size: 0 !important;
}

#wrapwrap > header .sn-wordmark__image,
#wrapwrap > header .sn-wordmark__dot {
    display: none !important;
}

/*
 * Wariant na ciemnym tle jest wylacznie kolorem tekstu (theme.scss). Nie ma
 * tu filtru, bo filtr na elemencie obejmuje cale jego poddrzewo i dziecko nie
 * moze go odwolac: "filter: none" na <img> nic nie dawalo, a
 * grayscale + brightness(0) + invert(1) splaszczalo znak Supernova razem z
 * jego poswiata do jednego jasnego prostokata — dokladnie ta sama pulapka,
 * ktora opisuje komentarz przy stopce nizej.
 *
 * Oficjalny wordmark jest srebrny i czyta sie i na jasnym, i na ciemnym tle,
 * wiec nie wymaga odwracania.
 */

.o_header_mobile .navbar-brand.logo {
    width: 136px;
    height: 28px;
    margin-right: 12px;
    background: url('/supernova_theme/static/src/img/logos/supernova-wordmark.png') left center / contain no-repeat;
}

.o_header_mobile .navbar-brand.logo > span { display: none; }

.sn-footer__brand .sn-wordmark__image { width: 170px; }

/*
 * Stopka rysuje pełny znak Supernova (poświata + plakietka), nie sam wordmark.
 * Grafika ma własną alfę, więc nie wolno na nią nakładać filtru z
 * .sn-wordmark--inverse — zamieniłby kolorowy znak w białą sylwetkę.
 */
.sn-footer__brand .sn-footer__logo {
    display: inline-block;
    width: 152px;
    line-height: 0;
    text-decoration: none;
}

.sn-footer__brand .sn-footer__logo-image {
    display: block;
    width: 100%;
    height: auto;
}

.sn-brand-ledger__identity {
    min-width: 0;
    height: 126px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sn-brand-ledger__identity img {
    display: block;
    width: auto;
    max-width: min(100%, 280px);
    height: auto;
    max-height: 118px;
    object-fit: contain;
    object-position: center;
    transform-origin: center;
    transition: transform var(--duration-base) var(--ease-out), filter var(--duration-base) var(--ease-out);
}

.sn-brand-ledger__identity--hjr img { max-height: 112px; }
.sn-brand-ledger__identity--hand-armor img { max-height: 106px; }
.sn-brand-ledger__identity--imperial img { max-height: 124px; }
.sn-brand-ledger__identity--safety-guardian img { max-height: 118px; }

.sn-brand-ledger__row:hover .sn-brand-ledger__identity img,
.sn-brand-ledger__row:focus-visible .sn-brand-ledger__identity img { transform: none; }

.sn-brand-ledger__row:hover .sn-brand-ledger__identity--mono img,
.sn-brand-ledger__row:focus-visible .sn-brand-ledger__identity--mono img {
    filter: brightness(0) saturate(100%) invert(69%) sepia(92%) saturate(1623%) hue-rotate(5deg) brightness(96%) contrast(101%);
}

@media (max-width: 1199px) {
    .sn-brand-ledger__identity { height: 104px; }
    .sn-brand-ledger__identity img { max-height: 98px; }
    .sn-brand-ledger__identity--hjr img { max-height: 94px; }
    .sn-brand-ledger__identity--hand-armor img { max-height: 90px; }
    .sn-brand-ledger__identity--imperial img { max-height: 102px; }
    .sn-brand-ledger__identity--safety-guardian img { max-height: 98px; }
}

@media (max-width: 767px) {
    .sn-wordmark, .sn-wordmark__image { width: 136px; }
    .sn-footer__brand .sn-footer__logo { width: 132px; }
    .sn-brand-ledger__identity { height: 86px; }
    .sn-brand-ledger__identity img { max-width: min(100%, 210px); max-height: 82px; }
    .sn-brand-ledger__identity--hjr img { max-height: 78px; }
    .sn-brand-ledger__identity--hand-armor img { max-height: 76px; }
    .sn-brand-ledger__identity--imperial img { max-height: 86px; }
    .sn-brand-ledger__identity--safety-guardian img { max-height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
    .sn-brand-ledger__identity img { transition: none; }
}
