/* colour definitions for secondary metabolite types */

@mixin secmet($fg: black, $bg: white, $highlight: orangered){
    background-color: $bg;
    a, a:link, a:visited {
        color: $fg;
    }
    @at-root rect#{&} {
        fill: $bg;
        stroke: $highlight;
    }
    &.active {
        border-color: $highlight;
        border-width: 2px;
        border-style: solid;
    }
    &:hover {
        background-color: lighten($bg, 9%);
    }
}

.PKS {
    @include secmet(purple, sandybrown, purple);
}

@mixin pigment {
    @include secmet(white, peru);
}

@mixin hydrocarbon {
    @include secmet(white, purple);
}

.RiPP {
    @include secmet(white, royalblue);
}

.other {
    @include secmet(lightsteelblue, midnightblue);
}

@mixin osmolyte {
    @include secmet(firebrick, yellowgreen, firebrick);
}

.arylpolyene {
    @include pigment;
}

.resorcinol {
    @include hydrocarbon;
}

.ladderane {
    @include hydrocarbon;
}

.PUFA {
    @include hydrocarbon;
}

.NRPS {
    @include secmet(white, seagreen);
}

.terpene {
    @include hydrocarbon;
}

@mixin lantibiotic {
    @include secmet(blue, #ffff77, blue);
}

.lanthipeptide-class-i {
    @include lantibiotic;
}

.lanthipeptide-class-ii {
    @include lantibiotic;
}

.lanthipeptide-class-iii {
    @include lantibiotic;
}

.lanthipeptide-class-iv {
    @include lantibiotic;
}

.lanthipeptide-class-v {
    @include lantibiotic;
}

.lipolanthine {
    @include lantibiotic;
}

@mixin thiolated_ripp {
    @include secmet(black, gold, black);
}

.thiopeptide {
    @include thiolated_ripp;
}

.LAP {
    @include thiolated_ripp;
}

.thioamitides {
    @include thiolated_ripp;
}

.blactam {
    @include secmet(black, aliceblue, black);
}

.amglyccycl {
    @include secmet(black, yellowgreen, black);
}

.aminocoumarin {
    @include secmet(black, yellowgreen, black);
}

@mixin metallophore {
    @include secmet(white, crimson, blue);
}

.NI-siderophore {
    @include metallophore;
}

.NRP-metallophore {
    @include metallophore;
}

.methanobactin {
    @include metallophore;
}

.opine-like-metallophore {
    @include metallophore;
}

.aminopolycarboxylic-acid {
    @include metallophore;
}

.ectoine {
    @include osmolyte;
}

.NAGGN {
    @include osmolyte;
}

.butyrolactone {
    @include secmet(white, mediumpurple);
}

.indole {
    @include secmet(black, peachpuff, black);
}

.nucleoside {
    @include secmet(black, antiquewhite, black);
}

.phosphoglycolipid {
    @include secmet(black, yellowgreen, black);
}

.melanin {
    @include pigment;
}

.oligosaccharide {
    @include secmet(black, burlywood, black);
}

.furan {
    @include hydrocarbon;
}

.hserlactone {
    @include secmet(black, tan, black);
}

.acyl_amino_acids {
    @include secmet(black, tan, black);
}

.tropodithietic-acid {
    @include secmet(black, tan, black);
}

.phenazine {
    @include secmet(black, plum, black);
}

.phosphonate {
    @include secmet(black, mediumaquamarine, black);
}

.PBDE {
    @include hydrocarbon;
}

.betalactone {
    @include hydrocarbon;
}

.pyrrolidine {
    @include hydrocarbon;
}

@mixin unknown {
    @include secmet(black, #f2f2f2, black);
}

.unknown {
    @include unknown;
}

.saccharide {
    @include unknown;
}

.fatty_acid {
    @include unknown;
}

.halogenated {
    @include unknown;
}

.hybrid { // needs to remain at the bottom to override all the above
    @include secmet(midnightblue, lightsteelblue, midnightblue);
}
