/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
 * with the License. A copy of the License is located at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
 * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

@use "@cloudscape-design/design-tokens/index.scss" as awsui;

$idea-background-dark: #182836;

.virtual-desktop-placeholder-image {
    width: 100%;
    height: 300px;
    background-color: $idea-background-dark;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;
}

.application-placeholder-image {
    width: 100px;
    height: 40px;
    background-color: #f1f1f1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

.awsui-dark-mode {
    .application-placeholder-image {
        background-color: awsui.$color-background-container-content;
    }
}

.soca-key-value-group-section {
    > .soca-key-value-group:nth-child(odd) {
        border-right: 1px dashed #dddddd;
    }
}

.vdi-scheduler-cluster-timezone {
    box-sizing: border-box;
    padding: 10px 20px;
    border: 1px dotted #dddddd;
    background-color: #f1f1f1;
    margin-bottom: 20px;
}

.idea-list-view-text-filter {
    width: 400px;
}

code.idea-code-block {
    font-family: awsui.$font-family-monospace;
    background-color: awsui.$color-background-container-content;
    color: awsui.$color-text-body-default;
    display: block;
}

.awsui-dark-mode {
    .chonky-chonkyRoot {
        background-color: awsui.$color-background-container-content;
    }

    .chonky-dropdownList,
    .chonky-contextMenuList {
        background-color: awsui.$color-background-container-header;
    }
}

// submit job
.hpc-submit-job {
    .hpc-application-card {
        padding: 4px;
        border: 2px solid awsui.$color-border-control-default;
        border-radius: 8px;
    }

    .job-script {
        background-color: #f1f1f1;
        overflow: auto;
    }

    .job-parameters {
        background-color: #f1f1f1;
        overflow: auto;
    }

    .empty-tab {
        display: flex;
        align-items: center;
        justify-items: center;
        border: 2px solid awsui.$color-border-control-default;
        border-radius: 8px;
        padding: 10px 20px 20px 20px;
        background-color: #f1f1f1;
    }
}

.awsui-dark-mode {
    .hpc-submit-job {
        .job-script,
        .job-parameters,
        .empty-tab {
            background-color: awsui.$color-background-container-content;
        }
    }
}

// form builder component
.idea-form-builder {
    .form-parameters {
        background-color: #f1f1f1;
        overflow: auto;
    }
}

.awsui-dark-mode {
    .idea-form-builder {
        .form-parameters {
            background-color: awsui.$color-background-container-content;
        }
    }
}

// file browser
.soca-file-browser {
    .chonky-chonkyRoot {
        border: none;
        border-radius: 10px;
    }
}

.awsui-dark-mode {
    .uppy-Dashboard-innerWrap {
        background-color: awsui.$color-background-container-content;
    }
}

// log tail
.idea-log-tail-header {
    padding: 10px;
    font-size: small;

    > * {
        margin-right: 10px;
    }

    .title {
        font-weight: bold;
    }

    .file-name {
        padding: 0 4px;
        border-radius: 8px;
        background: $idea-background-dark;
        color: #ffffff;
        border: 1px solid $idea-background-dark;
        line-height: inherit;
    }
}

.idea-log-tail {
    background: #111111;

    .idea-terminal {
        width: 100vw;
        height: calc(100vh - 42px);
    }

    .idea-log-entries {
        font-family: monospace, serif;
        font-size: small;
        padding: 10px;

        p {
            padding: 0;
            margin: 0;

            &.idea-log-loading {
                padding: 10px;
                font-size: smaller;
            }
        }
    }
}
