$primary-color: #007833;

html {
    overflow-y: auto;
}

.d-grid {
    display: grid;
    gap: 0.8em;
    grid-auto-rows: auto;
}

.v-toolbar {
    box-shadow: none !important;
}

.exit-button {
    .v-btn__content,
    .v-btn__prepend i {
        font-size: 0.875rem !important;
    }
}

.mpl-message, .ui-dialog-titlebar {
    display: none !important;
}

.display-linebreaks {
    white-space: pre-wrap;
}

.nova-pre-content:empty {
    margin-bottom: 12px !important;
}

.nova-data-selector {
    .v-autocomplete .v-field .v-field__input {
        input {
            min-width: 0;
        }
    }

    .v-list-group {
        --prepend-width: 12px !important;
    }

    .v-treeview.v-list {
        --indent-padding: 0px !important;
        overflow-x: auto;

        & > .v-list-group > .v-list-item {
            padding-left: 0 !important;
        }

        .v-list-item__content, .v-list-item-title {
            overflow: visible;
        }

        .v-list-item-title span {
            padding-right: 1em;
        }
    }

    .v-data-table {
        user-select: none;

        .v-data-table-rows-no-data td {
            padding: 0 0.75em;
            text-align: left;
        }

        .v-data-table__td {
            overflow: visible;
            padding-right: 1em;
        }

        .v-table__wrapper {
            min-width: 100%;
            width: fit-content;
        }
    }
}

.nova-mpl * {
    resize: none !important;
}

.nova-readonly {
    .v-select__menu-icon {
        display: none;
    }
}

.v-window {
    display: flex;
    flex: 1 1;
    overflow-x: visible !important;
    overflow-y: visible !important;

    .v-window__container {
        flex: 1 1;

        .v-window-item {
            flex: 1 1;
        }
    }
}

@media only screen and (max-width: 959px) {
    .d-grid {
        /* This forces all grid rows to have the same height. If one doesn't want this to happen, then they should use the box layouts. :) */
        grid-auto-rows: 1fr;
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .d-grid-item {
        grid-column: 1 / 1 !important;
    }
}

/* Global font sizes can't be set through the Vuetify configuration. */
.v-theme--CompactTheme {
    font-size: 0.75rem;

    .v-radio-group {
        border: 1px solid rgba(0, 0, 0, 0.3);
        border-radius: 4px;
        margin: 8px 4px;

        .v-input__control > .v-label {
            background: white;
            color: $primary-color;
            margin-bottom: -12px;
            margin-left: 12px;
            padding: 0 4px;
            transform: translateY(-50%);
            width: fit-content;
        }

        .v-radio {
            --v-selection-control-size: 24px;
        }

        .v-selection-control-group {
            margin-top: 0 !important;
            padding-right: 12px;
        }
    }

    &.v-btn--variant-elevated.bg-primary {
        box-shadow: none !important;
        background-color: transparent !important;
        color: $primary-color !important;
        border: solid 1px lightgrey;
        border-radius: 4px;
    }

    .nova-data-selector {
        .v-list-subheader__text {
            color: black;
            font-weight: 500;
        }

        .v-list-item {
            padding-left: 0;
        }

        .v-list-subheader__text,
        .v-list-item-title {
            font-size: 0.75rem !important;
        }
    }

    .v-data-table {
        th, td {
            vertical-align: middle;
        }

        .v-divider {
            margin: 0;
        }
    }

    .nova-remote-file-input {
        .v-input__append {
            margin-left: 0;
        }

        .v-btn {
            height: 30px;
        }
    }

    .v-tabs--horizontal {
        height: 32px !important;
    }

    .v-tab.v-btn {
        height: 30px !important;
        min-width: fit-content !important;
        padding: 10px !important;
    }

    .v-container {
        padding: 0px !important;
    }

    .v-checkbox .v-selection-control {
        min-height: 0px !important;
    }

    .v-card-title,
    .v-list-item-title,
    .v-toolbar-title {
        font-size: 1rem;
    }

    .v-btn:not(.exit-button) {
        min-width: 0px !important;
        padding: 5px 5px !important;
        box-shadow: none !important;

        .v-btn__content {
            text-transform: none;
        }

        .v-btn__prepend {
            margin-left: 1px;
        }
    }

    .v-label {
        font-size: 0.75rem;
    }

    .v-field__input {
        min-height: 30px;
        padding: 5px;
    }

    textarea.v-field__input {
        mask-image: none !important;
    }

    .v-field {
        margin: 8px 4px 8px 4px;

        &.v-field--appended {
            padding-right: 6px;
        }
    }

    .v-field--active .v-label {
        color: $primary-color;
    }

    .d-grid {
        align-items:center;
    }

    .v-treeview {
        .v-list-item {
            text-align: left;

            .v-list-item__prepend {
                width: 40px;
            }

            .v-btn {
                height: 24px;
                width: 24px;

                .v-icon {
                    font-size: 16px;
                }
            }
        }
    }

    .v-treeview.hide-actions .v-list-item .v-list-item__prepend {
        width: unset;
    }

    .nova-data-selector .icon-btn {
        height: 28px;
    }
}


.v-progress-linear__content { pointer-events: all !important; }
