/* ---------------------------------- */
/* Common Styling ------------------- */
/* ---------------------------------- */
.flex-break {
    flex-basis: 100%;
    height: 0;
}

.flex-wrap {
    flex-flow: wrap;
}

.text-sm {
    font-size: 85%;
}

.text-lg {
    font-size: 125%;
}

.text-xl {
    font-size: 150%;
}

.gx-md>* {
    margin: 0 0.5rem;
}

.gx-xs>* {
    margin-left: -0.5rem;
}

.flex-column {
    flex-direction: column !important;
}

.flex-row {
    flex-direction: row !important;
}

.cursor-pointer {
    cursor: pointer;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

input:not([type=checkbox]):disabled,
input:not([type=checkbox])[disabled="disabled"],
input:not([type=checkbox])[disabled="true"],
textarea:disabled,
textarea[disabled="disabled"],
textarea[disabled="true"],
textarea:read-only {
    background-color: var(--bs-gray-200) !important;
    opacity: 0.87 !important;
}

input:read-only {
    background-color: var(--bs-gray-200) !important;
}

input[type=checkbox]:disabled,
input[type=checkbox][disabled="true"] {
    opacity: 0.5 !important;
}

.text-primary-dashed,
.text-primary-dashed * {
    color: var(--bs-primary) !important;
    text-decoration: underline dotted var(--bs-primary) !important;
    text-underline-offset: 20%;
    cursor: pointer !important;
}

.text-size-2 {
    font-size: 120%;
}

.text-size-3 {
    font-size: 150%;
}

textarea[readonly] {
    background-color: #f0f0f0 !important;
}

.fs-xs {
    font-size: 70%;
    line-height: 70%;
    vertical-align: middle;
}

[dir="rtl"] .dir-ltr {
    direction: ltr;
}

.form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}


/* Specific Styling ----------------- */
#scriptSettingsForm>.row:first-child {
    margin-top: 0.5rem !important;
}

.object-label {
    min-width: 120px;
}

.object-operation {
    min-width: 80px;
}


/* ---------------------------------- */
/* AppComponent Styling ------------- */
/* ---------------------------------- */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header {
    height: 80px;
    background-color: var(--bs-primary);
}

.app-footer {
    height: 50px;
    background-color: var(--bs-primary);
}

.app-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.app-sidebar {
    width: 0;
    overflow: hidden;
    transition: width 0.3s;
    padding-top: 32px;
}

.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 0px 0px 20px 0px;
}

.app-toolbar {
    position: sticky;
    top: 0px;
    z-index: 50;
    padding: 8px 12px 0px 12px;
    background: var(--bs-gray-200);
    color: var(--bs-black);
    border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
}

.app-body-content {
    padding: 12px 12px 0px 12px;
}

.app-sidebar .btn-toggle {
    top: 10px;
    right: 16px;
    left: auto;
}

.app-sidebar.right .btn-toggle {
    left: 4px;
    right: auto;
}

.app-sidebar.right {
    background-color: var(--bs-light);
}

.app-sidebar.left {
    background-color: var(--bs-dark);
}


/* Forms Styling ------------- */
.form-control-width {
    width: 150px;
}

.form-control-width-2 {
    width: 200px;
}

.form-control-width-3 {
    width: 250px;
}

.form-control-width-4 {
    width: 300px;
}


select.form-control,
input.form-control {
    height: 38px;
}

.form-control:disabled {
    opacity: 1 !important;
}

.form-group {
    position: relative;
}

.form-control-error {
    position: absolute;
}



/* Buttons Styling ------------- */
.btn-circle {
    width: 32px;
    height: 32px;
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    line-height: 1.428571429;
    border-radius: 15px;
    overflow: hidden;
}

.btn-toggle {
    position: absolute;
    font-weight: bold;
    z-index: 99;
    font-size: 24px;
    line-height: 24px;
}

.btn:disabled {
    opacity: 0.4 !important;
}

.btn-sm.rounded-circle {
    width: 32px;
    height: 32px;
}


/* Tooltips Styling ------------- */
.tooltip-inner {
    width: 100vw !important;
    text-align: right;
    padding: 12px;
    max-width: min(300px, 90vw) !important;
}

.tooltip-object .tooltip-inner {
    max-width: min(300px, 90vw) !important;
}

.tooltip-objectErrors .tooltip-inner {
    max-width: min(800px, 90vw) !important;
}

.tooltip-mainStateAlertBox .tooltip-inner {
    max-width: min(1024px, 90vw) !important;
}

/* Components Styling -----------*/
.settings-form {
    height: calc(max(100vh - 456px, 220px));
    overflow-y: auto;
    width: 100%;
    overflow-x: hidden;
    /* padding: 0px 1rem 0 0; */
}

.command-line-form {
    height: calc(max(100vh - 556px, 220px));
    overflow-y: auto;
    width: 100%;
    overflow-x: hidden;
    padding: 0px 0 0 1rem;

}

.auto-height-h500 {
    height: calc(max(100vh - 500px, 220px)) !important;
}

.auto-height-h554 {
    height: calc(max(100vh - 554px, 220px)) !important;
}

.auto-height-h557 {
    height: calc(max(100vh - 646px, 220px)) !important;
}

.auto-height-h720 {
    height: calc(max(100vh - 670px, 220px)) !important;
}

.auto-height-h750 {
    height: calc(max(100vh - 750px, 220px)) !important;
}

.auto-height-h790 {
    height: calc(max(100vh - 790px, 220px)) !important;
}


.auto-height-h835 {
    height: calc(max(100vh - 730px, 220px)) !important;
}


/** Object Selector Styling ------------- */
.object-selector-container {
    max-width: 500px;
    position: relative;
    transition: max-width 0.3s;
}

.object-selector-container.collapsed {
    max-width: 0px;
}

.object-selector-container.collapsed .object-selector {
    display: none;
}

.object-selector-container .btn-toggle {
    position: absolute;
    top: -2px;
    left: -14px;
    z-index: 99;
}

/** Object Editor Styling ------------- */
.object-editor-container {
    background: var(--bs-card-bg);
    z-index: 2;
}

/* uiMenu Directive Styling ------------- */
.nav-link.dropdown-toggle:hover+.dropdown-menu,
.nav-link.dropdown-toggle+.dropdown-menu:hover {
    display: block;
}

ui-menu .nav-item {
    padding-left: 1rem;
}

ui-menu nav {
    z-index: 99;
    padding: 12px
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu>.dropdown-menu {
    top: 100%;
    right: 0px;
    margin-top: -6px;
    margin-right: -1px;
    position: absolute;
}

.dropdown-submenu>.dropdown-menu-right {
    right: 100%;
    top: 0px;
}

.dropdown-submenu:not(.disabled):hover>.dropdown-menu {
    display: block;
}

.dropdown-submenu:not(.disabled)>a:after {
    display: block;
    content: " ";
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 5px 5px 0;
    border-right-color: #615e5e;
    top: 50%;
    left: 8px;
    position: absolute;
    transform: translate(0px, -50%);
}

.dropdown-submenu:hover>a:after {
    border-right-color: #fff;
}

.dropdown-submenu.pull-left {
    float: none;
}

.dropdown-submenu.pull-left>.dropdown-menu {
    right: -100%;
    margin-right: 10px;
    border-radius: 6px;
}

.navbar-toggler:not(.collapsed)+nav {
    background-color: var(--bs-primary);
    color: var(--bs-light);
}


/* uiMultiselect Directive Styling ------------- */
.ui-multiselect .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ui-multiselect .dropdown-item input[type="checkbox"] {
    margin-left: 10px;
}


/* uiWizardStep Directive Styling ------------- */
.wizard-steps {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align to the left */
    gap: 1rem;
    /* gap between steps */
    right: 12px;
    top: 12px;
}

.wizard-line {
    position: absolute;
    top: calc(20px + 1rem);
    /* 20px for half of the circle and 1rem for the margin */
    bottom: calc(20px + 1rem);
    right: 20px;
    /* line position adjusted to cross the circle */
    border-right: 2px solid var(--bs-white);
    z-index: 0;
    /* To ensure the line is behind the circles */
}

.wizard-step {
    position: relative;
    z-index: 2;
    /* To ensure the steps are above the line */
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 1rem 0;
}

.wizard-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bs-white);
    color: var(--bs-white);
    background-color: transparent;
    margin-left: 1rem;
    z-index: 3;
    /* Ensure circles are above the line */
    background: var(--bs-dark);
}

.wizard-circle.completed {
    border-color: var(--bs-success);
    background-color: var(--bs-success);
}

.wizard-label {
    color: var(--bs-white);
}

.wizard-circle.active {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary);
}

.wizard-label.completed {
    color: var(--bs-success);
}

.wizard-label.active {
    color: var(--bs-primary);
}


/* Spinner Service Styling ------------- */
.spinner #spinner-message {
    font-size: 1.2rem;
    color: var(--bs-primary);
}

.spinner .modal-content .spinner-border.text-primary {
    width: 42px;
    height: 42px;
    color: var(--bs-primary);
}



/* uiTabs Directive Styling ------------- */
ui-tabs .nav-pills {
    width: 250px;
    max-width: 250px;
}

ui-tabs .nav-link {
    cursor: pointer;
}

ui-tabs .nav-pills .nav-item {
    width: 100%;
}


/* uiAccordion  Directive Styling -------- */
.accordion-button {
    right: 0px;
    text-indent: 28px;
}

.accordion-button:after {
    position: absolute;
    right: 18px;
    flex-shrink: unset;
    margin-right: 0px;
}

/* Icons-combo Styling ------------- */
.fas.with-plus,
.fas.with-minus,
.fa.with-plus,
.fa.with-minus {
    position: relative;
}

.fas.with-plus::after,
.fas.with-minus::after,
.fa.with-plus::after,
.fa.with-minus::after {
    content: '\f067';
    position: absolute;
    left: -5px;
    bottom: -5px;
    font-size: 12px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--bs-success);
}

.fas.with-minus::after,
.fa.with-minus::after {
    content: '\f00d';
    color: var(--bs-danger);
}

/* Object Editor Styling ------------- */
.object-editor-tab-content {
    /* overflow-y: auto;
    overflow-x: hidden; */
    max-height: 640px;
    min-height: 300px;
    margin: 8px;
    width: 0px;
}

/* Scrollbars Styling ------------- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f6f6f6;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

::-webkit-scrollbar-corner {
    background: #f6f6f6;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: #f6f6f6;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

::-webkit-scrollbar-corner {
    background: #f6f6f6;
}

/* uiTable Directive Styling ------------- */
.table-responsive {
    max-height: 200px;
    display: grid;
    overflow-y: auto;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    border: 1px solid #ddd;
}

.table-responsive thead th {
    position: sticky;
    color: var(--bs-white);
    top: 0;
    background-color: var(--bs-primary);
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
}

.table-active {
    background-color: var(--bs-primary) !important;
    color: var(--bs-white) !important;
}

.table-active td {
    color: var(--bs-white) !important;
}

/* uiJsonEditorModal Directive Styling ------------- */
.je-ready .card-title {
    font-size: 20px;
}

.je-ready .table-responsive th {
    font-size: 1rem;
}

#editor_holder>.je-object__container>*:not(.card) {
    display: none !important;
}

#editor_holder [data-schematype="array"]>p,
#editor_holder [data-schematype="object"]>p {
    font-size: 86%;
}

#editor_holder .btn-group>.btn {
    margin-right: 8px;
    border-radius: var(--bs-btn-border-radius) !important;
    flex: 0;
}

#editor_holder label.required:after {
    content: "*";
    margin-left: 4px;
    color: var(--bs-danger);
}


/* uiContentDialog Directive Styling ------------- */
.modal-content.full-width {
    width: calc(100vw - 100px);
    right: 50%;
    transform: translate(50%);
}