/*
 *
 * Collection Overview
 * ================================================
 * Styling for the full size overview
 * on all collections
 *
 * Author: Thomas Jung <thomas@jung.digital>
 *
 */

body.collections {
    .main-column {
        + aside.sidebar {
            display: none;
        }
        .search-form { // The search on intropage
            h3 {
                margin-top: 0;
                font-size: 14px;
                bottom: -11px;
                padding: 0 5px;
                left: 15px;
                text-transform: uppercase;
                color: darken(@lightgrey-color, 39%);
                background: white;
                display: inline-block;
            }
            .tx-dlf-search {
                border: solid @lightgrey-color;
                border-width: 1px 0;
                padding: 20px 0 15px 0;
                form { // The input fields and buttons
                    position: relative;
                    margin: 0;
                    font-family: @font-sans-normal;
                    font-size: 14px;
                    label {
                        width: auto;
                        margin: 0;
                        display: inline-block;
                        float: none;
                        vertical-align: middle;
                    }
                    input {
                        box-sizing: border-box;
                        &[type="text"] {
                            position: relative;
                            width: 100%;
                            font-family: @font-sans-normal;
                            font-size: 14px;
                            background: white;
                            border: 1px solid @secondary-color;
                            line-height: 1.1;
                            padding: 4px 10px;
                            height: 40px;
                            color: @basegrey-color;
                            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
                            margin-bottom: 10px;
                            float: none;
                            border-radius: 0;
                            &:focus {
                                color: @secondary-color;
                            }
                        }
                        &[type="submit"] {
                            position: absolute;
                            top: 1px;
                            right: 1px;
                            width: 38px;
                            height: 38px;
                            .text-hide();
                            background: lighten(@secondary-color-light, 40%) url('@{control-icons}') no-repeat -560px 0;
                            background-size: auto 120px;
                            border-radius: 20px 0 0 20px;
                            z-index: 5;
                            .transition();
                        }
                        &[type="radio"] {
                            position: relative;
                            appearance: none;
                            -webkit-appearance: none;
                            width: 16px;
                            height: 16px;
                            border-radius: 10px;
                            vertical-align: middle;
                            margin: 0 3px 0 0;
                            float: none;
                            background: lighten(@secondary-color, 10%);
                            &:after {
                                position: absolute;
                                top: 5px;
                                left: 5px;
                                width: 6px;
                                height: 6px;
                                border-radius: 4px;
                                background: white;
                                content: " ";
                                opacity: 0;
                            }
                            &:hover {
                                border-color: white;
                            }
                            &:checked {
                                background: @secondary-color;
                                &:after {
                                    opacity: 1;
                                }
                            }
                        }
                    }
                    label {
                        margin-right: 10px;
                        &[for="tx-dlf-search-query"] {
                            display: none;
                        }
                    }
                    #tx-dlf-search-suggest {
                        position: absolute;
                        &:after {
                            position: absolute;
                            top: 0;
                            left: 20px;
                            width: 0;
                            height: 0;
                            border: 10px solid transparent;
                            border-top-width: 0;
                            border-bottom-color: white;
                            content: " ";
                            z-index: 301;
                        }
                        ul {
                            z-index: 300;
                            margin: 10px 0 0 0;
                            padding: 0;
                            background: white;
                            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
                            li {
                                color: @secondary-color;
                                padding: 10px 15px;
                                font-family: @font-sans-bold;
                                border-bottom: 1px solid @lightgrey-color;
                                .no-touchevents & {
                                    .transition(all .15s ease-in);
                                    cursor: pointer;
                                    &:hover {
                                        background: white;
                                        color: @secondary-color;
                                    }
                                }
                            }
                        }
                    }
                    .tx-dlf-search-extended {
                        position: relative;
                        display: block;
                        margin: 0;
                        height: 0;
                        opacity: 0;
                        pointer-events: none;
                        .transition();
                        input[type="text"] {
                            padding-left: 180px;
                        }
                        select {
                            position: absolute;
                            top: 0;
                            display: block;
                            appearance: none;
                            -webkit-appearance: none;
                            height: 40px;
                            width: 100px;
                            background: transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMiA0MCI+PHBhdGggZmlsbD0iIzE2NyIgZD0iTTguNiAxOGwtNC4xIDYuMDRMLjQgMTh6Ii8+PC9zdmc+") no-repeat right center;
                            background-size: auto 40px;
                            border-right: 1px solid;
                            border-color: transparent @secondary-color transparent transparent;
                            border-radius: 0;
                            font-family: @font-sans-bold;
                            z-index: 100;
                            padding: 10px;
                            color: @secondary-color;
                            font-size: 14px;
                            &.tx-dlf-search-operator {
                                left: 0;
                                width: 70px;
                            }
                            &.tx-dlf-search-field {
                                left: 70px;
                            }
                        }
                    }
                    .extended-search-toggle {
                        position: absolute;
                        right: 0;
                        bottom: 0;
                        display: block;
                        cursor: pointer;
                        text-decoration: underline;
                        .transition();
                        span {
                            display: none;
                        }
                    }
                    &.extendend-search-active {
                        padding-bottom: 60px;
                        input[type="submit"] {
                            top: 295px;
                            right: 0;
                            height: 50px;
                            width: 50px;
                            border-radius: 25px;
                            background-position: -555px 5px;
                        }
                        .tx-dlf-search-extended {
                            margin: 15px 0 -5px 0;
                            height: 40px;
                            opacity: 1;
                            pointer-events: all;
                        }
                        .extended-search-toggle {
                            right: 70px;
                            bottom: 5px;
                            span {
                                display: inline;
                            }
                        }
                    }
                }
            }
        }
        .tx-dlf-collection {
            position: relative;
            padding-top: 30px;
            margin-top: 20px;
        }
        .tx-dlf-collection-list { // The listing
            margin: 0 -5px;
            padding: 0;
            .clearfix();
            .tx-dlf-collection-col {
                width: 100%;
                &.col-2, &.col-3 {
                    display: none;
                }
                .tx-dlf-collection-item {
                    position: relative;
                    padding: 15px 0;
                    .tx-dlf-collection-thumbnail {
                        overflow: hidden;
                        border: 1px solid @lightgrey-color;
                        img {
                            border: 2px solid white;
                            min-width: 100%;
                        }
                        min-height: 100px;
                    }
                    .tx-dlf-collection-meta-information {
                        position: absolute;
                        right: 3px;
                        bottom: 18px;
                        left: 3px;
                        background: white;
                        overflow: hidden;
                        padding: 10px;
                        line-height: 1.3;
                        .tx-dlf-collection-counts {
                            font-size: 14px;
                            margin: 0;

                        }
                        h4 {
                            margin: 0 0 4px 0;
                            font-family: @font-sans-bold;
                            font-size: 16px;
                            text-transform: uppercase;
                            a {
                                color: @secondary-color;
                                text-decoration: none;
                            }
                        }
                        > a[href*="rss"] {
                            display: none;
                        }
                    }
                    .no-touchevents & {
                        cursor: pointer;
                        .tx-dlf-collection-thumbnail img,
                        .tx-dlf-collection-meta-information,
                        .tx-dlf-collection-meta-information h4 a {
                            .transition();
                        }
                        .tx-dlf-collection-meta-information {
                            h4 {
                                padding-right: 30px;
                            }
                            > a {
                                position: absolute;
                                top: 50%;
                                right: 10px;
                                width: 30px;
                                height: 30px;
                                margin-top: -15px;
                                display: block;
                                .text-hide();
                                background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCI+PHBhdGggZD0iTTE1IDM4LjFoM2MwLTExIDguOS0xOS41IDIwLjMtMTkuNXYtM2MtMTMtLjEtMjMuMyA5LjgtMjMuMyAyMi41eiIvPjxwYXRoIGQ9Ik0yLjMgMzguMWgzQzUuMyAxOS41IDE5LjggNSAzOC4zIDVWMmMtMjAuMiAwLTM2IDE1LjgtMzYgMzYuMXoiLz48Y2lyY2xlIGN4PSIzMy44IiBjeT0iMzMuNiIgcj0iNC41Ii8+PC9zdmc+") no-repeat center center;
                                background-size: 30px auto;
                                .transition();
                                .transform(translateX(60px));
                                opacity: 0;
                                img {
                                    display: none;
                                }
                            }
                        }
                        &:hover {
                            .tx-dlf-collection-thumbnail img {
                                .transform(scale(1.2));
                                opacity: .8;
                            }
                            .tx-dlf-collection-meta-information {
                                padding-bottom: 20px;
                                h4 a {
                                    color: @primary-color;
                                }
                                > a {
                                    .transform(translateX(0));
                                    opacity: .3;
                                    &:hover {
                                        opacity: 1;
                                        .transform(scale(1.1));
                                    }
                                }
                            }
                        }
                    }
                }
            }
            &.alphabetical {
                position: relative;
                min-height: 2000px;
                margin-top: 30px;
                li {
                    position: relative;
                    width: 100%;
                    border-top: 1px dotted #ccc;
                    padding: 20px 0;
                    display: flex;
                    align-items: center;
                    &.tx-dlf-collection-col {
                        display: none;
                    }
                    &.order-label {
                        border: 0 none;
                        height: 0;
                        padding: 0;
                        z-index: 122;
                        .order-label-value {
                            position: absolute;
                            top: -25px;
                            right: 50%;
                            height: 50px;
                            min-width: 50px;
                            border-radius: 25px;
                            background: fade(#d8e9ed, 70%);
                            border: 1px solid white;
                            color: @secondary-color;
                            padding: 5px 15px;
                            text-align: center;
                            font-size: 30px;
                            font-family: @font-sans-normal;
                            white-space: nowrap;
                            line-height: 1.1;
                            .transform(translateX(50%));
                            -moz-font-feature-settings: "lnum";
                            -webkit-font-feature-settings: "lnum";
                            font-feature-settings: "lnum";
                        }
                        &:hover {
                            &:before {
                                display: none;
                            }
                        }
                    }
                    .tx-dlf-collection-thumbnail {
                        width: 70px;
                        height: 100px;
                        background: white;
                        z-index: 120;
                        img {
                            height: 100%;
                            min-width: 70px;
                            object-fit: cover;
                            border: 1px solid @lightgrey-color;
                        }
                    }
                    .tx-dlf-collection-meta-information {
                        position: relative;
                        bottom: auto;
                        left: auto;
                        right: auto;
                        background: transparent;
                        padding: 0 0 0 20px;
                        overflow: visible;
                        h4 {
                            font-size: 18px;
                            font-weight: normal;
                            margin: 0;
                            a {
                                color: #333;
                                text-decoration: none;
                                &:hover {
                                    text-decoration: none;
                                }
                            }
                        }
                        > a {
                            display: none;
                        }
                        p {
                            height: auto;
                            opacity: 1;
                            font-size: 16px;
                            padding: 5px 0 0 0;
                            margin: 0;
                            color: #333;
                        }
                        > a {
                            right: -25px;
                            top: 0;
                            bottom: auto;
                        }
                    }
                    &:before {
                        position: absolute;
                        top: 5px;
                        right: -5px;
                        bottom: 5px;
                        left: -5px;
                        background: #d8e9ed;
                        content: " ";
                        opacity: 0;
                        pointer-events: none;
                        .transition();
                    }
                    &:hover {
                        .tx-dlf-collection-thumbnail img,
                        &:before {
                            opacity: 1;
                        }
                        .tx-dlf-collection-meta-information {
                            p {
                                border-top-color: transparent;
                            }
                            > a {
                                bottom: auto;
                            }
                        }
                    }
                }
            }
            &.alphabetical-ready {
                li {
                    opacity: 1;
                }
            }
        }
        .tx-dlf-list-toggle-container {
            position: absolute;
            top: 0;
            left: 0;
            display: flex;
            align-items: center;
            cursor: pointer;
            z-index: 130;
            font-family: @font-sans-normal;
            .tx-dlf-list-toggle {
                position: relative;
                width: 35px;
                height: 20px;
                background: white;
                border-radius: 20px;
                border: 1px solid @secondary-color;
                margin: 0 10px;
                .toggle-state {
                    position: absolute;
                    top: 2px;
                    left: 2px;
                    width: 14px;
                    height: 14px;
                    border-radius: 7px;
                    background: @secondary-color;
                    .transition();
                }
            }
            &.alphabetical {
                .tx-dlf-list-toggle {
                    .toggle-state {
                        left: 17px;
                    }
                }
            }
            .label {
                font-size: 14px;
                opacity: .4;
                .transition();
                &.active {
                    opacity: 1;
                    font-family: @font-sans-bold;
                }
            }
        }
        .tx-dlf-collection-list-additionals {
            display: none;
        }
        @media screen and (min-width: @phoneLandscapeViewportWidth) {
            .tx-dlf-collection {
                padding-top: 0;
            }
            .tx-dlf-list-toggle-container {
                right: 0;
                top: -45px;
                left: auto;
            }
            .tx-dlf-collection-list {
                .tx-dlf-collection-col {
                    width: 50%;
                    float: left;
                    &.col-2 {
                        display: block;
                    }
                    &.col-3 {
                        display: none;
                    }
                    .tx-dlf-collection-item {
                        padding: 5px;
                        .tx-dlf-collection-meta-information {
                            right: 8px;
                            bottom: 8px;
                            left: 8px;
                        }
                    }
                }
                &.alphabetical {
                    margin-top: 0;
                }
            }
        }
        @media screen and (min-width: @tabletViewportWidth) {
            .search-form .tx-dlf-search form .tx-dlf-search-extended {
                input[type="text"] {
                    padding-left: 230px;
                }
                select {
                    width: 150px;
                }
            }
        }
        @media screen and (min-width: @tabletLandscapeViewportWidth) {
            padding: 0;
            width: 100%;
            float: none;
            .tx-dlf-statistics {
                font-family: @font-sans-normal;
                strong {
                    font-family: @font-sans-normal;
                    font-size: 26px;
                    white-space: nowrap;
                    color: @primary-color;
                }
            }
            .search-form .tx-dlf-search {
                padding: 30px 10% 30px 0;
                form {
                    input {
                        &[type="text"] {
                            border-color: fade(@secondary-color, 50%);
                        }
                    }
                }
            }
            .tx-dlf-collection-list {
                margin: 20px -15px;
                .tx-dlf-collection-col {
                    width: 33.333333%;
                    float: left;
                    &.col-3 {
                        display: block;
                    }
                    .tx-dlf-collection-item {
                        padding: 15px;
                        .tx-dlf-collection-meta-information {
                            right: 16px;
                            left: 16px;
                            bottom: 16px;
                            padding: 15px 15px 15px 15px;
                            h4 {
                                margin: 0;
                            }
                            .tx-dlf-collection-counts {
                                font-family: @font-sans-normal;
                                font-size: 12px;
                            }
                        }
                    }
                }
            }
        }
        @media screen and (min-width: @desktopViewportWidth) {
            .tx-dlf-statistics {
                padding-right: 20%;
            }
            .search-form .tx-dlf-search {
                padding: 30px 0;
            }
        }
    }
}

// EOF
