:root {
    --link-color: {{link_color}};
    --btn-fg-color: {{btn_fg_color|d("#fff")}};
    --btn-bg-color: {{btn_bg_color|d(link_color)}};
    --navbar-color: {{navbar_color}};
    --font-family-sans-serif: "{{font_family}}", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Adjust for fixed header */
body {
    padding-top: 4.5rem;
    min-height: 100vh;
    font-family: var(--font-family-sans-serif);
}

/* Adjust navbar color */
.navbar.bg-dark {
    background-color: var(--navbar-color) !important;
}

/* Adjust primary color */
a, .btn-link {
    color: var(--link-color);
}

a:hover, .btn-link:hover {
    filter: brightness(.85);
    color: var(--link-color);
}

.btn-primary {
    color: var(--btn-fg-color);
    background-color: var(--btn-bg-color);
    border-color: var(--btn-bg-color);
}

.btn-primary:hover {
    filter: brightness(.85);
    color: var(--btn-fg-color);
    background-color: var(--btn-bg-color);
    border-color: var(--btn-bg-color);
}

.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show>.btn-primary.dropdown-toggle {
    filter: brightness(.65);
    color: var(--btn-fg-color);
    background-color: var(--btn-bg-color);
    border-color: var(--btn-bg-color);
}

.list-group-item.active {
    color: var(--btn-fg-color);
    background-color: var(--btn-bg-color);
    border-color: var(--btn-bg-color);
}

.nav-pills .nav-link.active {
    color: var(--btn-fg-color);
    background-color: var(--btn-bg-color);
    border-color: var(--btn-bg-color);
}

.page-link {
    color: var(--btn-bg-color);
}
.page-item.active .page-link {
    background-color: var(--btn-bg-color);
    border-color: var(--btn-bg-color);
}

{% if not btn_rounded %}
/* Keep border radius */
.btn, .btn-lg{
    border-radius: 0;
}
{% endif %}

/* Show hide Action button */
tr .btn-hover {
    opacity: 0;
}
tr:hover .btn-hover, tr.child .btn-hover {
    opacity: 1;
}

/* DataTable adjustments */
.dataTables_wrapper .dataTables_info{
    padding-top: 0;
}
table.dataTable thead>tr>th.sorting {
    padding-top: 5px 30px 5px 5px;
}
.dataTables_filter {
    white-space: nowrap;
}
.dataTables_filter label {
    margin-bottom: 0;
}
.dataTables_filter input {
    display: inline-block; 
    width: auto;
}
/* DataTable Buttons adjustments to align them on mobile */
@media screen and (max-width: 640px){
    .dataTables_wrapper .dt-buttons {
        text-align: center;
    }
}
/* Fix responsive buttons colors */ 
table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before, table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before {
    background-color: var(--btn-bg-color);
}
table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before, table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before {
    background-color: var(--navbar-color);
}

/* Fix header of activity in edit view */
#activity.card thead {
    background-color: rgba(0, 0, 0, .03);
}

#activity.card thead th {
    border-bottom: 1px solid rgba(0, 0, 0, .125)
}
