:root {
    --white: #fff;
    --black: #393A4F;
    --gray: #D9D9D9;
    --gray-light: #f8f6f6;
    --gray-lighter: #f9f9f9;
    --dark-gray: #5B5E70;

    --primary-color: #0d5364;
    --primary-color-light: #d8ecf8;
    --primary-color-lighter: #e1f0f9;
    --primary-color-dark: #0c4a59;
    --secondary-color: #A1BF0D;
    --secondary-color-dark: #94af10;
    --color-inactive: #9B9FB5;

    --color-success : #159154;
    --color-warning : #E17D26;
    --color-alert : #E12632;

    --green : #b4ca47;
    --light-blue : #a7d2ed;
    --dark-blue : #255262;

    --small-breakpoint: 768px;
    --medium-breakpoint: 1024px;
    --large-breakpoint: 1440px;
}

/* GENERAL */

main .is-9 {
    border-left: none;
}

#hits ol {
    list-style: none;
}

input {
    font-family: Roboto, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.arrow-down {
    position: absolute;
    transform: translateX(-50%);
    left: 50%;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid transparent;
    top: 100%;
    &.is-gray {
        border-top-color: var(--gray-lighter);
    }
}

@media (max-width: 750px) {
    main.container {
        .is-9 {
            width: 100%;
        }
    }

}

/* TAGS */

.tag {
    &.is-green {
        background-color: var(--green);
        color: var(--primary-color)!important;
    }
    &.is-light-blue {
        background-color: var(--light-blue);
        color: var(--primary-color)!important;
    }
    &.is-dark-blue {
        background-color: var(--dark-blue);
        color: var(--white)!important;
    }
    &.is-white {
        color: var(--primary-color)!important;
    }
}
.tag.is-outlined {
    &.is-primary {
        background-color: transparent;
        color: var(--primary-color);    
        border: 1px solid var(--primary-color);    
    }
}
.tag.is-rounded {
    border-radius: 100px!important;
}
.tag.is-bold {
    font-weight: 500;
}
.tag.is-active {
    border-color: var(--primary-color)!important;
}
.tag.is-disabled {
    opacity: 20%!important;
    background-color: var(--dark-gray);
    color: var(--white)!important;
    cursor: not-allowed!important;
    &:hover,
    &:focus {
        opacity: 30%!important;
        border-color: transparent!important;
    }
}

.tag__number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 21px;
    min-width: 21px;
    aspect-ratio: 1 / 1;
    background: var(--gray);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 0.8rem;
    padding-top: 1px;
    margin-right: 10px;
}

/* BUTTON */

.button.is-xsmall {
    padding: 5px 15px;
    border-radius: 10px;
    font-weight: normal;
    &.is-white {
        color: var(--primary-color);
    }
}

/* HEADER */

header {
    margin-top: 0.5rem;
    background-image: linear-gradient(45deg, var(--primary-color-light), var(--primary-color-lighter));
}

header .columns {
    &:first-child .column {
        padding: 1rem 1.25rem;
    }
    &:last-child .column {
        padding: 1rem 1.25rem 2rem;
    }
}
header .columns:first-child .column.is-3 {
    display: none;
    @media (min-width: 768px) {
        display: block;
    }
}

header .column {
    &.is-3 {
        background-color: var(--primary-color-light);
    }
    &.is-9 {
        background-color: var(--primary-color-light);
        @media (min-width: 768px) {
            background-color: var(--primary-color-lighter);
        }
    }
}

header h1 {
    font-size: 1.8rem;
    line-height: 2.2rem;
    padding-top: 1rem;
    @media (min-width: 768px) {
        padding-top: 0;
    }
    @media (min-width: 1024px) {
        font-size: 2rem;
        line-height: 2.4rem;
    }
}

.header__nav {
    > nav {
        color: var(--primary-color);
        font-weight: 500;
    }
}

.header__actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.header__nav ul {
    height: 100%;
    @media (min-width: 768px) {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10 24px;
    }
}
.header__nav ul>li {
    padding: 2px 0;
    &:hover, 
    &:focus {
        cursor: pointer;
        text-decoration: underline;
    }
    &.is-active {
        text-decoration: underline;
    }
    @media (min-width: 768px) {
        padding: 0 15px;
    }
}

.header__description {
    position: relative;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
    p {
        padding: 4px 0;
    }
    .tag {
        max-width: 100%;
        > span:last-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
}
.header__description--default {
    i[class^="fa-"] {
        color: var(--primary-color);
        padding-right: 2px;
    }
}
.header__description--custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.header__tags {
    > #general {
        display: none;
        @media (min-width: 768px) {
            display: flex;
        }
    }
    > div {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        @media (min-width: 768px) {
            padding-top: 2.5rem!important;
        }
        &.is-disabled .tag {
            opacity: 30% !important;
            background-color: var(--dark-gray);
            color: var(--white) !important;
            cursor: not-allowed !important;
        }
    }
    .tag {
        &:hover,
        &:focus {
            cursor: pointer;
            border-color: var(--white);
            opacity: 100%;
        }
    }
}

.has-selectedTags .tag {
    opacity: 30%;
    &.is-selected {
        opacity: 100%;
    }
}

.header__description,
.header__tags {
    .tag {
        font-size: 0.9rem;
        font-weight: 100;
        padding: 0.5rem 1rem;
        border: 2px solid transparent;
    }
    i[class^="fa-"] {
        padding-right: 7px;
    }
}

.collection--edit {
    margin-left: 1rem;
    margin-right: -0.75rem;
    border-left: 1px solid var(--primary-color);
    padding-left: 0.5rem;
    color: var(--primary-color);
}

/* PLAYBOOKS */

#playbooks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    font-size: 0.9rem;
}

.playbook {
    color: var(--dark-gray);
    border: 1px solid var(--primary-color);
    border-radius: 11px;
    padding: 1rem;
    &:hover,
    &:focus {
        color: var(--dark-gray);
        transform: scale(1.02);
    }
}
.playbook__title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* SEARCH SECTION */

.search {
    background-image: linear-gradient(45deg, var(--gray-light), var(--gray-lighter));
}
.search .column {
    &.is-3 {
        background-color: var(--gray-light);
        display: none;
        @media (min-width: 768px) {
            display: block;
        }
    }
    &.is-9 {
        position: relative;
        background-color: var(--gray-light);
        @media (min-width: 768px) {
            background-color: var(--gray-lighter);
        }
    }
}
.search-container {
    margin: 0 0.75rem;
    @media (min-width: 768px) {
        margin: 0 4rem;
    }
}

.search input::placeholder {
    color: var(--primary-color);
    font-weight: 500;
}

/* FILTER SECTION */

#toggleFilterSection {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    @media (min-width: 768px) {
        display: none;
    }
}
#toggleFilterSection .button {
    padding: 5px 10px;
    [class^='fa-'] {
        padding-right: 5px;
    }
}
#filterSection {
    background-color: var(--primary-color-lighter);
    display: none;
    @media (min-width: 768px) {
        background-color: var(--white);
        display: block!important;
    }
}

.activeTags h4 {
    font-weight: 600;
}

.activeTags__header {
    display: flex;
    align-items: center;
    gap: 10px;
}

#removeAllTags {
    color: var(--dark-gray);
    font-size: 0.8rem;
    cursor: pointer;
}

.activeTags__container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0.75rem 0 2rem;
    .tag {
        &:hover,
        &:focus {
            cursor: pointer;
            outline: 1px solid var(--primary-color);
        }
    }
    .tag > i[class^='fa-']:first-child {
        padding-right: 5px;
    }
    .tag > i[class^='fa-']:last-child {
        padding-left: 10px;
    }
}

.accordion {
    padding: 10px 0;
}
.accordion-panel {
    margin-top: 0.75rem;
}
.accordion.is-active {
    .accordion-panel {
        max-height: fit-content;
    }
}
.accordion-header {
    h4 {
        font-weight: 600;
    }
    i {
        padding-left: 4px;
    }
}

/* STATS */

#stats {
    padding-left: 1rem;
    .search-result {
        margin-bottom: 1.5rem;
    }
}

/* RESOURCES--ASSETS */

.asset-document {
    background-image: linear-gradient(to right, #fe747e, #fe6c77, #fe656f, #fe5d68, #fd5460);
}

.asset-canvas {
    background-image: linear-gradient(to right, #ff9d42, #f8943d, #f08b38, #e98233, #e2792e);
}

.asset-ccc {
    background-image: linear-gradient(to right, #d83a7a, #cf3573, #c5306c, #bc2b65, #b2265e);
}

.asset-video {
    background-image: linear-gradient(to right, #20c3fd, #1abdf9, #13b8f4, #0ab2f0, #01adeb);
}

.asset-article {
    background-image: linear-gradient(to right, #3a6cb9, #3666b1, #3261a9, #2e5ba1, #2a5699);
}

.asset-factsheet {
    background-image: linear-gradient(to right, #1a854b, #1b7f49, #1d7947, #1e7445, #1f6e43);
}

.asset-method {
    background-image: linear-gradient(to right, #0f6c83, #0f667b, #0e5f73, #0e596c, #0d5364);
}

.asset-casestudy {
    background-image: linear-gradient(to right, #9f3be5, #9837dc, #9133d3, #8a2fca, #832bc1);
}

/* RESOURCES--CARDS */

#hits {
    margin-bottom: 1rem;
}

.resource {
    display: flex;
    padding: 1rem;
    &:hover,
    &:focus {
        background-color: var(--primary-color-lighter);
    }
    @media (min-width: 750px) {
        gap: 1rem;
    }
}
.resource__cover {
    > div.img-container {
        min-width: 150px;
        height: 100%;
    }
}
.resource__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}
.resource__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.resource__title {
    max-width: 100%!important;
    text-wrap-style: pretty!important;
}
.resource__informations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    @media (min-width: 750px) {
        flex-wrap: nowrap;
    }
    & > *:nth-last-child(2) {
        margin-right: 1rem;
    }
}

.resource__categories {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    gap: 0.5rem 1rem ;
}

.resource__category {
   width: max-content;

    &.is-light-blue i[class^='fa-'] {
        color: var(--light-blue);
    }
    &.is-dark-blue i[class^='fa-'] {
        color: var(--dark-blue);
    }
    &.is-green i[class^='fa-'] {
        color: var(--green);
    }
    i[class^='fa-'] {
        padding-right: 10px;
    }
}

/* QUICK READS */

#containerQuickReads {
    margin-top: 1rem;
    .card-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    div[id^="qr_"] {
        padding: 1rem 0;
        width: auto;
    }
    .file-info {
        padding: 1rem;
        margin-bottom: 0;
    }
}
