/*
 * Partake's look, loaded after Bootstrap and the skeleton's /assets/clientwms.css (see templates/_theme.html.twig), so a rule
 * here wins over the same selector there. The colors are Bootstrap variables; the primary button sets its own on itself.
 */

/* Partake's colors (the legacy stylesheet's primary and secondary) */
:root {
    --bs-primary: rgb(0, 113, 103); --bs-primary-rgb: 0, 113, 103;
    --bs-link-color: rgb(0, 113, 103); --bs-link-color-rgb: 0, 113, 103;
    --bs-link-hover-color: rgb(0, 90, 82); --bs-link-hover-color-rgb: 0, 90, 82;
    --bs-tertiary-bg: rgb(232, 243, 241); --bs-tertiary-bg-rgb: 232, 243, 241;
    --secondary: rgb(232, 183, 138);
}
.btn-primary {
    --bs-btn-bg: rgb(0, 113, 103); --bs-btn-border-color: rgb(0, 113, 103);
    --bs-btn-hover-bg: rgb(0, 90, 82); --bs-btn-hover-border-color: rgb(0, 90, 82);
    --bs-btn-active-bg: rgb(0, 90, 82); --bs-btn-active-border-color: rgb(0, 90, 82);
    --bs-btn-disabled-bg: rgb(0, 113, 103); --bs-btn-disabled-border-color: rgb(0, 113, 103);
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { border-radius: 50%; background: #fff; }
.topbar { border-bottom: 4px solid var(--secondary); }
.card-header { color: var(--bs-primary); }
.login h1 { color: var(--bs-primary); }

/*
 * Product tile banners. clientwms.css gives both their structure and the text glow (.text-shadow); this is only
 * partake's look. "Single unit" becomes the legacy diagonal ribbon: the box is pinned to the tile's corner and turned
 * 45 degrees about it, and its ::after is the band, moved out along the turned axis so that the band's bottom corners
 * land on the tile's top and left edges:  offset = width / 2 - height - sqrt(2) * inset
 */
.tile { overflow: hidden; } /* clips the ribbon's ends at the tile's edge */

.tile-banner {
    --banner-width: 160px;
    --banner-inset: 0px;
    --banner-padding-x: 0px;
    --banner-padding-y: 0px;
    --banner-offset: calc(var(--banner-width) / 2 - var(--banner-height) - 1.41421356 * var(--banner-inset));
    border-radius: 0;
    background: none;
    transform: translateX(-50%) rotate(-45deg);
    transform-origin: top;
}
.tile-banner::after {
    display: block;
    background: var(--accent);
    transform: translateY(var(--banner-offset));
    transform-origin: center;
}
