﻿/* Override Bootstrap Styles
 ********************************************************/
a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a.page-link:hover {
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.nav-link:focus,
.nav-link:hover {
    text-decoration: none;
}

.dropdown-item:focus, 
.dropdown-item:hover {
    text-decoration: none;
}

.card {
    margin-bottom: 1.5rem;
}

.card-header,
.card-footer {
    padding: 1rem;
}

.table>:not(:first-child) {
    border-top: 0;
}

.table th {
    padding: 0.75rem;
}

.table-sm th {
    padding: 0.25rem;
}

.table tfoot tr {
    font-weight: 700;
}

/* Page Loader
 ********************************************************/
#ns-page-loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    text-align: center;
    z-index: 2000;
}

#ns-page-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #337ab7; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    margin-left: -60px;
    margin-top: -60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Form Validation Styles
 ********************************************************/
.form-control.input-validation-error,
.form-select.input-validation-error,
.form-check-input.input-validation-error {
    border-color: #dc3545 !important;
}

.form-control.input-validation-error:focus,
.form-select.input-validation-error:focus,
.form-check-input.input-validation-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgb(220 53 69 / 25%);
}

.ns-required:before {
    content: "* ";
    color: #f00;
}

/* Tables
 ********************************************************/
.ns-card-table {
    border: 0;
    border-top: 1px solid rgba(0,0,0,.125);
}

.dark-mode .ns-card-table {
    border-color: #345;
}

.ns-card-table .card-body,
.ns-card-table .card-header {
    border-left: 1px solid rgba(0,0,0,.125);
    border-right: 1px solid rgba(0,0,0,.125);
}

.dark-mode .ns-card-table .card-body,
.dark-mode .ns-card-table .card-header {
    border-color: #345;
}

.ns-card-table .card-header {
    border-bottom-width: 0;
}

.ns-card-table .table-bordered thead td,
.ns-card-table .table-bordered thead th {
    border-bottom-width: 1px;
}

.ns-card-table thead td,
.ns-card-table thead th {
    background-color: #f2f3f5;
}

.ns-card-table tfoot td,
.ns-card-table tfoot th {
    background-color: #f2f3f5;
}

/* DataTables Fixed Header */
.dtfh-floatingparent thead td,
.dtfh-floatingparent thead th {
    background-color: #f2f3f5;
}

.dark-mode .dtfh-floatingparent thead td,
.dark-mode .dtfh-floatingparent thead th {
    background-color: #19222d;
}

.dark-mode .ns-card-table thead td,
.dark-mode .ns-card-table thead th,
.dark-mode .ns-card-table tfoot td,
.dark-mode .ns-card-table tfoot th {
    background-color: #19222d;
}

.ns-table-search {
    display: flex;
    padding: .5rem 1.25rem;
    border: 1px solid rgba(0,0,0,.125);
    border-bottom-width: 0;
}

.dark-mode .ns-table-search {
    border-color: #345;
}

.ns-table-search label {
    margin: 0;
}

.ns-table-search input {
    display: inline-block;
    width: auto;
    vertical-align: middle;
}

/* DataTables table horz scroll on narrow widths */
.ns-table-wrapper {
    overflow-x: auto;
}

/* Tables with clickable rows */
.ns-table-clickable-row tbody tr,
.ns-table-click-open-freeform tbody tr {
    cursor: pointer;
}

.ns-table-clickable-row tbody tr.active,
.ns-table-click-open-freeform tbody tr.active {
    background-color: #0094ff;
    color: #fff;
}

/* hover table row to display buttons */
.ns-table-hover-btns tr .btn {
    display: none;
}

.ns-table-hover-btns tr:hover .btn {
    display: block;
}

@media (max-width: 991px) {
    .ns-table-grid thead {
        display: none;
    }

    /*.ns-table-grid tbody tr td:not(:first-child) {
        display: none;
    }*/

    .ns-table-grid tbody tr {
        display: block;
        width: 100%;
        padding: 0px;
        margin: 0px;
        border-bottom: 5px solid #555;
    }

    .ns-table-grid tbody td {
        display: block;
        width: 100%;
        padding: 0px;
        margin: 0px;
        word-wrap: break-word;
    }

    /* column width % */
    .ns-table-grid th.w-15,
    .ns-table-grid td.w-15 {
        width: 100% !important;
    }

    .ns-table-grid th.w-30,
    .ns-table-grid td.w-30 {
        width: 100% !important;
    }

    .ns-table-grid th.w-45,
    .ns-table-grid td.w-45 {
        width: 100% !important;
    }
}

/* Table with Notes Fields */
/*.ns-table-with-notes {
    table-layout: fixed;
    width: 100%;
}*/

.ns-table-with-notes td.ns-table-notes-cell {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* Sticky */
.ns-sticky-fixed {
    position: fixed!important;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 1.5rem;
    z-index: 100;
    border-bottom: 1px solid #999!important;
}

/* DataTables sorting
 ********************************************************/
.table thead .sorting,
.table thead .sorting_asc,
.table thead .sorting_desc {
    position: relative;
    cursor: pointer;
    padding-right: 20px;
}

.table thead .sorting:after,
.table thead .sorting_asc:after,
.table thead .sorting_desc:after {
    display: block;
    position: absolute;
    top: 10px;
    right: 8px;
    font-family: FontAwesome;
}

.dataTables_scrollBody .table thead .sorting:after,
.dataTables_scrollBody .table thead .sorting_asc:after,
.dataTables_scrollBody .table thead .sorting_desc:after {
    display: none;
}

.table.table-sm thead .sorting:after,
.table.table-sm thead .sorting_asc:after,
.table.table-sm thead .sorting_desc:after {
    top: 5px;
}

.table thead .sorting:after {
    content: "\f0dc";
    color: #ccc;
    font-size: 1em;
    padding-top: 0;
}

.table thead .sorting_asc:after {
    content: "\f0de";
    color: #333;
}

.table thead .sorting_desc:after {
    content: "\f0dd";
    color: #333;
}

/* Tabs
 ********************************************************/
.nav-tabs {
    border-bottom: 0;
}

.nav-tabs.bg-white {
    border: 1px solid #ddd;
    border-bottom: 0;
}

.nav-tabs.bg-white .nav-item {
    margin-top: -1px;
}

.nav-tabs .nav-link {
    border-radius: 0;
    padding: 1rem;
    font-weight: 700;
}

.nav-tabs.text-white .nav-link {
    color: #fff;
}

.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    box-shadow: inset 0 3px 0 0 #48b0f7;
}

.dark-mode .nav-tabs .nav-link:focus,
.dark-mode .nav-tabs .nav-link:hover {
    color: #fff;
    background-color: #2a384b;
    border-color: #2a384b;
}

.tab-content {
    background-color: #fff;
    padding: 1rem;
    border: 1px solid #ddd;
    margin-bottom: 1.5rem;
}
@media (max-width: 575px) {
    .tab-content {
        padding: .5rem;
    }
}

.dark-mode .tab-content {
    background-color: inherit;
    border-color: #345;
}

.dark-mode .nav-tabs .nav-item.show .nav-link,
.dark-mode .nav-tabs .nav-link.active {
    color: #fff;
    background-color: #2a384b;
    border-color: #345;
}

/* Freeform
 ********************************************************/
#ns-freeform-modal {
    padding: 20px 0;
}

/* Hover Content
 ********************************************************/
.hover-container {
    position: relative;
}

.hover-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    position: absolute;
    z-index: 1000;
}

.hover-container:hover .hover-content {
    opacity: 1;
    visibility: visible;
}

/* Helpers
 ********************************************************/
.fs-xsmall {
    font-size: .75em;
}

.help-block {
    font-style: italic;
    margin-top: 2px;
    margin-bottom: 10px;
    color: #777;
}

/* width % */
.w-10 {
    width: 10% !important;
}

.w-15 {
    width: 15% !important;
}

.w-20 {
    width: 20% !important;
}

.w-30 {
    width: 30% !important;
}

.w-40 {
    width: 40% !important;
}

.w-45 {
    width: 45% !important;
}

.w-60 {
    width: 60% !important;
}

.w-70 {
    width: 70% !important;
}

/* Individually styled components
 ********************************************************/
.ns-contacts-xref-cust .card {
    background-color: #f9fbb6; /*#d9e021;*/
}
.dark-mode .ns-contacts-xref-cust .card {
    background-color: #494A36;
}

tr.ns-contacts-xref-cust {
    background-color: #f9fbb6; /*#d9e021;*/
}
.dark-mode tr.ns-contacts-xref-cust {
    background-color: #494A36;
}
