/* APP ================================ */

body {
    background-color: transparent;
}

#app {
    --border-radius: .25rem;
    --margin: .5rem;
    --font-monospace: var(--bs-font-monospace);

    display: flex;
    height: 100vh;
    background-color: var(--background-color);
    color: var(--color);
    border-radius: 8px;
}

#body {
    display: flex;
    overflow: auto;
    width: 100%;
    background-color: var(--background-color);
    color: var(--color);
}

.exit-btn svg {
    fill: var(--color);
}

.exit-btn:hover {
    background-color: var(--divider-border-color);
}


/* TABS =============================== */

.inline-tabs {
    display: flex;
    padding-left: 0;
    border-bottom: 1px solid var(--divider-border-color);
    margin-bottom: 0;
    list-style: none;
}

.inline-tabs .tab {
    background-color: transparent;
    color: var(--color);
    font-size: 14px;
    font-weight: bold;
    padding: 8px 16px;
    border-width: 0 0 2px;
    border-bottom-color: transparent;
    margin-bottom: -1px;
    transition: .15s ease-in-out all;
}

.inline-tabs .tab:hover,
.inline-tabs .tab:focus {
    color: var(--color);
    border-bottom: 2px solid var(--color);
}

.inline-tabs .tab.active {
    cursor: default;
    color: var(--tab-active-color);
    border-bottom: 2px solid var(--tab-active-border);
}

/* INPUT ======================= */

.form-control, .input-group-text {
    background-color: var(--input-background) !important;
    color: var(--input-color) !important;
    border-color: var(--input-border);
}

.input-group-sm>.form-control, .input-group-sm>.form-select, .input-group-sm>.input-group-text {
    padding: 0 0.5rem;
    font-size: .875rem;
    height: 23px;
}

.input-group-sm>[type="color"] {
    width: 30px;
    border: 0;
}

.input-description {
    color: #888;
}

.btn-secondary {
    background-color: var(--btn-secondary-background);
    border-color: var(--btn-secondary-border);
    color: var(--btn-secondary-color) !important;
}

.btn-secondary:hover {
    background-color: var(--btn-secondary-hover);
}

.input-divider {
    border-color: var(--input-divider-color);
}


/* TABLE ============================== */

.table-container {
    border: 1px solid var(--table-border);
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.table {
    word-break: break-word;
    cursor: default;
    font-size: .75em;
    color: var(--color);
    border-color: var(--table-header-border);
    background-color: var(--table-background);
}

.table > thead > tr > th {
    background: var(--table-header-background);
    color: var(--color);
    border-bottom: 1px solid var(--table-header-border);
}

.table > tbody > tr > td {
    color: var(--table-body-color) !important;
    background-color: transparent;
    border: none;
}

.table > tbody > tr:not(:last-child) {
    border-bottom: 1px solid var(--table-body-border);
}

/* MAP TABLE ======================= */

.map-table [role="column:options"] {
    width: 24px;
}

.map-table [role="column:label"] {
    width: 140px;
}

.map-table [role="column:session"] {
    width: 110px;
}

.map-table [role="column:persist"] {
    width: 70px;
}

.map-table textarea {
    outline: none;
    width: 100%;
    min-height: 100%;
    background: none;
    color: var(--color);
    border-width: 0;
    padding-left: .5rem;
    padding-right: .5rem;
    border-radius: .1rem;
    margin-bottom: -5px;
}

.map-table textarea:focus {
    background-color: var(--border-color);
}

.map-table textarea.auto-resize {
    overflow: hidden;
    resize: none;
    height: 23px;
}

.map-table input[type="text"] {
    font-size: inherit;
    padding: 2px 10px;
}

.map-table .form-switch {
    padding-left: 70%;
    width: 36px;
    height: 18px;
}

.map-table input[type="checkbox"] {
    width: 36px;
    height: 18px;
    cursor: pointer;
}

.map-table select {
    font-size: 12px !important;
    font-weight: normal !important;
}

/* SETTINGS =========================== */

.exit-btn {
    cursor: pointer !important;
    position: fixed;
    right: 16px; 
    top: 12px;
    padding: 8px;
    line-height: 0;
    border-radius: 4px;
    transition: .1s linear all;
}

.exit-btn:hover {
    background-color: var(--divider-border-color);
}

/* PERMISSIONS ======================== */

#permissionsAccordion small {
    font-size: .8em;
}

.accordion-item {
    background-color: var(--accordion-background);
    border: var(--accordion-border) solid 1px;
}

.accordion-button {
    background-color: var(--accordion-header-background);
    color: var(--color);
}

.accordion-button:not(.collapsed) {
    background-color: var(--accordion-active-header-background);
    color: var(--color);
}

.permission-badge {
    font-size: xx-small;
    background-color: var(--badge-bg-low-key) !important;
    color: var(--badge-text-low-key) !important;
}

/* ABOUT ============================== */

.about pre {
    background-color: #d5d5a414;
    border: 1px dashed #8b8b50;
    padding: 10px;
    border-radius: 8px;
    margin: 0px -36px;
    color: var(--color);
}

/* GENERICS =========================== */

.c-pointer {
    cursor: pointer;
}

.c-grab {
    cursor: grab;
    cursor: -webkit-grab;
}

.c-grab:active {
    cursor: grabbing !important;
    cursor: -webkit-grabbing !important;
}

.svg-icon {
    -webkit-user-drag: none;
}

.svg-icon {
    filter: brightness(.7);
}

.square-24 {
    width: 24px;
    height: 24px;
}

.square-20 {
    width: 20px;
    height: 20px;
}

.square-16 {
    width: 16px;
    height: 16px;
}

.smallest {
    font-size: .75em;
}

/* Remove Chrome's blue outline on button clicks */
button:focus, 
.btn:focus,
.accordion-button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 1460px) {
    #body {
        flex-direction: column;
    }

    #body .box {
        margin-right: 0!important;
        overflow: visible;
    }
}