//
// Modules
// --------------------------------------------------

@if not $prev-modules {
    .container-modules {
        .modules-type {
            font-size: 16px;
            font-weight: bold;
            color: var(--hh-text-color-highlight);
            margin: 70px 0 40px;
        }

        .row.cards {
            margin-top: 40px;
        }

        .card-module {
            .card-panel {
                background: none;
                overflow: hidden;

                > div:not(.card-status) {
                    background-color: var(--hh-background-color-main);
                }
            }

            .card-header {
                position: relative;
                border-bottom: none;
            }

            .card-body {
                padding-top: 8px;
                font-size: 13px;
                color: var(--hh-text-color-secondary);

                > div {
                    padding-bottom: 8px;

                    &:last-child {
                        padding-bottom: 0;
                    }
                }
            }

            .card-title {
                color: var(--hh-text-color-highlight);
            }

            .card-footer {
                padding-bottom: 14px;

                a.btn {
                    float: none;
                }

                &.text-end {
                    a.btn {
                        margin-left: 8px;
                        margin-right: 0;

                        &:first-child {
                            margin-left: 0;
                        }
                    }
                }
            }
        }

        @include media-breakpoint-down(sm) {
            .card {
                width: 100%;
            }
        }
    }

    .container-content-modules {
        width: 100%;
        padding: 0 18px 5px 5px;

        @include media-breakpoint-up(md) {
            padding: 0 12px 5px 0;
        }

        h4 {
            font-size: 16px;
            color: var(--hh-text-color-highlight);
        }

        .card {
            width: 100%;
            padding-right: 3px;

            .card-panel {
                margin-top: 3px;
            }
        }

        @media (min-width: 460px) {
            .card {
                width: 50%;
            }
        }
        @media (min-width: 656px) {
            .card {
                width: 33.33333333%;
            }
        }
        @media (min-width: 1200px) {
            .card {
                width: 25%;
            }
        }

        &.container-content-modules-col-3 {
            @media (min-width: 460px) {
                .card {
                    width: 50%;
                }
            }
            @media (min-width: 656px) {
                .card {
                    width: 33.33333333%;
                }
            }
        }
    }

    .container-create-space-modules.container-cards {
        width: 100%;
        padding: 0;

        .row.cards {
            margin-top: 0;
        }

        .card {
            .card-panel > div {
                background: #F5F5F5;
            }
        }
    }

    // Available Updates container:
    .container-modules.container-fluid {
        .container-module-updates {

            @media (min-width: 500px) {
                .card {
                    width: 33.33333333%;
                }
            }
            @media (min-width: 1000px) {
                .card {
                    width: 25%;
                }
            }
            @media (min-width: 1300px) {
                .card {
                    width: 20%;
                }
            }
            @media (min-width: 1600px) {
                .card {
                    width: 16.66666667%;
                }
            }
            @media (min-width: 1900px) {
                .card {
                    width: 12.5%;
                }
            }
        }
    }

    .container-module-updates {
        background: var(--bs-primary);
        color: var(--hh-primary-contrast);
        margin-top: 30px;
        padding: 16px 10px 2px;
        border-radius: 4px;

        .row.cards {
            margin-right: -1px;
            margin-top: 0;
        }

        .modules-type {
            margin: 10px 0 30px;
            color: var(--hh-primary-contrast); // Overwrite default value
        }

        .card {
            padding-right: 1px;
            background-color: transparent;

            .card-panel {
                margin-top: 0;

                > div:not(.card-status) {
                    background: var(--hh-background-color-main);
                }

                .card-header {
                    padding: 12px;
                }

                .card-body {
                    padding: 4px 12px 20px;

                    .card-title {
                        font-size: 14px;
                    }
                }

                .card-footer {
                    padding: 0 12px 12px;

                    .btn-info {
                        border-radius: 4px;
                        color: var(--bs-primary) !important;

                        &.active {
                            border-color: #FFF;
                        }

                        &:not(.active) {
                            padding: 0 4px;
                            border: 1px solid #FFF;
                            background: var(--bs-primary);
                            color: var(--hh-primary-contrast) !important;

                            &:hover, &:active {
                                background: darken($primary, 10%) !important;
                            }
                        }

                        &[data-update-status=failed] {
                            border-color: #fc314f;
                        }
                    }
                }
            }
        }
    }

    // Module row style in Administration
    .modules-group {
        margin-bottom: 25px;

        > strong {
            display: block;
            margin-bottom: 13px;
        }

        .module-row {
            border-top: 1px solid #ddd;
            margin: 0 0 16px 0;

            > div {
                padding-top: 16px;

                small {
                    color: var(--hh-text-color-soft2);
                }
            }

            .module-actions {
                white-space: nowrap;
                text-align: right;

                .btn:not(:first-child) {
                    margin-left: 14px;
                }
            }
        }
    }

    .modules-updates-info {
        border-radius: 3px;
        border: 1px solid var(--hh-border-color-warning);
        background: var(--hh-background-color-warning);
        color: var(--hh-text-color-warning);
        padding: 14px 20px 14px 25px;
        margin: 20px 10px 10px;
        font-size: 11px;
        line-height: 20px;

        strong {
            font-size: 13px;
        }

        .btn {
            margin-top: 8px;
        }
    }
}
