﻿/* 
 * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
 * See LICENSE in the project root for license information.
 */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    color: white;
    display: flex;
    flex-direction: column;
}

ul {
    margin: 0;
    padding: 0;
}

.ms-welcome__header {
    padding: 20px;
    padding-bottom: 30px;
    padding-top: 100px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    align-items: center;
}

.ms-welcome__main {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-flex: 1 0 0;
    -ms-flex: 1 0 0;
    flex: 1 0 0;
}

.ms-welcome__main > h2 {
    width: 100%;
    text-align: center;
}

.ms-welcome__features {
    list-style-type: none;
    margin-top: 20px;
}

.ms-welcome__features.ms-List .ms-ListItem {
    padding-bottom: 20px;
    display: -webkit-flex;
    display: flex;
}

.ms-welcome__features.ms-List .ms-ListItem > .ms-Icon {
    margin-right: 10px;
}

.ms-welcome__action.ms-Button--hero {
    margin-top: 30px;
}

.ms-Button.ms-Button--hero .ms-Button-label {
    color: #0078d7;
}

.ms-Button.ms-Button--hero:hover .ms-Button-label,
.ms-Button.ms-Button--hero:focus .ms-Button-label {
    color: #005a9e;
    cursor: pointer;
}

b {
    font-weight: bold;
}

.upload-form-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.upload-form {
    flex: 1;
    padding: 4px 20px;
}

.header {
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    padding: 10px;
    text-align: center;
    background-color: white;
    border-bottom: 2px solid gainsboro;
}

.subheader {
    font-weight: 600;
    margin: 4px 0;
    font-size: 14px;
}

.options-container {
    padding: 0 8px;
}

.select-all-container {
    display: flex;
    padding: 4px 0;
    margin-bottom: 4px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(211, 214, 216, 0.45);
}

.option-container {
    display: flex;
    padding: 4px 0;
    align-items: flex-start;
}

.divider {
    display: flex;
    height: 1px;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    background-color: lightgray;
    margin: 12px 0;
}

.file-properties-container{
    margin-top: 8px;
}

.dropdown-container {
    display: flex;
    flex-direction: column;
    flex: 1 0 0;
    padding: 4px 0;
}

.file-property-lable {
    font-weight: 600;
    line-height: 12px;
    font-size: 12px;
}

.file-property-required-mark {
    color: #B10E1C;
}

.placeholder {
    color: gray;
}

/* Tree structure styles */
.folder-tree {
    font-family: Arial, sans-serif;
    color: #333;
}

.tree-node {
    margin: 2px 0;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.tree-node-content {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.tree-node-content:hover {
    background-color: #e6f3ff;
}

.tree-node-content.selected {
    background-color: #0078d4;
    color: white;
}

.tree-toggle {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border: none;
    background: none;
    color: #666;
}

.tree-toggle.collapsed::before {
    content: '\f07b';
    font-family: 'Font Awesome 6 Free', sans-serif;
    font-weight: bold;
    font-size: 16px;
    color: black;
}

.tree-toggle.expanded::before {
    content: '\f07c';
    font-family: 'Font Awesome 6 Free', sans-serif;
    font-size: 16px;
    color: black;
}

.tree-toggle.no-children::before {
    content: '\f07b';
    font-family: 'Font Awesome 6 Free', sans-serif;
    font-size: 16px;
    color: black;
}

.tree-children {
    margin-left: 20px;
    display: none;
}

.tree-children.expanded {
    display: block;
}

.tree-node-label {
    -ms-flex: 1;
    flex: 1;
    padding: 2px 4px;
}

.file-area-dropdown-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1 0 0;
}

.custom-dropdown {
    position: relative;
    width: 100%;
    margin: 4px 0;
}

.custom-dropdown-selected {
    padding: 8px;
    border: 1px solid lightgray;
    border-radius: 4px;
    border-bottom-color: black;
    background-color: white;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    font-size: inherit;
    min-height: 20px;
}

.custom-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-dropdown-options.show {
    display: block;
    z-index: 1001;
}

.dropdown-search-container {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #f9f9f9;
}

.dropdown-search {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    outline: none;
}

.dropdown-search:focus {
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.custom-dropdown-option {
    padding: 8px;
    cursor: pointer;
    color: #333;
    outline: none;
}

.custom-dropdown-option:hover,
.custom-dropdown-option:focus {
    background-color: #f5f5f5;
}

.custom-dropdown-option:last-child {
    border-bottom: none;
}

.no-results-message {
    padding: 12px;
    text-align: center;
    color: #666;
    font-style: italic;
    background-color: #f9f9f9;
    border-top: 1px solid #f0f0f0;
}

.dropdown-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Loading indicator styles */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: #666;
    font-size: 14px;
    gap: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0078d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-buttons-container {
    padding: 24px;
    position: sticky;
    bottom: 0;
    background-color: white;
    z-index: 1000;
    text-align: center;
    border-radius: 0 0 0 4px;
    border-top: 1px solid var(--grey-20-d-3-d-6-d-8, lightgray);
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.40);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.form-bottom-button {
    padding: 10px 20px;
    background-color: white;
    border: 1px solid lightgray;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    font-size: 16px;
}

/* Snackbar/Toast styles */
.snackbar-container {
    position: fixed;
    top: 20px;
    right: 10px;
    left: 10px;
    z-index: 9999;
    max-width: 400px;
}

.snackbar {
    background: #333;
    color: white;
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.snackbar.show {
    transform: translateX(0);
}

.snackbar.success {
    background: #4caf50;
}

.snackbar.error {
    background: #f44336;
}

.snackbar.warning {
    background: #ff9800;
}

.snackbar.info {
    background: #2196f3;
}

.snackbar-message {
    flex: 1;
    margin-right: 10px;
}

.snackbar-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snackbar-close:hover {
    opacity: 0.8;
}
