/**
 * Custom CSS for dBase, post Steven.
 */



/* General CSS Styles */
textarea {
    height: 50px;
    background-color: #00A8A8;
}

input:disabled {
    background-color: #777;
}

main {
    position: relative;
}

table, thead, tbody, tr, th, td {
    position: relative;
    z-index: 1;

    box-sizing: border-box;
}

table tr, table th, table td {
    position: relative;
    z-index: 2;
    overflow: hidden;
}

main i {
    font-size: 70%;
}

table tr th.sortable {
    text-decoration: underline;
    cursor: pointer;

    border-right: 1px solid grey;
    border-left: 1px solid grey;
}


/* General CSS Classes */
.collapsible-trigger {
    cursor: pointer;
}

.collapsible-icon {
    float: left;
    margin-left: 40px;
    margin-right: -40px;
    cursor: pointer;
}

.add-form-button {
    text-decoration: none;
    background-color: #EEEEEE;
    color: #333333;
    padding: 2px 6px 2px 6px;
    border-top: 1px solid #CCCCCC;
    border-right: 1px solid #333333;
    border-bottom: 1px solid #333333;
    border-left: 1px solid #CCCCCC;
    border-radius: 5px;

    cursor:  pointer;
}


/* Modal CSS */
.modal {
    font-size: 20px;
    background-color: #123f51;
    border: 1px solid grey;
}
.modal input {
    background-color: #016464;
}
.modal-trigger-button {
    width: 100%;
    height: 25px;
    background: buttonface;
    padding: 10px;
    text-align: center !important;
    justify-content: center !important;
    border-radius: 5px;
    color: buttontext;
    font-weight: bold;
    line-height: 25px;
    text-decoration: none;
}

/* Select2 CSS  */
/* General elements */
.select2-container,
.select2-dropdown,
.select2-container-default,
.select2-results,
.select2-search,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #000;
    background-color: #00A8A8;
    border-radius: 4px;
}
.select2-container>.selection {
    min-width: 100%;
    max-width: 100%;
}

/* Disabled Select2 */
.select2-selection[aria-disabled="true"],
.select2-selection[aria-disabled="true"] .select2-selection,
.select2-selection[aria-disabled="true"] .select2-selection__rendered,
.select2-selection[aria-disabled="true"] .select2-selection__arrow b {
    color: darkgray;
    background-color: gray;
    border-color: gray;
    cursor: default;
}

.select2-selection[aria-disabled="true"] .select2-selection__arrow {
    display: none;
}

/* Search Bar */
.select2-container--default .select2-search--dropdown .select2-search__field {
    color: teal;
    background-color: #00A8A8;
}

/* Placeholder text */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: teal;
}
/* Dropdown Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #000 transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #000 transparent;
}

/* Currently selected element */
.select2-container--default .select2-results__option[aria-selected="true"] {
    color: #fff;
    background-color: #123f51;
}

/* Currently hovered element */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: #fff;
    background-color: #1b4993;
}

/* formatting for django form.as_table */
div.form-table {
    border: 2px solid #808080;
    padding: 1em;
    margin: 1em;
}

.form-table {
    border-collapse: collapse;
    min-width: 200px;
    width: auto;
    max-width: max-content;
}
.form-table tr {
    height: 2em;
}
.form-table tr td:first-child {
    border-bottom: 1px solid gray;
}

.form-table tr.form-submit-action-buttons td {
    border-bottom: none;
}

button.submit-action-button {
    font-size: 1em;
    padding: 8px 16px;
    border-radius: 8px;
}

br+span.helptext {
    display: inline;
}

/* Menu Display CSS */
.core-menu-options {
    width: 325px;
    margin-right: 2%;

    border-right: 1px solid #808080;
}

.core-menu-options ul {
    text-align: left;
}

.core-menu-items {
    display: flex;
    flex-direction: column;
    flex: 5;

    margin-right: 5%;
    margin-left: 5%;
}

.core-menu-items hr {
    width: 100%;
}

.core-menu-items ul {
    margin-left: 20%;

    text-align: left;
}


/* Extra report formatting. */
main .report-form > div {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

main .report-form > div > div {
    width: 100%;
}

main .report-form .default-report-form-fields {
    padding-left: 5%;

    border-left: 1px solid #808080;
}



/* Custom formatting specific to updated BillTo/ShipTo edit views */
main .customer-edit-sticky {
    position: sticky;
    top: 0;
    right: 0;
    left: 0;

    z-index: 10;

    padding-top: 5px;

    background-color: #000;
    border-bottom: 1px solid grey;
}
main .customer-edit-submit-sticky {
    position: sticky;
    right: 0;
    bottom: 0;
    left: 0;

    z-index: 10;

    padding-top: 5px;

    background-color: #000;
    border-top: 1px solid grey;
}

main .customer-edit-form {
    padding: 10px;
}

main .customer-edit-form h2, main .customer-edit-form h3 {
    font-weight: bold;
    text-align: center;
}

main .customer-edit-form .form-subsection,
main .customer-contact-form .form-subsection,
main .customer-virtual-note-form .form-subsection {
    margin-top: 15px;
    margin-bottom: 15px;

    background-color: #123f51;
    border: 1px solid grey;
    border-radius: 15px;
}

main .customer-contact-form > div,
main .customer-virtual-note-form > div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

main .customer-contact-form .form-subsection,
main .customer-virtual-note-form .form-subsection {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    min-width: 25%;
    margin-right: 10px;
    margin-left: 10px;
    padding-right: 10px;
    padding-left: 10px;
}

main .customer-virtual-note-form .virtual-note {
    width: 100%;
}

main .customer-contact-form .form-subsection > *,
main .customer-contact-form .form-subsection > * > *,
main .customer-virtual-note-form .form-subsection > *,
main .customer-virtual-note-form .form-subsection > * > * {
    display: flex;
    flex-direction: row;
    flex: 1;
    width: 100%;
}
main .customer-virtual-note-form .form-subsection > p.text-area {
    display: block;
}

main .customer-contact-form .empty-form,
main .customer-virtual-note-form .empty-form {
    display: none;
}

main .new-customer-overarching {
    background-color: #202f35 !important;
}

main .new-customer-billto {
    background-color: #333b5c !important;
}

main .new-customer-shipto {
    background-color: #36263b !important;
}

main .customer-edit-form .form-subsection > div,
main .customer-contact-form .form-subsection > div,
main .customer-virtual-note-form .form-subsection > div {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;

    padding: 10px;
}

main .customer-edit-form .form-subsection > div > div,
main .customer-contact-form .form-subsection > div > div,
main .customer-virtual-note-form .form-subsection > div > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    flex: 1;

    min-width: 25%;
    margin-right: 10px;
    margin-left: 10px;
    padding-right: 10px;
    padding-left: 10px;

    box-sizing: border-box;
}

main .customer-edit-form .form-subsection > div > div > *,
main .customer-contact-form .form-subsection > div > div > *,
main .customer-virtual-note-form .form-subsection > div > div > * {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;

    margin-right: 10px;
    margin-left: 10px;

    text-align: left;
}

main .customer-edit-form .form-subsection > div > div > p {
    margin-bottom: 3px;
}

main .customer-contact-form .form-subsection > p,
main .customer-virtual-note-form .form-subsection > p {
    margin-top: 3px;
    margin-bottom: 3px;
}

main .customer-edit-form .form-subsection > div > p,
main .customer-edit-form .form-subsection > div > hr,
main .customer-edit-form .form-subsection > div > div > input[type=text],
main .customer-edit-form .form-subsection > div > div > input[type=number],
main .customer-edit-form .form-subsection > div > div > select,
main .customer-edit-form .form-subsection > div > div > textarea,
main .customer-edit-form .form-subsection > div > div > p,
main .customer-contact-form .form-subsection > div > div > input[type=text],
main .customer-contact-form .form-subsection > div > div > input[type=number],
main .customer-contact-form .form-subsection > div > div > select,
main .customer-contact-form .form-subsection > div > div > textarea,
main .customer-contact-form .form-subsection > div > div > p,
main .customer-virtual-note-form .form-subsection > div > div > input[type=text],
main .customer-virtual-note-form .form-subsection > div > div > input[type=number],
main .customer-virtual-note-form .form-subsection > div > div > select,
main .customer-virtual-note-form .form-subsection > div > div > textarea {
    width: 100%;
}

main .customer-edit-form .form-subsection > div > div > p {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;

    border-bottom: 1px solid grey;
}

main .customer-edit-form .form-subsection > div > div > p > i {
    flex: 1;
    text-align: right;
}

main .customer-edit-form .form-subsection > div > p {
    text-align: center;
}

main .customer-edit-form .form-subsection > .header-div,
main .header-div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

main .customer-edit-form .form-subsection > .header-div span,
main .header-div span {
    min-width: 150px;
}

main .customer-edit-form .form-subsection > .header-div .button,
main .header-div .button {
    flex: 0;
    min-width: auto;
    width: auto;

    white-space: nowrap;
    cursor: pointer;
}

main .customer-edit-form .form-subsection > div > div > .relation-info,
main .customer-contact-form .form-subsection > p > .relation-info,
main .customer-virtual-note-form .form-subsection > p > .relation-info {
    color: white;
    background-color: #016464;
    width: 100%;
}

main .customer-edit-form .form-subsection h4 {
    text-decoration: underline;
    width: 100%;
    text-align: center;
}

main .customer-edit-form .form-subsection > div > div > div.date-wrapper {
    align-items: center;
    width: 100%;
}

main .customer-edit-form .form-subsection > div > div > div > .date {
    width: 100%;
}


main .customer-edit-form table tr:nth-child(2n) td {
    background-color: #1C5C5C;
}
