/*
    DJANGO Admin styles
*/

/* VARIABLE DEFINITIONS */
html[data-theme="light"],
:root {
    --primary: #1A2C11;
    --secondary: #FADE63;
    --accent: #75A74C;
    --primary-fg: #fff;

    --body-fg: #333;
    --body-bg: #fff;
    --body-quiet-color: #666;
    --body-loud-color: #000;

    --header-color: var(--secondary);
    --header-branding-color: var(--accent);
    --header-bg: var(--secondary);
    --header-link-color: var(--primary-fg);

    --breadcrumbs-fg: #c4dce8;
    --breadcrumbs-link-fg: var(--body-bg);
    --breadcrumbs-bg: var(--primary);

    --link-fg: var(--accent);
    --link-hover-color: #15250c;
    --link-selected-fg: #12200b;

    --hairline-color: #e8e8e8;
    --border-color: #ccc;

    --error-fg: #ba2121;

    --message-success-bg: #dfd;
    --message-warning-bg: #ffc;
    --message-error-bg: #ffefef;

    --darkened-bg: #f8f8f8; /* A bit darker than --body-bg */
    --selected-bg: #e4e4e4; /* E.g. selected table cells */
    --selected-row: #ffc;

    --button-fg: var(--primary-fg);
    --button-bg: var(--primary);
    --button-hover-bg: #274916;
    --default-button-bg: #274916;
    --home-button-hover-bg: #c7ae41;
    --close-button-bg: #747474;
    --close-button-hover-bg: #333;
    --delete-button-bg: #db1a1a;
    --delete-button-hover-bg: #a41515;

    --text-color: var(--primary-fg);
    --success-ls: #274916;

    --object-tools-fg: var(--button-fg);
    --object-tools-bg: var(--close-button-bg);
    --object-tools-hover-bg: var(--close-button-hover-bg);

    --font-family-primary:
        "Usual",
        Arial,
        Helvetica
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        system-ui,
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif,
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol",
        "Noto Color Emoji";
    --font-family-monospace:
        ui-monospace,
        Menlo,
        Monaco,
        "Cascadia Mono",
        "Segoe UI Mono",
        "Roboto Mono",
        "Oxygen Mono",
        "Ubuntu Monospace",
        "Source Code Pro",
        "Fira Mono",
        "Droid Sans Mono",
        "Courier New",
        monospace,
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol",
        "Noto Color Emoji";

        --h1-fontsize: 1.5rem;
        --h2-fontsize: 1.375rem;
        --h3-fontsize: 1.25rem;
        --h4-fontsize: 1.25rem;
        --h5-fontsize: 0.875rem;
        --body-fontsize: 0.875rem;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-size: var(--body-fontsize);
    font-family: var(--font-family-primary);
    color: var(--body-fg);
    background: var(--body-bg);
}

/* LINKS */

a:link, a:visited {
    font-size: var(--body-fontsize);
    font-weight: bold;
    color: var(--link-fg);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

a:focus, a:hover {
    color: var(--link-hover-color);
}

a:focus {
    text-decoration: underline;
}

a img {
    border: none;
}

a.section:link, a.section:visited {
    color: var(--header-link-color);
    text-decoration: none;
}

a.section:focus, a.section:hover {
    text-decoration: underline;
}

/* GLOBAL DEFAULTS */

p, ol, ul, dl {
    margin: .2em 0 .8em 0;
}

p {
    padding: 0;
    line-height: 140%;
}

h1,h2,h3,h4,h5 {
    font-family: var(--font-family-primary);
    color: var(--body-fg);
}

h1 {
    margin: 0 0 20px;
    font-weight: bolder;
    font-size: var(--h1-fontsize);
    color: var(--primary);
}

h2 {
    font-size: var(--h2-fontsize);
    margin: 1em 0 .5em 0;
}

h2.subhead {
    font-weight: normal;
    margin-top: 0;
}

h3 {
    font-size: var(--h3-fontsize);
    margin: .8em 0 .3em 0;
    color: var(--body-quiet-color);
}

h4 {
    font-size: var(--h4-fontsize);
    margin: 1em 0 .8em 0;
    padding-bottom: 3px;
}

h5 {
    font-size: var(--h5-fontsize);
    margin: 1.5em 0 .5em 0;
    letter-spacing: 1px;
}

ul > li {
    list-style-type: square;
    padding: 1px 0;
}

li ul {
    margin-bottom: 0;
}

li, dt, dd {
    font-size: var(--body-fontsize);
    line-height: var(--h4-fontsize);
}

dt {
    font-weight: bold;
    margin-top: 4px;
}

dd {
    margin-left: 0;
}

form {
    margin: 0;
    padding: 0;
}

fieldset {
    margin: 0;
    min-width: 0;
    padding: 0;
    border: none;
    border-top: 1px solid var(--hairline-color);
}

blockquote {
    font-size: var(--body-fontsize);
    color: #777;
    margin-left: 2px;
    padding-left: 10px;
    border-left: 5px solid #ddd;
}

code, pre {
    font-family: var(--font-family-monospace);
    color: var(--body-quiet-color);
    font-size: var(--body-fontsize);
    overflow-x: auto;
}

pre.literal-block {
    margin: 10px;
    background: var(--darkened-bg);
    padding: 6px 8px;
}

code strong {
    color: #930;
}

hr {
    clear: both;
    color: var(--hairline-color);
    background-color: var(--hairline-color);
    height: 1px;
    border: none;
    margin: 0;
    padding: 0;
    line-height: 1px;
}

/* TEXT STYLES & MODIFIERS */

.small {
    font-size: 0.6875rem;
}

.mini {
    font-size: 0.625rem;
}

.help, p.help, form p.help, div.help, form div.help, div.help li {
    font-size: 0.6875rem;
    color: var(--body-quiet-color);
}

div.help ul {
     margin-bottom: 0;
}

.help-tooltip {
    cursor: help;
}

p img, h1 img, h2 img, h3 img, h4 img, td img {
    vertical-align: middle;
}

.quiet, a.quiet:link, a.quiet:visited {
    color: var(--body-quiet-color);
    font-weight: normal;
}

.clear {
    clear: both;
}

.nowrap {
    white-space: nowrap;
}

.hidden {
    display: none !important;
}

/* TABLES */

table {
    border-collapse: collapse;
    border-color: var(--border-color);
}

td, th {
    font-size: var(--body-fontsize);
    line-height: var(--body-fontsize);
    border-bottom: 1px solid var(--hairline-color);
    vertical-align: top;
    padding: 8px;
}

th {
    font-weight: 600;
    text-align: left;
}

thead th,
tfoot td {
    color: var(--body-quiet-color);
    padding: 5px 10px;
    font-size: var(--body-fontsize);
    background: var(--body-bg);
    border: none;
    border-top: 1px solid var(--hairline-color);
    border-bottom: 1px solid var(--hairline-color);
}

tfoot td {
    border-bottom: none;
    border-top: 1px solid var(--hairline-color);
}

thead th.required {
    color: var(--body-loud-color);
}

tr.alt {
    background: var(--darkened-bg);
}

tr:nth-child(odd), .row-form-errors {
    background: var(--body-bg);
}

tr:nth-child(even),
tr:nth-child(even) .errorlist,
tr:nth-child(odd) + .row-form-errors,
tr:nth-child(odd) + .row-form-errors .errorlist {
    background: var(--darkened-bg);
}

/* SORTABLE TABLES */

thead th {
    padding: 5px 10px;
    line-height: normal;
    background: var(--darkened-bg);
}

thead th a:link, thead th a:visited {
    color: var(--body-quiet-color);
}

thead th.sorted {
    background: var(--selected-bg);
}

thead th.sorted .text {
    padding-right: 42px;
}

table thead th .text span {
    padding: 8px 10px;
    display: block;
}

table thead th .text a {
    display: block;
    cursor: pointer;
    padding: 8px 10px;
}

table thead th .text a:focus, table thead th .text a:hover {
    background: var(--selected-bg);
}

thead th.sorted a.sortremove {
    visibility: hidden;
}

table thead th.sorted:hover a.sortremove {
    visibility: visible;
}

table thead th.sorted .sortoptions {
    display: block;
    padding: 9px 5px 0 5px;
    float: right;
    text-align: right;
}

table thead th.sorted .sortpriority {
    font-size: .8em;
    min-width: 12px;
    text-align: center;
    vertical-align: 3px;
    margin-left: 2px;
    margin-right: 2px;
}

table thead th.sorted .sortoptions a {
    position: relative;
    width: 14px;
    height: 14px;
    display: inline-block;
    background: url(../img/sorting-icons.svg) 0 0 no-repeat;
    background-size: 14px auto;
}

table thead th.sorted .sortoptions a.sortremove {
    background-position: 0 0;
}

table thead th.sorted .sortoptions a.sortremove:after {
    content: '\\';
    position: absolute;
    top: -6px;
    left: 3px;
    font-weight: 200;
    font-size: var(--h4-fontsize);
    color: var(--body-quiet-color);
}

table thead th.sorted .sortoptions a.sortremove:focus:after,
table thead th.sorted .sortoptions a.sortremove:hover:after {
    color: var(--link-fg);
}

table thead th.sorted .sortoptions a.sortremove:focus,
table thead th.sorted .sortoptions a.sortremove:hover {
    background-position: 0 -14px;
}

table thead th.sorted .sortoptions a.ascending {
    background-position: 0 -28px;
}

table thead th.sorted .sortoptions a.ascending:focus,
table thead th.sorted .sortoptions a.ascending:hover {
    background-position: 0 -42px;
}

table thead th.sorted .sortoptions a.descending {
    top: 1px;
    background-position: 0 -56px;
}

table thead th.sorted .sortoptions a.descending:focus,
table thead th.sorted .sortoptions a.descending:hover {
    background-position: 0 -70px;
}

/* FORM DEFAULTS */

input, textarea, select, .form-row p, form .button {
    margin: 2px 0;
    padding: 2px 3px;
    vertical-align: middle;
    font-family: var(--font-family-primary);
    font-weight: normal;
    font-size: var(--body-fontsize);
}
.form-row div.help {
    padding: 2px 3px;
}

textarea {
    vertical-align: top;
}

input[type=text], input[type=password], input[type=email], input[type=url],
input[type=number], input[type=tel], textarea, select, .vTextField {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 6px;
    margin-top: 0;
    color: var(--body-fg);
    background-color: var(--body-bg);
    font-family: var(--font-family-primary);
}

input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
input[type=url]:focus, input[type=number]:focus, input[type=tel]:focus,
textarea:focus, select:focus, .vTextField:focus {
    border-color: var(--body-quiet-color);
}

select {
    height: 1.875rem;
}

select[multiple] {
    /* Allow HTML size attribute to override the height in the rule above. */
    height: auto;
    min-height: 150px;
}

/* FORM BUTTONS */

.button, input[type=submit], input[type=button], .submit-row input, a.button {
    background: var(--button-bg);
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    color: var(--button-fg);
    cursor: pointer;
    transition: background 0.15s;
}

a.button {
    padding: 4px 5px;
}

.button:active, input[type=submit]:active, input[type=button]:active,
.button:focus, input[type=submit]:focus, input[type=button]:focus,
.button:hover, input[type=submit]:hover, input[type=button]:hover {
    background: var(--button-hover-bg);
}

.button[disabled], input[type=submit][disabled], input[type=button][disabled] {
    opacity: 0.4;
}

.button.default, input[type=submit].default, .submit-row input.default {
    border: none;
    font-weight: 400;
    background: var(--default-button-bg);
}

.button.default:active, input[type=submit].default:active,
.button.default:focus, input[type=submit].default:focus,
.button.default:hover, input[type=submit].default:hover {
    background: var(--default-button-hover-bg);
}

.button[disabled].default,
input[type=submit][disabled].default,
input[type=button][disabled].default {
    opacity: 0.4;
}


/* MODULES */

.module {
    border: none;
    margin-bottom: 30px;
    background: var(--body-bg);
}

.module p, .module ul, .module h3, .module h4, .module dl, .module pre {
    padding-left: 10px;
    padding-right: 10px;
}

.module blockquote {
    margin-left: 12px;
}

.module ul, .module ol {
    margin-left: 1.5em;
}

.module h3 {
    margin-top: .6em;
}

.module h2, .module caption, .inline-group h2 {
    margin: 0;
    padding: 8px;
    font-weight: 400;
    font-size: var(--h2-fontsize);
    text-align: left;
    background: var(--primary);
    color: var(--header-link-color);
}

.module caption,
.inline-group h2 {
    font-size: var(--h4-fontsize);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.module table {
    border-collapse: collapse;
}

/* MESSAGES & ERRORS */

ul.messagelist {
    padding: 0;
    margin: 0;
}

ul.messagelist li {
    display: block;
    font-weight: 400;
    font-size: var(--body-fontsize);
    padding: 10px 10px 10px 65px;
    margin: 0 0 10px 0;
    background: var(--message-success-bg) url(../img/icon-yes.svg) 40px 12px no-repeat;
    background-size: 16px auto;
    color: var(--body-fg);
    word-break: break-word;
}

ul.messagelist li.warning {
    background: var(--message-warning-bg) url(../img/icon-alert.svg) 40px 14px no-repeat;
    background-size: 14px auto;
}

ul.messagelist li.error {
    background: var(--message-error-bg) url(../img/icon-no.svg) 40px 12px no-repeat;
    background-size: 16px auto;
}

.errornote {
    font-size: var(--body-fontsize);
    font-weight: 700;
    display: block;
    padding: 10px 12px;
    margin: 0 0 10px 0;
    color: var(--error-fg);
    border: 1px solid var(--error-fg);
    border-radius: 4px;
    background-color: var(--body-bg);
    background-position: 5px 12px;
    overflow-wrap: break-word;
}

ul.errorlist {
    margin: 0 0 4px;
    padding: 0;
    color: var(--error-fg);
    background: var(--body-bg);
}

ul.errorlist li {
    font-size: var(--body-fontsize);
    display: block;
    margin-bottom: 4px;
    overflow-wrap: break-word;
}

ul.errorlist li:first-child {
    margin-top: 0;
}

ul.errorlist li a {
    color: inherit;
    text-decoration: underline;
}

td ul.errorlist {
    margin: 0;
    padding: 0;
}

td ul.errorlist li {
    margin: 0;
}

.form-row.errors {
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--hairline-color);
    background: none;
}

.form-row.errors ul.errorlist li {
    padding-left: 0;
}

.errors input, .errors select, .errors textarea,
td ul.errorlist + input, td ul.errorlist + select, td ul.errorlist + textarea {
    border: 1px solid var(--error-fg);
}

.description {
    font-size: var(--body-fontsize);
    padding: 5px 0 0 12px;
}

/* BREADCRUMBS */

div.breadcrumbs {
    background: var(--breadcrumbs-bg);
    padding: 10px 40px;
    border: none;
    color: var(--breadcrumbs-fg);
    text-align: left;
}

div.breadcrumbs a {
    color: var(--breadcrumbs-link-fg);
}

div.breadcrumbs a:focus, div.breadcrumbs a:hover {
    color: var(--breadcrumbs-fg);
}

/* ACTION ICONS */

.viewlink, .inlineviewlink {
    padding-left: 16px;
    background: url(../img/icon-viewlink.svg) 0 1px no-repeat;
}

.addlink {
    padding-left: 16px;
    background: url(../img/icon-addlink.svg) 0 1px no-repeat;
}

.changelink, .inlinechangelink {
    padding-left: 16px;
    background: url(../img/icon-changelink.svg) 0 1px no-repeat;
}

.deletelink {
    padding-left: 16px;
    background: url(../img/icon-deletelink.svg) 0 1px no-repeat;
}

a.deletelink:link, a.deletelink:visited {
    color: #CC3434; /* XXX Probably unused? */
}

a.deletelink:focus, a.deletelink:hover {
    color: #993333; /* XXX Probably unused? */
    text-decoration: none;
}

/* OBJECT TOOLS */

.object-tools {
    font-size: var(--body-fontsize);
    font-weight: bold;
    padding-left: 0;
    float: right;
    position: relative;
    margin-top: -48px;
}

.object-tools li {
    display: block;
    float: left;
    margin-left: 5px;
    height: var(--body-fontsize);
}

.object-tools a {
    border-radius: 15px;
}

.object-tools a:link, .object-tools a:visited {
    display: block;
    float: left;
    padding: 3px 12px;
    background: var(--object-tools-bg);
    color: var(--object-tools-fg);
    font-weight: 400;
    font-size: var(--body-fontsize);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.object-tools a:focus, .object-tools a:hover {
    background-color: var(--object-tools-hover-bg);
}

.object-tools a:focus{
    text-decoration: none;
}

.object-tools a.viewsitelink, .object-tools a.addlink {
    background-repeat: no-repeat;
    background-position: right 7px center;
    padding-right: 26px;
}

.object-tools a.viewsitelink {
    background-image: url(../img/tooltag-arrowright.svg);
}

.object-tools a.addlink {
    background-image: url(../img/tooltag-add.svg);
}

/* OBJECT HISTORY */

#change-history table {
    width: 100%;
}

#change-history table tbody th {
    width: 16em;
}

#change-history .paginator {
    color: var(--body-quiet-color);
    border-bottom: 1px solid var(--hairline-color);
    background: var(--body-bg);
    overflow: hidden;
}

/* PAGE STRUCTURE */

#container {
    position: relative;
    width: 100%;
    min-width: 980px;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#container > div {
    flex-shrink: 0;
}

#container > .main {
    display: flex;
    flex: 1 0 auto;
}

.main > .content {
    flex:  1 0;
    max-width: 100%;
}

.skip-to-content-link {
    position: absolute;
    top: -999px;
    margin: 5px;
    padding: 5px;
    background: var(--body-bg);
    z-index: 1;
}

.skip-to-content-link:focus {
    left: 0px;
    top: 0px;
}

#content {
    padding: 20px 40px;
}

.dashboard #content {
    width: 600px;
}

#content-main {
    float: left;
    width: 100%;
}

#content-related {
    float: right;
    width: 260px;
    position: relative;
    margin-right: -300px;
}

#footer {
    clear: both;
    padding: 10px;
}

/* COLUMN TYPES */

.colMS {
    margin-right: 300px;
}

.colSM {
    margin-left: 300px;
}

.colSM #content-related {
    float: left;
    margin-right: 0;
    margin-left: -300px;
}

.colSM #content-main {
    float: right;
}

.popup .colM {
    width: auto;
}

/* HEADER */

#header {
    width: auto;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: var(--header-bg);
    color: var(--header-color);
    overflow: hidden;
}

#header a:link, #header a:visited, #logout-form button {
    color: var(--header-link-color);
}

#header a:focus , #header a:hover {
    text-decoration: underline;
}

#branding {
    display: flex;
}

#branding h1 {
    padding: 0;
    margin: 0;
    margin-inline-end: 20px;
    font-weight: 300;
    font-size: var(--h1-fontsize);
    color: var(--header-branding-color);
}

#branding h1 a:link, #branding h1 a:visited {
    color: var(--accent);
}

#branding h2 {
    padding: 0 10px;
    font-size: var(--h2-fontsize);
    margin: -8px 0 8px 0;
    font-weight: normal;
    color: var(--header-color);
}

#branding a:hover {
    text-decoration: none;
}

#logout-form {
    display: inline;
}

#logout-form button {
    background: none;
    border: 0;
    cursor: pointer;
    font-family: var(--font-family-primary);
}

#user-tools {
    float: right;
    margin: 0 0 0 20px;
    text-align: right;
}

#user-tools, #logout-form button{
    padding: 0;
    font-weight: 300;
    font-size: var(--body-fontsize);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#user-tools a, #logout-form button {
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

#user-tools a:focus, #user-tools a:hover,
#logout-form button:active, #logout-form button:hover {
    text-decoration: none;
    border-bottom: 0;
}

#logout-form button:active, #logout-form button:hover {
    margin-bottom: 1px;
}

/* SIDEBAR */

#content-related {
    background: var(--darkened-bg);
}

#content-related .module {
    background: none;
}

#content-related h3 {
    color: var(--body-quiet-color);
    padding: 0 16px;
    margin: 0 0 16px;
}

#content-related h4 {
    font-size: var(--h4-fontsize);
}

#content-related p {
    padding-left: 16px;
    padding-right: 16px;
}

#content-related .actionlist {
    padding: 0;
    margin: 16px;
}

#content-related .actionlist li {
    line-height: 1.2;
    margin-bottom: 10px;
    padding-left: 18px;
}

#content-related .module h2 {
    background: none;
    padding: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--hairline-color);
    font-size: var(--h5-fontsize);
    color: var(--body-fg);
}

.delete-confirmation form input[type="submit"] {
    background: var(--delete-button-bg);
    border-radius: 4px;
    padding: 10px 15px;
    color: var(--button-fg);
}

.delete-confirmation form input[type="submit"]:active,
.delete-confirmation form input[type="submit"]:focus,
.delete-confirmation form input[type="submit"]:hover {
    background: var(--delete-button-hover-bg);
}

.delete-confirmation form .cancel-link {
    display: inline-block;
    vertical-align: middle;
    height: 0.9375rem;
    line-height: 0.9375rem;
    border-radius: 4px;
    padding: 10px 15px;
    color: var(--button-fg);
    background: var(--close-button-bg);
    margin: 0 0 0 10px;
}

.delete-confirmation form .cancel-link:active,
.delete-confirmation form .cancel-link:focus,
.delete-confirmation form .cancel-link:hover {
    background: var(--close-button-hover-bg);
}

/* POPUP */
.popup #content {
    padding: 20px;
}

.popup #container {
    min-width: 0;
}

.popup #header {
    padding: 10px 20px;
}

/* PAGINATOR */

.paginator {
    font-size: var(--body-fontsize);
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 22px;
    margin: 0;
    border-top: 1px solid var(--hairline-color);
    width: 100%;
}

.paginator a:link, .paginator a:visited {
    padding: 2px 6px;
    background: var(--button-bg);
    text-decoration: none;
    color: var(--button-fg);
}

.paginator a.showall {
    border: none;
    background: none;
    color: var(--link-fg);
}

.paginator a.showall:focus, .paginator a.showall:hover {
    background: none;
    color: var(--link-hover-color);
}

.paginator .end {
    margin-right: 6px;
}

.paginator .this-page {
    padding: 2px 6px;
    font-weight: bold;
    font-size: var(--body-fontsize);
    vertical-align: top;
}

.paginator a:focus, .paginator a:hover {
    color: white;
    background: var(--link-hover-color);
}

.base-svgs {
    display: none;
}

/* Buttons */
.btn.btn-primary {
    font-weight: normal;
    color: var(--button-fg) !important;
    background-color: var(--button-bg);
    border-color: var(--button-bg);
    font-size: var(--body-fontsize);
    margin-bottom: 10px;
    font-family: var(--font-family-primary);
}

.btn.btn-primary:hover {
    font-weight: normal;
    color: var(--button-fg);
    background-color: var(--button-hover-bg);
    border-color: var(--button-hover-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn.btn-primary:active,
.btn.btn-primary:focus {
    font-weight: normal;
    color: var(--button-fg) !important;
    background-color: var(--button-hover-bg) !important;
    border-color: var(--button-hover-bg) !important;
    box-shadow: none !important;
}

.btn.btn-primary.dropdown-toggle{
    font-weight: normal;
    color: var(--button-fg);
    background-color: var(--button-bg);
    border-color: var(--button-bg);
}

.btn.btn-primary.dropdown-toggle:hover,
.btn.btn-primary.dropdown-item:hover {
    font-weight: normal;
    color: var(--button-fg);
    background-color: var(--button-hover-bg);
    border-color: var(--button-hover-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn.btn-info {
    font-weight: normal;
    color: var(--primary-fg);
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn-info:hover,
.btn-info:active {
    font-weight: normal;
    color: var(--primary-fg);
    background-color: #5a8537 !important;
    border-color: #5a8537 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

}

.btn.btn-sm.btn-secondary {
    font-size: var(--body-fontsize);
}

.btn-success{
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.btn-success:hover,
.btn-success:active,
.btn-success:focus {
    font-weight: normal;
    color: var(--primary-fg);
    background-color: #5a8537;
    border-color: #5a8537;
}

.btn-danger {
    color: #ffffff;
    background: var(--delete-button-bg);
    border-color: var(--delete-button-bg);
}

.btn-danger:hover {
    font-weight: normal;
    color: var(--primary-fg);
    background-color: var(--delete-button-hover-bg) !important;
    border-color: var(--delete-button-hover-bg) !important;
}

/* Header bar */

.navbar-header {
    color: var(--text-color);
    font-weight: bolder;
    font-size: var(--h3-fontsize);
    font-family: var(--font-family-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
}

.navbar.default-layout .navbar-menu-wrapper .navbar-nav .nav-item .nav-link .profile-text {
    font-size: var(--body-fontsize);
}

.profile-text,
.mdi.mdi-help-circle-outline,
.icon-menu,
.mdi-menu,
.navbar.default-layout .navbar-menu-wrapper{
    color: var(--text-color);
}

.navbar.default-layout .navbar-brand-wrapper {
    background: var(--primary);
}

/* Tables */
.table thead th {
    font-weight: bolder;
    font-size: var(--body-fontsize);
    font-family: var(--font-family-primary);
}

.table td {
    font-size: var(--body-fontsize);
    font-weight: lighter;
}

.card-title {
    font-weight: normal;
    font-size: var(--h5-fontsize);
    font-family: var(--font-family-primary);
}

.table-responsive {
    overflow-x: auto;
    max-width: 100%;
}

/* Side bar */

.sidebar .nav .nav-item .nav-link .menu-icon {
    font-size: 18px !important;
}

profile-name {
    font-size: var(--h5-fontsize);
}

.sidebar .nav .nav-item.nav-profile .nav-link .user-wrapper .text-wrapper .profile-name {
    color: var(--text-color)
}

.sidebar .nav .nav-item .nav-link .menu-title {
    font-size: var(--body-fontsize);
    font-weight: normal;
    color: var(--text-color) !important;
}

.sidebar {
    background: var(--primary);
}

.sidebar .nav .nav-item .nav-link .menu-icon,
.nav-item:hover{
    color: var(--secondary) !important;
}

.nav .nav-item, .navbar-nav .nav-item {
    color: var(--secondary) !important;
}

.sidebar .nav:not(.sub-menu) > .nav-item:hover:not(.nav-profile) > .nav-link {
    background: var(--button-hover-bg);
    color: var(--secondary);
}

.sidebar .nav.sub-menu,
.sidebar .nav .nav-item.active > .nav-link {
    background-color: var(--primary);
}

.sidebar .nav.sub-menu .nav-item .nav-link:hover {
    background: var(--button-hover-bg);
    outline: none;
}

.sidebar .nav.sub-menu .nav-item .nav-link {
    color: var(--text-color);
    background-color: var(--primary);
}

.sidebar-icon-only .sidebar .nav .nav-item.hover-open .nav-link .menu-title {
    background: var(--button-hover-bg);
    color: var(--text-color);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.sidebar-icon-only .sidebar .nav .nav-item.hover-open .nav-link .menu-title:hover {
    background: var(--button-hover-bg);
    color: var(--text-color);
}

.nav.sub-menu li {
    list-style: none;
}

.sidebar-icon-only .sidebar .nav.sub-menu .nav-item .nav-link {
    text-align: left;
    vertical-align: middle;
    color: #4a4a4a;
    height: 50px;
    background: var(--button-hover-bg);
}

.sidebar .nav .nav-item .collapse.show, .sidebar .nav .nav-item .collapsing {
    background: var(--button-hover-bg);
}

.sidebar .nav .nav-item.nav-profile .nav-link .user-wrapper .text-wrapper {
    margin-left: 0;
}

.sidebar .nav .nav-item .nav-link i.menu-arrow:before {
    color: var(--secondary);
}

.sidebar-icon-only .sidebar .nav .nav-item.hover-open .collapse, .sidebar-icon-only .sidebar .nav .nav-item.hover-open .collapsing {
    padding: 0 0;
}

.sidebar-icon-only .sidebar .nav .nav-item.hover-open .nav-link[data-toggle=collapse] .menu-title {
    background: var(--button-hover-bg);
}

.sidebar-icon-only .sidebar .nav .nav-item.hover-open .collapse, .sidebar-icon-only .sidebar .nav .nav-item.hover-open .collapsing {
    background: var(--button-hover-bg);
    padding: 0 0;
}

.sidebar-icon-only .sidebar .nav.sub-menu {
    background: var(--button-hover-bg);
}

/* Paragraphs and labels */

p {
    font-size: var(--h5-fontsize);
}

.form-group label {
    font-size: var(--h5-fontsize);
    vertical-align: middle;
}

/* Input */

input[type="checkbox"] {
    transform: scale(1.375);
    vertical-align: middle;
    margin-top: 0px;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="text"],
.form-control {
    border: 1px solid #f2f2f2;
    font-size: var(--body-fontsize);
}

input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="text"]:focus,
.form-control:focus {
    border-color: var(--body-quiet-color); /* Set the desired border color */
    /* Additional styles */
}

.form-control, .form-control.form-control-lg, option {
    font-size: var(--body-fontsize);
    font-family: var(--font-family-primary);
    color: var(--body-fg)
}

/* Popups */

.badge {
    font-size: var(--body-font-size);
}

span.area-msg {
    font-size: var(--body-font-size);
}

.btn.btn-sm {
    font-size: var(--body-font-size);
}

/* Previews */

.preview-note {
    padding-left: 5%;
    font-size: var(--body-fontsize);
    font-weight:100;
    color: var(--body-quiet-color)
}

/* Leaflet map */

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
    flex-direction: column;
    display: flex;
}

.leaflet-control-zoom-out {
    margin-bottom: 4px;
}

.leaflet-touch .leaflet-bar a:first-child,
.leaflet-touch .leaflet-bar a:last-child {
    color: var(--body-quiet-color);
    transform: scale(1.25);
    border-radius: 2px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.leaflet-touch .leaflet-bar a:last-child {
    margin-bottom: 0px;
}

.leaflet-draw-actions li:first-child a,
.leaflet-touch .leaflet-draw-actions a,
.leaflet-draw-actions li:last-child a {
    color: var(--primary-fg);
    font-size: var(--body-font-size);
    font-family: var(--font-family-primary);
    font-weight: normal;
}

.leaflet-draw-actions li:first-child a:hover,
.leaflet-touch .leaflet-draw-actions a:hover,
.leaflet-draw-actions li:last-child a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
    font-weight: normal;
}

.leaflet-control-attribution a,
.leaflet-control a {
    font-size: small; /* Set the font size to smaller */
}

/* Companies list page */

a.company-link {
    font-size: var(--h1-fontsize);
}

/* Modals */

label {
    font-family: var(--font-family-primary);
    color: var(--body-fg);
}

.modal-title {
    color: var(--body-fg);
    font-family: var(--font-family-primary);
}

.icon-success {
    color: var(--success-ls);
}

.icon-danger {
    color: var(--danger);
}

.text-success-ls {
    color: var(--success-ls);
}

.modal-info-icon {
    position: absolute;
    bottom: 15px;
    left: 15px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--success-ls);
    z-index: 1052;
}

.modal-info-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    width: 90%;
    max-width: 550px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 1051;
}

.modal-info-overlay p {
    margin-bottom: 6px;
    line-height: 1.4;
}

.modal-info-overlay i {
    color: var(--success-ls);
    margin-right: 6px;
}
