﻿@import url(lib/SPEDIDAM/variables.css);

body {
    margin: 0;
    padding: 0;
}

.page-wrapper {
    min-height: 198.8px;
}

h1 {
    font-family: 'DM Sans';
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 130%;
    letter-spacing: 0;
    margin-bottom: 20px;
}

section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#form {
    width: 100%;
    padding: 1rem;
}

.form-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

div.sped-input.search {
    width: 100%;
}

.form-footer {
    height: max-content;
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
}

.list-filters {
    display: none;
}

.sped-result-item,
.list-filters {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 22px;
    align-items: center;
}

.sped-result-item {
    width: 100%;
    min-height: 250px;
    padding: 1rem;

    &.sped-ayant-droit {
        div {
            height:auto
        }
    }

    div {
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    p {
        font-size: 0.875rem;
        margin: 0;
        padding: 0;
    }

    .title,
    .performer {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .compositor {
        margin-bottom: 2px;
    }

    .last-name > p:not(.label),
    .first-name > p:not(.label),
    .instruments > p:not(.label),
    .aliases > p:not(.label) {
        font-size: 1rem;
    }

    .instruments > p:not(.label),
    .aliases > p:not(.label) {
        font-family: 'DM Sans';
        font-weight: 600;
        line-height: 145%;
    }

    .label {
        color: var(--grey-scale-500);
        margin-bottom: 4px;
        font-size: 0.75rem;
    }

    .sped-button {
        width: max-content;
    }

    .civ,
    .instrument-label,
    .alias-label {
        display: none;
    }
}

.label {
    display: inline-block;
    font-family: 'DM Sans';
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 140%;
    letter-spacing: 0;
    color: var(--grey-scale-600);
    margin: 0;
    margin-bottom: 5px;
}

.results-list,
#resultatsRecherche {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (width >= 1014px) {
    div.sped-input.search {
        width: 304px;
    }

    h1 {
        font-size: 1.5rem;
    }

    section {
        gap: 50px;
    }

    #form {
        padding: 30px;
    }

    .form-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .form-footer {
        flex-direction: row;
        justify-content: space-between;
    }

    .list-filters {
        height: 40px;
        width: 100%;
        display: flex;
        background-color: var(--red-scale-600);
        border-radius: 6px;
        padding: 0 30px;
    }

    .sped-result-item,
    .list-filters {
        display: grid;
        grid-template-columns: 1fr 1fr 0.27fr;
        grid-template-rows: 1fr;
        gap: 60px;
        align-items: center;
    }

    .sped-ayant-droit,
    .sped-ayant-droit-filters {
        display: grid;
        grid-template-columns: 0.41fr 1fr 1fr 0.4fr;
        gap: 0 60px;
    }

    .sped-ayant-droit-filters {
        grid-template-areas: ". name fname .";

        .name {
            grid-area: name;
        }

        .fname {
            grid-area: fname;
        }
    }

    .sped-ayant-droit {
        grid-auto-rows: 1fr;
        grid-template-areas: "civ lname fname button"
                            "instrument-label instruments instruments button";

        &:has(> .alias-label) {
            gap: 10px 60px;
            grid-template-areas: "civ lname fname button"
                                "alias-label aliases aliases button"
                                "instrument-label instruments instruments button";
        }

        .civ {
            grid-area: civ;
        }

        .last-name {
            grid-area: lname;
        }

        .first-name {
            grid-area: fname;
        }

        .sped-button {
            grid-area: button;
        }

        .alias-label {
            grid-area: alias-label;
        }

        .aliases {
            grid-area: aliases;
        }

        .instrument-label {
            grid-area: instrument-label;
        }

        .instruments {
            grid-area: instruments;
        }
    }

    .results-list,
    #resultatsRecherche {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .list-filters button {
        width: max-content;
        appearance: none;
        border: none;
        outline: none;
        background-color: transparent;
        padding: 0;
        font-family: 'DM Sans';
        font-size: 14px;
        font-weight: 500;
        line-height: 145%;
        color: white;
    }

    .list-filters button[class="desc"] img {
        transform: rotate(180deg);
    }

    .sped-result-item {
        width: 100%;
        min-height: 148px;
        padding: 30px;

        p {
            margin: 0;
            padding: 0;
            font-size: 1rem;
        }

        .title,
        .performer {
            margin-bottom: 10px;
            font-size: 1.125rem;
        }

        .compositor {
            margin-bottom: 5px;
        }

        .last-name > p:not(.label),
        .first-name > p:not(.label) {
            font-size: 1.125rem;
        }

        .sped-button {
            justify-self: flex-end;
        }

        .label {
            display: none;
        }

        .civ,
        .instrument-label,
        .alias-label {
            display: inline-block;
        }

        .instruments > p:not(.label),
        .aliases > p:not(.label) {
            font-weight: 400;
        }
    }
}