/*
  ========================================
  Color Shades and Names Dictionary
  ========================================
*/

/* -------------- search results -------------- */
/* search results */
#tab_searchlist {
    width: var(--width-searchb-whole);
    height: auto;
    max-height: 40vh;
    overflow-y: scroll;
    overflow-x: hidden;
    position: absolute;
    top: calc(var(--height-searchb) + 2px);
}
@media all and (min-width: 768px) {
    #tab_searchlist {
        max-height: 50vh;
    }
    @media all and (orientation: portrait) {
        #tab_searchlist {
            max-height: 35vh;
        }
    }
}

#it_my_col_slist {
    width: auto!important;
    height: auto!important;
    display: none;
    border-radius: 0;
    background: white;
}

#it_my_col_slist li a {
    display: block;
    padding: 0.1em var(--padd-stand);
    color: var(--col-text);
    text-decoration: none;
    list-style-type: none;
    border: 1px solid var(--col-body-bg);
}

#it_my_col_slist li a:hover:not(.header) {
    background-color: var(--col-accent1-ll);
}


/* -------------- whole table with cards -------------- */
:root {
    --grid-tab-hue-groups: 100%;
    --grid-tab-hue-groups-rows: repeat(8, 33vh);
}
@media all and (min-width: 768px) {
    :root {
        --grid-tab-hue-groups: repeat(4, 25%);
        --grid-tab-hue-groups-rows: repeat(2, 50%);
    }

    @media all and (orientation: portrait) {
        :root {
            --grid-tab-hue-groups: repeat(2, 50%);
            --grid-tab-hue-groups-rows: repeat(4, 25%);
        }
    }
}

.dict-overview-cont {
    height: var(--height-page);
    display: grid;
    grid-template-columns: var(--grid-tab-hue-groups);
    grid-template-rows: var(--grid-tab-hue-groups-rows);
}

/* colour group container */
.dict-overview-cont > * {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* -------------- cards -------------- */
:root {
    --height-dict-card: 90%;
}
@media all and (min-width: 768px) {
    :root {
        --height-dict-card: 95%;
    }
}

.dict-card {
    height: var(--height-dict-card)!important;
    width: 95%!important;
    overflow: hidden;

    display: flex;
    position: relative;

    background-color: white;
    background-position: center;
    background-repeat: no-repeat;

    -webkit-background-size: contain;
    -moz-background-size: contain;
    -o-background-size: contain;
    background-size: contain;
}

#dict_card_1 {
    background-image: url(/images/red_overview_icon.svg), linear-gradient(#ffcccc, #ffa5a5);
}
#dict_card_2 {
    background-image: url(/images/orange_overview_icon.svg), linear-gradient(#ffe9cc, #ffd8a5);
}
#dict_card_3 {
    background-image: url(/images/yellow_overview_icon.svg), linear-gradient(#ffffcc, #ffffa5);
}
#dict_card_4 {
    background-image: url(/images/green_overview_icon.svg), linear-gradient(#ccffcc, #a5ffa5);
}
#dict_card_5 {
    background-image: url(/images/aqua_overview_icon.svg), linear-gradient(#ccfff2, #a5ffe8);
}
#dict_card_6 {
    background-image: url(/images/blue_overview_icon.svg), linear-gradient(#cce5ff, #a5d1ff);
}
#dict_card_7 {
    background-image: url(/images/purple_overview_icon.svg), linear-gradient(#eeccff, #e1a5ff);
}
#dict_card_8 {
    background-image: url(/images/magenta_overview_icon.svg), linear-gradient(#ffccff, #ffa5ff);
}


/* -------------- cards - titles and names -------------- */
:root {
    /* card titles */
    --text-swatch-opac-before: 1;
    --text-swatch-opac-after: 0;
    --text-swatch-w: 100%;
    --card-title-align: flex-end;
    --text-swatch-lspace: var(--font-size-h5);
    --text-swatch-padding-b: var(--text-swatch-lspace);

    --col-text-card1: red;
    --col-text-card2: darkorange;
    --col-text-card3: rgb(153, 153, 0);
    --col-text-card4: rgb(53, 160, 99);
    --col-text-card5: rgb(0, 196, 130);
    --col-text-card6: rgb(10, 68, 255);
    --col-text-card7: rgb(82, 0, 175);
    --col-text-card8: fuchsia;   
    --col-bg-card1: none;
    --col-bg-card2: none;
    --col-bg-card3: none;
    --col-bg-card4: none;
    --col-bg-card5: none;
    --col-bg-card6: none;
    --col-bg-card7: none;
    --col-bg-card8: none;
}
@media all and (min-width: 768px) {
    :root {
        /* card titles */
        --text-swatch-opac-before: 0;
        --text-swatch-opac-after: 1;
        --card-title-align: center;
        --text-swatch-lspace: auto;

        --col-text-card1: white;
        --col-text-card2: white;
        --col-text-card3: var(--col-text);
        --col-text-card4: white;
        --col-text-card5: var(--col-text);
        --col-text-card6: white;
        --col-text-card7: white;
        --col-text-card8: white;   
        --col-bg-card1: red;
        --col-bg-card2: darkorange;
        --col-bg-card3: gold;
        --col-bg-card4: rgb(53, 160, 99);
        --col-bg-card5: aquamarine;
        --col-bg-card6: rgb(10, 68, 255);
        --col-bg-card7: rgb(82, 0, 175);
        --col-bg-card8: fuchsia;
    }
}

/* colour group name */
.dict-title-card h5 {
    z-index: 3;
    height: 100%;
    width: 100%;
    padding: 0.5em;
    position: absolute;
    display: flex;
    justify-content: flex-end;
    align-items: var(--card-title-align);
    text-align: end;

    border-radius: var(--radius-card);
    color: var(--text-swatch-col);
    background: var(--text-swatch-col-bg);
    opacity: var(--text-swatch-opac-before);
}

.dict-card:hover .dict-title-card h5 {
   opacity: var(--text-swatch-opac-after);

    -webkit-animation: slide-from-left 0.5s;
    -moz-animation: slide-from-left 0.5s;
    -o-animation: slide-from-left 0.5s;
    animation: slide-from-left 0.5s;
}
@-webkit-keyframes slide-from-left {
    0% {-webkit-transform: translateX(-100%)}
    100% {-webkit-transform: translateX(0)}
}
@-moz-keyframes slide-from-left {
    0% {-moz-transform: translateX(-100%)}
    100% {-moz-transform: translateX(0)}
}
@-o-keyframes slide-from-left {
    0% {-o-transform: translateX(-100%)}
    100% {-o-transform: translateX(0)}
}
@keyframes slide-from-left {
    0% {transform: translateX(-100%)}
    100% {transform: translateX(0)}
}

#dict_card_title_1 h5 {
    color: var(--col-text-card1);
    background: var(--col-bg-card1);
}
#dict_card_title_2 h5 {
    color: var(--col-text-card2);
    background: var(--col-bg-card2);
}
#dict_card_title_3 h5 {
    color: var(--col-text-card3);
    background: var(--col-bg-card3);
}
#dict_card_title_4 h5 {
    color: var(--col-text-card4);
    background: var(--col-bg-card4);
}
#dict_card_title_5 h5 {
    color: var(--col-text-card5);
    background: var(--col-bg-card5);
}
#dict_card_title_6 h5 {
    color: var(--col-text-card6);
    background: var(--col-bg-card6);
}
#dict_card_title_7 h5 {
    color: var(--col-text-card7);
    background: var(--col-bg-card7);
}
#dict_card_title_8 h5 {
    color: var(--col-text-card8);
    background: var(--col-bg-card8);
}