:root,
a {
    --color-primary: #3d6656;
    --color-primary-hover: #1e5943;
}

@media (prefers-color-scheme: dark) {
    :root,
    a {
        --color-primary: #8fccb5;
    }
}

a[role="button"],
button,
.button {
    --color-primary: #246b50;
}

/*
 * OFFICIAL BRANDING
 */
.full.height:has(.custom-home) {
    display: flex;
    flex-direction: column;
}

.custom-home-wrapper {
    width: 100%;
    height: 100%;
}

.custom-home {
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    align-items: center;

    width: 100%;
    height: 100%;
}

.custom-home > div {
    max-width: 700px;
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.custom-home logo{
    width: 100%;
    max-width: 200px;
    aspect-ratio: 3/2;
}

.custom-home .hero {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: end;
}

.custom-home .hero * {
    margin: 0px;
    text-align: left;
}

.custom-home .hero h2 {
   font-size: 2rem; 
}

.user,
.author {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.official-user::after {
    content: "OFFICIAL";
    background-color: #246b50;
    color: white;
    font-family: var(--fonts-monospace);
    font-weight: bold;

    font-size: 0.5rem;
    flex: 0;
    padding: 3px 6px;
    border-radius: 3px;
    line-height: 1;
    margin-left: 3px;
}

.official-org + div::after {
    content: "OFFICIAL ORGANISATION";
    background-color: #246b50;
    color: white;
    font-family: var(--fonts-monospace);

    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 3px;
}

.project-description img,
.projects img {
    max-width: 200px;
}

.container ul[dir="auto"] li a img {
    max-width: 100% !important;
    width: 200px !important;
}

.organization.profile .avatar {
    width: unset;
    height: 150px;
    aspect-ratio: unset;
}

.organization.profile .container .flex-relaxed-list {
    gap: 0px;
}

#org-info {
    justify-content: end;
}

h1 img {
    width: unset;
    height: 200px;
}

h2 img {
    width: unset;
    height: 120px;
}

h3 img {
    width: unset;
    height: 110px;
}

@media (max-width: 500px) {
    h1 img {
	height: 150px;
    }

    h2 img {
	width: unset;
	height: 120px;
    }

    h3 img {
	width: unset;
	height: 110px;
    }
}

*,
.ui.tabular.menu .active.item,
.ui.tabular.menu .active.item,
.ui.secondary.vertical.menu > .item {
    border-radius: 0px !important;
    border-top-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
    border-bottom-right-radius: 0px !important;
}

h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

h3,
.item {
    font-family: var(--fonts-monospace);
}

/*
 * LINKS
 */
.navbar-left > .item:nth-of-type(2),
.navbar-left > .item:nth-of-type(3),
.navbar-left > .item:nth-of-type(4),
.navbar-left > .item:nth-of-type(5) {
    display: none !important;
}

#navbar .group {
    display: flex;
    align-items: stretch;

    height: 100%;
    min-height: 2.85714286em;

    background: var(--color-box-header);
    border: 1px solid var(--color-secondary) !important;

    font-family: var(--fonts-monospace);
}

#navbar .group span {
    margin: 0px 0.92857143em;
    display: none;
    align-items: center;
}

#navbar .group .item {
    white-space: nowrap;

    padding: 0px;
    min-height: 100%;
    max-height: unset;

    display: flex;
    align-items: center;

    min-width: unset;
    padding: 0px 0.92857143em;
}

/*
 * ISSUE LIST
 */
#issue-list .item-body {
    display: flex;
}

#issue-list .item-body > * {
    order: 4 !important;
}

#issue-list .milestone *,
#issue-list .due-date * {
    font-family: var(--fonts-monospace);
    font-weight: bold;
}

#issue-list .milestone {
    order: 0 !important;
    color: var(--color-purple);
}

#issue-list .item-body> a:nth-of-type(1) {
    order: 1 !important;
}

#issue-list .due-date {
    order: 3 !important;
    color: var(--color-green);
}

#issue-list .flex-item-title {
    flex-direction: column;
    align-items: start;

    gap: 0px;
}

#issue-list .flex-item-body {
    font-size: 0px;
    gap: 0px;
}

#issue-list .flex-item-body > * {
    font-size: 12px;
    margin-right: 15px;
}

#issue-list .flex-item-body > a:nth-of-type(2) {
    display: none;
}

#issue-list .labels-list {
    display: grid;
    justify-content: start;
    grid-template-rows: 1fr;
}

#issue-list .labels-list a {
    grid-row: 1;
}

/*
 * PROJECTS 
 */
#project-board {
    max-height: unset;
}

.project-column {
    min-width: 150px;
    flex: 1;
}

.project-column-title-label {
    overflow: hidden;
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.issue-card:has(.svg.tw-text-red) {
    display: none;
}

/*
 * ISSUE ENTRIES
 */
.issue-card {
    position: relative;
}

.issue-card .meta {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0.5;

    font-size: 20px;
    font-family: var(--fonts-monospace);
}

.issue-card .meta.tw-my-1,
.issue-card relative-time {
    display: none;
}

.issue-card .content .tw-flex {
    flex-direction: column;
    gap: 0px !important;
}

.labels-list {
    margin-left: 0px !important;
    gap: 5px;
}

.label {
    border-radius: 0px;
    font-family: var(--fonts-monospace);
}

/*
 * REPO
 */
i > a > img {
    max-width: 300px !important;
}

/*
 * INVENTORY
 */
.project-column-title-text {
    font-size: 10px;
}

.fullscreen .issue-card {
    padding: 0px 5px;
    padding-top: 5px;
    gap: 0px;
}

.fullscreen .issue-card-icon,
.fullscreen .issue-card-bottom-part {
    display: none;
}

.fullscreen .issue-card-title {
    font-size: 10px;
}

.fullscreen .meta {
    left: 5px;
    font-size: 8px !important;
    line-height: 0px;
}

/*
 * FONTS
 */
@font-face {
    font-family: plex-sans-r;
    src: url("/assets/fonts/IBMPlexSans-Regular.ttf");
}

@font-face {
    font-family: plex-sans-m;
    src: url("/assets/fonts/IBMPlexSans-Medium.ttf");
}

@font-face {
    font-family: plex-mono-r;
    src: url("/assets/fonts/IBMPlexMono-Regular.ttf");
}

:root {
    --fonts-proportional: plex-sans-m !important;
    --fonts-monospace: plex-mono-r !important;
}

/*
 * POPOVERS
 */

.issue-content-right .ui.dropdown > .menu {
    max-width: calc(100vw - 50px) !important;
    width: 300% !important;
    max-height: calc(100vh - 100px) !important;
    right: 0px;
    left: unset;
}

.issue-content-right .ui.dropdown > .visible.menu .scrolling.menu * {
    text-align: right;
}

.issue-content-right .ui.dropdown > .visible.menu .scrolling.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    flex-direction: row-reverse;
}

.issue-content-right .menu .header {
    width: 100%;
}

.issue-content-right .menu .divider {
    margin: 0px !important;
}

.issue-content-right .menu .item {
    width: auto;
    padding: 5px 0px !important;
}

.issue-content-right .menu .item.active {
    width: 100%;
}

.issue-content-right .scrolling.menu {
    max-height: unset !important;
}

/*
 * INVENTORY SEARCH
 */
.issue-card:has([found]) {
    animation: found 2s;
}

@keyframes found {
    0%,
    20%,
    40%,
    60%,
    80% {
	background: var(--color-card-highlight);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
	background: var(--color-card);
    }
}

/*
 * MOBILE
 */
@media (max-width: 610px) {
    #org-info {
	display: none !important;
    }
}

@media (max-width: 850px) {
    #navbar .navbar-left {
	overflow-x: auto;
	flex-direction: row;
	flex-wrap: wrap;
    }

    #navbar .group .item {
	display: none;
    }

    #navbar .group span,
    #navbar .group:hover .item {
	display: flex;
    }

    @media (max-width: 500px) {
	#navbar {
	    padding-bottom: 10px;
	}

	#navbar .navbar-left {
	    overflow-x: auto;
	    flex-direction: row;
	    flex-wrap: wrap;
	}

	#navbar .navbar-mobile-right {
	    margin: 0px;
	}

	#navbar .group {
	    width: 100%;
	    height: auto;
	}

	#navbar .group .item {
	    display: flex;
	}

	#navbar .group span {
	    display: none;
	}
    }
}
