/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

html, body, app-root {
    height: 100%;
    width: 100%;
}

body {
    margin: 0;
}

app-root {
    display: flex;
    flex-direction: column;
}

.mat-headline, .mat-title, .mat-subheading-2, .mat-body-1, .mat-body-2, .mat-small {
    margin: 0;
}

.mat-body-2 {
    font: 500 14px / 20px 'Roboto', sans-serif;
}

.mat-button, .mat-icon-button, .mat-stroked-button, .mat-flat-button {
    user-select: auto !important;
}

.card-grid {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    overflow: auto;
}

rects-view .mat-slider-thumb {
    transform: scale(0.5);
}

rects-view .displays-select .mat-form-field-infix {
    border-top: 0;
    padding-top: 4px;
    padding-bottom: 4px;
}

rects-view .displays-select .mat-form-field-flex {
    padding-left: 4px;
}

.mat-select-panel:has(>.select-filter) {
    max-height: 75vh;
    max-width: unset;
}

body.dark-mode button.mat-raised-button.mat-primary,
body.dark-mode button.mat-flat-button.mat-primary {
    color: #ffffff;
}

.context-menu, .context-menu-item-container {
    background-color: var(--background-color);
    border-radius: 4px;
}

.context-menu {
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 1px 2px rgba(0, 0, 0, 0.3);
}

.context-menu-item-container {
    padding: 8px 0px;
}

.context-menu-item {
    cursor: pointer;
    font: 14px 'Roboto', sans-serif;
    min-width: 64px;
    line-height: 36px;
    display: flex;
    align-items: center;
    flex-direction: row;
    padding: 0px 16px;
    flex: 1;
}

.context-menu-item:hover {
    background-color: var(--hover-element-color);
}

.mat-dialog-container {
    border-radius: 20px !important;
}

.mat-tooltip {
    word-break: break-word;
}

.outline-field .mat-form-field-wrapper {
    padding-bottom: 0px;
}

.outline-field .mat-form-field-infix {
    padding: 6px 0 10px 0;
    border-top: 8px solid transparent;
}

.applied-field .mat-form-field-flex {
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
}

.applied-field.highlighted:not(.mat-focused) .mat-form-field-flex {
    border-color: var(--primary);
}

.applied-field.highlighted .mat-form-field-flex {
    background-color: var(--selected-element-color);
}

.applied-field.highlighted:not(.mat-focused) .mat-form-field-underline {
    display: none;
}

.no-padding-field .mat-form-field-wrapper {
    padding-bottom: 0px;
}

.no-padding-field .mat-form-field-infix, .no-border-top-field .mat-form-field-infix  {
    border-top: 0px;
}

.center-field .mat-form-field-flex {
    align-items: center;
}

log-view .headers .mat-form-field-infix {
    width: 100%;
}

.warning-icon {
    color: var(--warning-color);
}
.error-icon {
    color: var(--error-color);
}

.save-field {
    display: flex;
    align-items: center;
    font-size: 14px;
    width: 100%;
}

.save-field mat-form-field {
    width: 100%;
}

.save-field button {
    height: fit-content;
    min-width: fit-content;
    margin-inline-start: 10px;
}

.search-tabs .mat-tab-label {
    min-width: 80px;
}

.search-tabs mat-tab-body {
    padding: 12px;
}

.user-notification {
    color: var(--contrast-text-color);
    background-color: var(--contrast-background-color);
    box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    box-sizing: border-box;
    display: block;
    margin: 24px;
    padding: 14px 16px;
    transform-origin: center;
}

.disabled-component {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(1);
}
