
/* ################# */
/* Global Typography */
/* ################# */

html {
    box-sizing: border-box;
    font-family: 'Calibri';
    font-size: 16px;
    }
*, *::before, *::after {
    box-sizing: inherit;
    }

body {
    color: #000;
    margin: 0;
    background-color: #fbfbfb;
    -webkit-font-smoothing: antialiased;
}

label, p, div, button {
    font-size: 1rem;
}

label {
    cursor: pointer;
    margin-right: 10px;
}


/* ################### */
/* General UI Elements */
/* ################### */

button {
    padding: 10px;
    margin: 2px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #5172FF;
    color: white;
    transition: background-color 0.2s;
}

button:hover { 
    background-color: #3F61F3; 
}

button:disabled {
    cursor: default;
    background-color: lightgrey;
}

button:disabled:hover {
    background-color: lightgrey;
}

a {
    color: #5172FF;
    text-decoration: none;
}

a, a:visited, a:active {
    color: #5172FF;
  }


textarea { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 1rem; 
}





/* ############## */
/* App Containter */
/* ############## */

.app-container { 
    display: flex;
    margin: 0 50px;
  /*  background-color: #FFF;*/
 }

/* ####### */
/* Sidebar */
/* ####### */

.sidebar {
    width: 280px;
    height: 100vh;
    background-color: #f0f0f0;
    flex-shrink: 0;
    transition: width 0.2s ease-out, background-color 0.1s ease-out; 
    overflow: hidden;
    white-space: nowrap; 
    position: fixed;
    z-index: 999;
}

.sidebar:not(.collapsed) {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); 
}

.sidebar.left {
    left: 0;
}

.sidebar.right {
    right: 0;
}

.sidebar-header { 
    display: flex;
    align-items: center;
    height: 50px;
    box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.2); 
}

/*
.sidebar:not(.collapsed) .sidebar-header {
    border-bottom: 1px solid #ddd; 

}*/


.sidebar.right .sidebar-header {
    flex-direction: row-reverse;
}

.logo-img {
    height: 50px;
    width: 50px;
    padding: 4px;
    flex-shrink: 0; 
}

.logo-img img {
    height: 100%;
    width: auto; 
    display: block;
}

#profile-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    line-height: 1;
    font-weight: 600;
    font-size: 1.2rem;
    color: #000;
    margin: 0 10px;
}

.sidebar .title { 
    font-weight: 600;
    font-size: 1.2rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.sidebar-content { 
    padding: 20px;
}

.sidebar.collapsed {
    width: 50px; 
    background-color: transparent;
}

.sidebar.collapsed #logo-text {
    opacity: 0; 
    margin-left: 0; 
    width: 0; 
    pointer-events: none; 
}

.sidebar.collapsed .sidebar-content { 
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden; 
    pointer-events: none; 
    user-select: none;
}

.sidebar ul { 
   list-style: none; 
    padding: 0; 
    margin: 0; 
}
.sidebar .tool-link { 
    display: block; 
    padding: 12px 15px;  
    text-decoration: none; 
    border-radius: 5px; 
    transition: background-color 0.1s ease-out; 
}

.sidebar .tool-link:hover { 

    background-color: #E4E4E4; 
}

.sidebar a.active { 
    background-color: #D8D8D8; 
}



/* ############### */
/* Tool Container  */
/* ############### */

.tool-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 100vh;
}

.tool-header {
    display: flex;
    flex-direction: row;
    position: fixed;
    background-color: #fbfbfb;
    width: 100%;
    height: 50px;
    flex-wrap: nowrap;
    gap: 20px;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.2); 
    z-index: 998;
}
.tool-header .element > *{
    margin: 4px;
}

.tool-body {
    margin-top: 70px;
    flex-grow: 1;
}

.tool-footer {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 50px;
}

.loading-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-size: 1.5em;
}

.loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* #################### */
/* Tool Field Templates */
/* #################### */

.layout-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.row-1-cols > * {
    flex-basis: 100%;
}

.row-2-cols > * {
    flex-basis: calc((100% - 20px) / 2);
}

.row-3-cols > * {
    flex-basis: calc((100% - 40px) / 3);
}

.row-4-cols > * {
    flex-basis: calc((100% - 60px) / 4);
}

@media (max-width: 768px) {
    .layout-row > * {
        flex-basis: 100% !important; 
    }
}

.field {
    background-color: #ffffff;
    padding: 20px;
}

.field.border {
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.field.center {
    justify-content: center;
    display: flex;
}

.field .title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.field .description {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.field .options {
    margin: 10px 0;
}

.field textarea {
    width: 100%;
    height: 10rem;
    box-sizing: border-box;
    margin: 10px 0;
    padding: 5px;
    border: 1px solid #EAEAEA;
    border-radius: 4px;
}

.field textarea:focus {
    outline: none; 
    box-shadow: 0 0 0 1px #AAAAAA;
  }


.field h3 {
    margin-top: 0;
}


input {
    border: 1px solid #ccc;
    padding: 8px 10px;
    cursor: pointer;
    word-wrap: break-word;
}

input:focus {
    border-color: #666;
    outline: none;
}

select {
    appearance: none;
    border: 1px solid #ccc;
    padding: 8px 10px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><path fill="%23333" d="M0 2.5L5 7.5 10 2.5z"/></svg>') no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    cursor: pointer;
    word-wrap: break-word;
}

/**/










/**/




/* #################### */
/* Template: Combo Box  */
/* #################### */

.combo-box-container {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    vertical-align: top;

}

.combo-box {
    appearance: none;
    border: 1px solid #ccc;
    padding: 8px 10px;
    min-width: 200px;
    max-width: 400px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><path fill="%23333" d="M0 2.5L5 7.5 10 2.5z"/></svg>') no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    cursor: pointer;
    word-wrap: break-word;
    background-color: white;
}
.combo-box:focus {
    border-color: #666;
    outline: none;
}

.combo-box-container .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: max-content; 
    border: 1px solid #ccc;
    display: none;
    background-color: white;
    z-index: 999;
    max-height: 300px;
    overflow-y: auto;
    max-width: 400px;
}

.combo-box-container .dropdown .item {
  padding: 5px 5px;
  cursor: pointer;
  line-height:1.5rem;
  white-space: nowrap;
}

.combo-box-container .dropdown .item:hover {
background-color: #ccc;
}

/* ###################### */
/* Template: Progress Bar */
/* ###################### */

#progressBarContainer {
    width: 100%;
    background-color: #ddd;
    position: relative;
    text-align: center;
    color: white;
  }
  
  #progressBarContainer > div {
    width: 0%;
    background-color: #4caf50;
    height: 30px;
    line-height: 30px;
    white-space: nowrap;
    overflow: hidden;
  }





























