/* *********** *
 * Page layout *
 * *********** */
html, body {
    height: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion) {
    html, body {
        scroll-behavior: auto;
    }
}

body{
    background-color: #7c868e;
    background-image: repeating-linear-gradient(135deg, rgba(136,143,150,.4), rgba(126,133,140,.4) 5px, rgba(136,143,150,.4) 10px);
}

#footer {
    margin-top: 20px;
    font-size: 85%;
    color: #ccc;
    text-align: center;
    margin-bottom: 20px;
}

.page {
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    padding-top: 10px;
    padding-bottom: 25px;
    border: solid 1px #ddd;
    border-top-style: none;
    position: relative;
    min-height: 480px;
}
.page:before {
    position: absolute;
    height: 420px;
    width: 50px;
    top: 65px;
    left: -60px;
    content: " ";
    background: url(dots.png);
}
.logo {
    display: inline-block;
    padding-right: 1em;
}
.logo img {
    max-width: 100%;
}

.only-print {
    display: none;
}

/* ********************** *
 * Bootstrap enhancements *
 * ********************** */
.has-success .help-block.no-color,
.has-warning .help-block.no-color,
.has-error .help-block.no-color {
    color: #737373;
}
.input-group .form-control {
    /* Prevent creating a Stacking Context (see ), which prevents embedded selectize.js dropdowns from laying on top */
    z-index: auto;
}
.input-group-addon {
    font-size: 13px;
}
.input-group-addon:last-child .btn {
    /* dirty workaround. Normally you should choose input-group-btn */
    margin: -5px -10px;
    border-radius: 0 3px 3px 0;
}
.input-group-addon label {
    margin-bottom: 0;
}
.input-group, .input-group > *, .input-group-btn>.btn {
    height: 100%;
}
.alert-info a {
    text-decoration: underline;
}
.alert-info a:hover, .alert-info a:focus, .alert-info a.btn {
    text-decoration: none;
}
.form-group.alert {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    & label {
        font-weight: bold;
    }
}
.table-slim {
    width: auto;
}
.table-layout-fixed {
    table-layout: fixed;
}
.table-log {
    margin-bottom: 0;
}
.col-border-right {
    border-right: 2px solid #ddd
}
.crosstable {
    width: unset;
}
.crosstable>tbody>tr>td, .crosstable>tfoot>tr>td,
.crosstable>tfoot>tr>th, .crosstable>thead>tr>td, .crosstable>thead>tr>th {
    text-align: right;
    min-width: 3em;
}
.crosstable>tbody>tr>th {
    text-align: center;
    min-width: 3em;
}
.input-slim, .input-group>.input-slim {
    width: auto;
}
.input-slim {
    display: inline-block;
}
.table-stats>tbody>tr>td, .table-stats>tfoot>tr>td, .table-stats>thead>tr>td {
    min-width: 4em;
}
.table-superdense>tbody>tr>td, .table-superdense>tbody>tr>th, .table-superdense>tfoot>tr>td,
.table-superdense>tfoot>tr>th, .table-superdense>thead>tr>td, .table-superdense>thead>tr>th {
    padding: 3px;
}
.table>tbody>tr>td.indent, .table>tbody>tr>th.indent {
    border-top-style: none;
    width: 20px;
}
table>tbody>tr.no-upper-border>td {
    padding-top: 0 ;
    border-top-style: none ;
}
.aggregate-footer {
    border-top: solid 2px #999;
}
.aggregate-footer>tr {
    background-color: #f5f5f5;
}
.aggregate-footer>tr:hover {
    background-color: #ffffff;
}
ul.slim {
    padding-left: 15px;
}
.details-list {
    list-style-type: none;
}
.details-list > li > details >  summary {
    margin-left: -15px;
}
.list-group.nosp {
    margin-bottom: 5px;
}
.list-group-item {
    padding: 7px 8px;
}
.list-group-item-muted {
    color: #777;
    background-color: #eee;
}
.list-group-item-muted .text-unmuted {
    /* TODO: replace this with the --bs-* variable for text color in bootstrap 4/5 */
    color: #333;
}
.list-group-item-muted a:not(.btn), .text-muted a, a.text-muted {
    color: #96b4cd;
}

.list-group-condensed .list-group-item {
    padding: 4px 6px;
}
.list-group-item.row, .panel-body.row {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}
.list-group-item dl {
    margin-bottom: 0;
}
.list-group-hover .list-group-item:hover{
    background-color: #f5f5f5;
}
.form-group.bg-success {
    margin-left: -19px;
    border-left: solid 4px #3c763d;
    background-color: #a4eba4;
    background-image: linear-gradient(to right, #a4eba4 0, #fff 50%);
}
.form-group.multiset-input {
    padding: 5px;
    margin-bottom: 2px;
}
.form-control-nosp {
    /* negative help-block margin */
    margin-bottom: -5px;
}
.help-block {
    margin-bottom: 6px;
    color: inherit;
    &.no-color {
        color: #737373;
    }
}
hr.strong {
    border-top: 1px solid #ddd;
}
hr.info {
    border-top: 2px solid #d9edf7;
}
h4, .h4, h5, .h5, h6, .h6 {
    font-weight: bold;
    margin-top: 12px;
    margin-bottom: 6px;
}
h4.heading-underline, h5.heading-underline, h6.heading-underline,
h4.panel-title, h5.panel-title, h6.panel-title {
    font-weight: inherit;
}
@media (max-width: 767px) {
    h2.heading-responsive {
        font-size: 20px;
        margin-top: 10px;
    }
}
@media (max-width: 767px) {
    h1 small, h2 small {
        display: block;
    }
}
@media (min-width: 768px) {
    h1 small, h2 small {
        display: inline-block;
    }
}
.checkbox.input-sm {
    padding: 6px 10px;
    margin: 0;
}
.fw-bold {
    font-weight: bold;
}

.panel-condensed>.panel-heading {
    padding: 8px 10px;
}
.panel-condensed>.panel-heading>.panel-title {
    font-size: 14px;
}
.panel-condensed>.panel-body {
    padding: 10px;
}

/* buttons take a little more vertical space than headings */
.panel-heading>.btn.pull-right + h3.panel-title {
    padding: 2px;
}
.panel-body:empty {
    display: none;
}

.checkbox input[type="checkbox"], .checkbox, input[type="checkbox"],
.radio input[type="radio"], .radio, input[type="radio"] {
    vertical-align: middle;
    position: relative;
    bottom: 3.5px;
}

/* Better definition lists */
dd {
    margin-left: 20px;
}
@media (min-width: 500px) {
    .dl-horizontal dd {
        margin-left: 180px;
    }
    .dl-horizontal dt {
        float: left;
        width: 160px;
        overflow: hidden;
        clear: left;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
dd>*:first-child {
    margin-top: 0;
}
dl.dl-sparse dd {
    margin-bottom: 5px;
}

/* Proper summaries */
summary {
    display: list-item;
}

summary.btn {
    display: list-item;
    width: fit-content;
}

/* List group responsive tear down */
@media (max-width: 991px) {
    .list-group.tear-down {
        margin-bottom: 8px;
    }
    .list-group.tear-down>.list-group-item, .list-group.tear-down>button.list-group-item {
        font-size: .9em;
        border-radius: 4px;
        display: inline-block;
        margin-bottom: 4px;
        padding: 6px 10px;
        width: auto;
    }
}

/* no-space and more-space classes */
p.nosp, .form-group.nosp {
    margin-bottom: 0;
}
h1.nosp,h2.nosp,h3.nosp,h4.nosp,h5.nosp {
    margin-top: 0;
}
h2.mosp {
    margin-top: 30px;
}
h3.mosp {
    margin-top: 24px;
}
hr.nosp {
    margin-top: 5px;
    margin-bottom: 5px;
}
label.nosp {
    margin-bottom: 0;
}
.strip-space>.radio:first-child, .strip-space>.checkbox:first-child  {
    margin-top: 0;
}
.strip-space>.radio:last-child, .strip-space>.checkbox:last-child {
    margin-bottom: 0;
}
h4.mosp,h5.mosp {
    margin-top: 20px;
}
dl.mosp {
    margin-top: 30px;
    margin-bottom: 30px;
}
div.mosp {
    margin-top: 5px;
}
ul.nosp, ol.nosp {
    margin-bottom: 0;
}
.nav.nav-tabs.mosp {
    margin-bottom: 20px;
}
.panel.mosp {
    margin-top: 20px;
}
.form-group.mosp {
    margin-top: 16px;
}
.btn.mosp, img.mosp {
    margin-bottom: 5px
}
.panel-body>:last-child, .panel-body>:last-child.row>[class*="col-"]>:last-child {
    margin-bottom: 0;
}
.strip-inner-space>:first-child {
    margin-top: 0;
}
.strip-inner-space>:last-child {
    margin-bottom: 0;
}
ul.spaced li {
    margin-bottom: 5px;
}
ul.spaced li:last-child {
    margin-bottom: 0px;
}

/* Main navbar */
.navbar {
    border-radius: 0;
    margin: 0 -25px 10px -25px;
    padding: 0 10px 0 10px;
    box-shadow: 0 0 15px rgba(63,63,63,0.2);
    z-index: 2;
}
.navbar-default {
    background-color: #f0f0f0;
    border-color: #e7e7e7;
}
.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover {
    color: #555;
    background-color: #e0e0e0;
}
.navbar.navbar-inverse:before {
    border-bottom-color: #555;
}
.navbar-form .navbar-text {
    margin: 7px 15px;
}
.navbar-nav>li>a.btn {
    padding: 5px 10px;
    margin: 10px 5px;
}
.navbar-collapse.collapse .navbar-form .navbar-text, .navbar-collapse.collapsing .navbar-form .navbar-text {
    display: inline-block;
}
@media (max-width: 782px) {
    .navbar {
        margin: 0 -15px 10px -15px;
        padding: 0;
    }
}
@media (max-width: 767px) {
    .navbar-form {
        margin-right: 0;
        margin-bottom: 0;
        margin-top: -8px;
        border-top: none;
    }
}
.navbar-collapse-header {
    float: left;
    height: 50px;
    padding: 15px 15px;
    font-size: 18px;
    line-height: 20px;
    margin: 0;
}
@media (min-width: 768px) {
    .navbar-collapse-header {
        display: none;
    }
}

/* Title header and breadcrumb bar */
h1.title {
}
.breadcrumb {
    font-size: 0.9em;
}
@media (min-width: 992px) {
    .breadcrumb-hanging {
        margin-top: -10px;
        padding: 10px 12px 8px;
        border-radius: 0 0 4px 4px;
    }
}

/* Tabs in Panel Header */
.panel-heading {
    position: relative;
}
.panel-heading .nav-tabs {
    position: absolute;
    right: 0;
    bottom: 0;
    border-bottom: none;
}
.panel-heading .nav-tabs>li>a {
    padding: 6px 10px;
    border-bottom: none;
}
.panel-heading .nav-tabs>li.active>a {
    border-bottom: none;
}
.panel-heading .nav-tabs>li>a:hover {
    background: rgba(240,240,240,0.3);
    border-bottom: none;
}
.panel-primary .panel-heading .nav-tabs>li>a {
    color: #fff;
}
.panel-primary .panel-heading .nav-tabs>li.active>a {
    background: #fff;
    color: #337ab7;
}
.tab-container .nav-tab-error {
    display: none;
}


/* Helper classes */
.float-along {
    display: block;
    overflow: hidden;
}
.text-right-responsive {
    text-align: center;
}
@media (min-width: 768px) {
    .pull-right-responsive {
        float: right;
        margin-left: 20px;
    }
    .text-right-responsive {
        text-align: right;
    }
}
.float-right {
    float: right;
}
.align-top {
    vertical-align: top;
}

.row:has(> .float-bottomright) {
    position: relative;
}

.float-bottomright {
    position: absolute;
    right: 15px;
    bottom: 0;
}

.text-italic {
    font-style: italic;
}

/* Hide Arrows in number fields. (https://www.w3schools.com/howto/howto_css_hide_arrow_number.asp) */
/* Chrome, Safari, Edge, Opera */
input[type=number].no-number-arrows::-webkit-outer-spin-button,
input[type=number].no-number-arrows::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Firefox */
input[type=number].no-number-arrows {
  -moz-appearance: textfield;
}

/* Selectize Bootstrap enhancements */
.selectize-dropdown, .selectize-input, .selectize-input input {
    line-height: 18px;
}
.selectize-input {
    min-height: 30px;
    padding: 5px 12px;
}
.selectize-input input {
    line-height: 18px;
}
.selectize-control.input-slim {
    vertical-align: top;
    line-height: 0.5;
}
.selectize-control .selectize-input.disabled {
    cursor: not-allowed !important;
    background-color: #eee;
    opacity: 1;
}
.selectize-control.input-slim .selectize-input {
    min-width: 128px;
}
.selectize-control.input-sm .selectize-input {
    min-height: 28px;
    padding: 3px 12px;
}
.selectize-control.input-sm .selectize-input.has-items {
    padding: 2px 9px;
    min-height: 28px;
}
.selectize-control.multi.input-sm .selectize-input.has-items {
    padding: 2px 6px 0;
}
.selectize-control.multi.input-sm .selectize-input > div {
    margin: 0 3px 3px 0;
}
.has-success .selectize-input {
    border-color: #3d763d;
}
.input-group .selectize-control:not(:last-child) .selectize-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group .selectize-control:not(:nth-child(2)) .selectize-input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group .selectize-control {
    line-height: 0;
}
.selectize-dropdown .option .meta {
    font-size: 85%;
    color: #777;
}
.selectize-dropdown .option.selected .meta {
    color: #ddd;
}
.selectize-dropdown-content {
    max-height: max(50vh, 300px);
}
.selectize-dropdown .optgroup-header {
    color: revert;
    font-weight: bold;
    font-size: revert;
}
.selectize-dropdown .optgroup .option {
    padding-left: 24px;
}
.selectize-dropdown .optgroup::before {
    margin: 2px 0;
}
.selectize-dropdown .optgroup:has(+ .option)::after {
    content: ' ';
    display: block;
    height: 1px;
    margin: 2px -12px;
    background-color: #e5e5e5;
}

/* ************* *
 * Extra styling *
 * ************* */
/* Mode for OFFLINE_DEPLOYMENT and CDEDB_DEV */
body.offline {
    background-color: #284d6b;
}
body.development {
    background-color: #614444;
}

.heading-underline {
    padding-bottom: 2px;
    border-bottom: solid 1px #ddd;
}
.heading-sidebar {
    font-weight: normal;
    font-size: 18px;
    margin: 9px 0;
}
.subtitle {
    font-size: 1.3em;
    margin: -4px 0 10px;
}
.filter-title {
    padding-bottom: 2px;
    border-bottom: solid 2px #ddd;
    font-weight: bold;
    font-size: 1em;
}
/* Generated by python-markdown's toc extension's 'permalink' option
   and also used on the event course list */
a.headerlink {
    margin-left: 10px;
    display: inline;
    color: #777;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s;
}
*:hover > a.headerlink, a.headerlink:focus {
    opacity: 1;
}

.btn-lang-change {
    border: none;
    background: none;
    padding: 0;
    margin: 0 2px;
}

.profilepic {
    max-width: 150px;
}
p.textbox {
    padding: 4px 6px;
    border: dashed 1px #888;
    font-style: italic;
}
.table>tbody>tr.subheading>td, .table>tbody>tr.subheading>th,
.table>tbody>tr.subheading:hover>td, .table>tbody>tr.subheading:hover>th {
    border-bottom: 1px solid #ddd;
    background: #eee;
    font-weight: bold;
}
tr.summary>td, tr.summary>th {
    border-top: 3px double #888;
    font-weight: bold;
}
/* White footer links */
#footer a {
    text-decoration: underline;
    color: inherit;
}
#footer a:hover, #footer a:focus, #footer a.btn {
    text-decoration: none;
}
.candidate:hover {
    opacity: 0.6;
}

.result {
    color: #0f0f0f;
    background-color: #f5f5f5;
    font-size: 12pt;
}

pre.result {
    display: inline-block;
    margin-bottom: 4px;
}

span.result-separator, code.result-separator {
    color: #c7254e;
    background-color: #f5f5f5;
}

/* <details> are clickable, show a cursor */
details summary {
    cursor: pointer;
}

/* query form */
.queryform-fieldbox {
    padding: 0 8px;
    border: solid 1px #ccc;
    border-radius: 3px;
    display: inline-block;
    margin-right: 4px;
    margin-bottom: 4px;
    font-size: 0.9em;
}
.queryform-fieldbox .btn:last-child {
    margin: 0 -8px 0 6px;
}
.queryform-add {
    margin: -10px 0 10px 0;
}

table {
    background: #fff;
}

/* Wide table container */
.table-container {
    padding: 5px 10px 5px 0;
    margin-right: -5px;
    background: #fff;
    display: inline-block;
    min-width: 100%;
}
#wide-content-page {
    display: inline-block;
    background: #fff;
    border: solid 1px #ddd;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    padding: 20px;
    margin: -30px 20px 0 20px;
    position: relative;
    scroll-margin-top: 100px;
}
@media(max-width: 767px) {
    #wide-content-page {
        margin-left: 0;
        margin-right: 0;
    }
}

#wide-content-page table {
    white-space: nowrap;
}

/* list select */
.ls-list:focus {
    outline: none;
}
tr.ls-selected td, tr:target td, .list-group-item:target
{
    background: #f5f5f5;
}
.ls-item {
    border-width: 2px;
    border-style: none solid;
    border-color: transparent;
}
.ls-list:focus tr.ls-item.ls-cursor {
    border-color: #23527c;
}


/* dynamic row js */
tr.drow-new>td {
    background-color: #dff0d8;
}
tr.drow-delete>td {
    background-color: #f2dede;
}
.panel.questionnaire-row-config {
    & .panel-heading {
        background-color: #e8e8e8;
        & .panel-title {
            margin: 5px 0 0;
        }
        & .form-group:has(.input-role) {
            width: 75%;
        }
    }
    & .panel-heading,.panel-body {
        padding: 10px 10px 10px 15px;
    }
    &.questionnaire-row-config-magic .panel-body {
        display: none;
    }
    & .panel-footer {
        padding: 3px 10px 3px 15px;
    }
}
.panel.drow-new {
    border-color: #d6e9c6;
}
.panel.drow-new>.panel-heading, .drow-new .panel>.panel-heading {
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.panel.drow-new>.panel-body, .drow-new .panel>.panel-body {
    background-color: #f0f4ee;
}
.panel.drow-delete, .drow-delete .panel {
    border-color: #ebccd1;
}
.panel.drow-delete>.panel-heading, .drow-delete .panel>.panel-heading {
    background-color: #f2dede;
    border-color: #ebccd1;
}
.panel.drow-delete>.panel-body, .drow-delete .panel>.panel-body {
    background-color: #f3e8e8;
}
.drow-delete {
    & input, & textarea, & select, & label, & h1, & h2, & h3, & h4, & h5, & h6 {
        text-decoration: line-through;
    }
}

/* Profile's past event table */
.past-event-table>tbody>tr:first-child>td {
    border-top: none;
}
@media (min-width: 510px) {
    .past-event-table > tbody > tr > td:first-child {
        min-width: 240px;
    }
}

/* Profile history */
.history-row {
    border-bottom: solid 1px #ddd;
    position: relative;
}
.history-row:nth-child(even) {
    background-color: #eee;
}
.history-row.pending {
    background-color: #d4d4ff;
}
.history-row.superseded {
    background-color: #ffffd4;
}
.history-row.nacked {
    background-color: #ffd4d5;
}
.history-row.displaced {
    background-color: #aaaaff;
}
.history-row.complicated {
    background-color: #ff9900;
}
.history-row.panic {
    background-color: #d9534f;
}
.history-row .collapse-button {
    position: absolute;
    right: 30px;
    top: -15px;
}
.history-row.more {
    text-align: center;
    background: #aaa;
    color: #fff;
    cursor: pointer;
}

/* Pending change view */
.diff-view {
    margin-bottom: 10px;
}
.diff-view label {
    margin-bottom: 0;
}
@media (max-width: 767px) {
    .diff-view label.col-sm-3 {
        margin-top: 5px;
    }
}

/* Batch import */
.batch-line-body {
    padding-left: 10px;
    margin-bottom: 30px;
    border-left: solid 4px #ddd;
}
.money-parse-line {
    padding-left: 10px;
    margin-bottom: 15px;
    border-left: solid 4px #ddd;
}

/* Fancy preferential voting with JavaScript */
.prefvote_container {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.05);
    padding: 0 15px 0 30px;
    position: relative;
    min-height: 140px; /* So .indicator fits into box */
    /* Disable text selection: */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.prefvote_container .indicator {
    position: absolute;
    top: 0;
    right: 100%;
    transform: rotate(-90deg);
    transform-origin: right top;
    padding: 6px 8px;
    font-size: 0.8em;
    white-space: nowrap;
}
.prefvote_stage {
    padding: 6px;
    border: 1px solid #ddd;
    background: #e9e9e9;
    background: -webkit-linear-gradient(top, #eee, #e5e5e5);
    background: -moz-linear-gradient(top, #eee, #e5e5e5);
    background: -o-linear-gradient(top, #eee, #e5e5e5);
    background: linear-gradient(top, #eee, #e5e5e5);
    border-radius: 4px;
    min-height: 30px;
    transition: border .3s;
    position: relative;
    line-height: 1.8em;
}
.prefvote_stage.dragover {
    border-color: #000;
}
.prefvote_container.active .prefvote_stage {
    cursor: pointer;
}
.prefvote_container.active .prefvote_stage:hover {
    border-color: #245782;
}
.prefvote_stage.positive {
    background: #e9ffe9;
    background: -webkit-linear-gradient(top, #eeffee, #e5f8e5);
    background: -moz-linear-gradient(top, #eeffee, #e5f8e5);
    background: -o-linear-gradient(top, #eeffee, #e5f8e5);
    background: linear-gradient(top, #eeffee, #e5f8e5);
}
.prefvote_stage.negative {
    background: #ffe9e9;
    background: -webkit-linear-gradient(top, #ffeeee, #f8e5e5);
    background: -moz-linear-gradient(top, #ffeeee, #f8e5e5);
    background: -o-linear-gradient(top, #ffeeee, #f8e5e5);
    background: linear-gradient(top, #ffeeee, #f8e5e5);
}
.prefvote_stage .label {
    margin-right: 10px;
    float: right;
    font-size: 0.9em;
    color: #888;
}
.prefvote_spacer {
    text-align: center;
    padding-block: .8em;
    position: relative;
}
.prefvote_container.active .prefvote_spacer {
    cursor: pointer;
}
.prefvote_spacer_line {
    /* Use block (top+bottom) border together
    such that the plus icon looks visually centered */
    border-block: dashed 2px rgba(0,0,0,0);
    transition: border .3s, color .3s;
    color: transparent;
    /* Prevent this element from being a drag target
    and thus triggering dragleave on the parent container. */
    pointer-events: none;
}
.prefvote_container.active .prefvote_spacer_line {
    border-color: rgba(0,0,0,.2);
    color: rgba(0,0,0,.2);
}
.prefvote_spacer.dragover .prefvote_spacer_line {
    border-color: rgba(0,0,0,1);
    color: rgba(0,0,0,1);
}
.prefvote_container.active .prefvote_spacer:hover .prefvote_spacer_line {
    border-color: rgba(0,0,0,1);
    color: rgba(0,0,0,1);
}
.prefvote_container.active .prefvote_spacer.positive .prefvote_spacer_line {
    border-color: rgb(131, 192, 151);
    color: rgb(131, 192, 151);
}
.prefvote_container .prefvote_spacer.positive.dragover .prefvote_spacer_line {
    border-color: rgb(0, 240, 6);
    color: rgb(0, 240, 6);
}
.prefvote_container.active .prefvote_spacer.positive:hover .prefvote_spacer_line {
    border-color: rgb(0, 240, 6);
    color: rgb(0, 240, 6);
}
.prefvote_container.active .prefvote_spacer.negative .prefvote_spacer_line {
    border-color: rgb(189, 128, 128);
    color: rgb(189, 128, 128);
}
.prefvote_container .prefvote_spacer.negative.dragover .prefvote_spacer_line {
    border-color: rgb(255, 0, 0);
    color: rgb(255, 0, 0);
}
.prefvote_container.active .prefvote_spacer.negative:hover .prefvote_spacer_line {
    border-color: rgb(255, 0, 0);
    color: rgb(255, 0, 0);
}
.prefvote_spacer_plus {
    position: absolute;
    translate: 0 -50%;
    /* inline padding and bg white cause the dashed line to be hidden
    which would otherwise look visually noisy */
    background-color: white;
    padding-inline: 2px;
}
.prefvote_spacer:focus, .prefvote_stage:focus {
    outline: none;
}
.prefvote_spacer:focus:after, .prefvote_stage:focus:after {
    content: "";
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #ccc;
    position: absolute;
    left: -8px;
    top: 50%;
    margin-top: -8px;
}
.prefvote_candidate {
    background: rgba(175,175,175,.5);
    border: 1px solid rgba(127,127,127,.2);
    border-radius: 3px;
    padding: 4px 8px;
    cursor: default;
    white-space: nowrap;
}
.prefvote_candidate.active {
    background: rgba(47,112,168,.7);
    color: #fff;
}

[draggable] {
    cursor: move;
}

/* Fancy row sorting with JavaScript
   Quite similar to preferential voting. */
.orderrow-container {
    border: solid 1px #ddd;
    border-radius: 4px;
    padding: 0 6px 11px 6px;
    margin-bottom: 10px;
    max-width: 500px;
}
.orderrow-outer {
    padding-top: 9px;
    position: relative;
}
.orderrow-container.active .orderrow-outer, .orderrow-container.active .orderrow-inner {
    cursor: pointer;
}
.orderrow-outer:focus {
    outline: none;
}
.orderrow-outer:focus:after {
    content: "";
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #ccc;
    position: absolute;
    left: -8px;
    top: 50%;
    margin-top: -4px;
}
.orderrow-outer:before {
    content: ' ';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    box-sizing: border-box;
    border-bottom: dashed 3px rgba(0,0,0,0);
    transition: border-color .3s;
}
.orderrow-outer.dragover:before {
    border-bottom-color: rgba(0,0,0,1);
}
.orderrow-container.active .orderrow-outer:before {
    border-bottom-color: rgba(0,0,0,.2);
}
.orderrow-container.active .orderrow-outer:hover:before {
    border-bottom-color: rgba(36,87,130,1);
}
.orderrow-inner {
    border: solid 1px rgba(0,0,0,0);
    border-radius: 3px;
    transition: border-color .3s, background-color .3s;
    padding: 4px 6px;
    cursor: default;
    /* Disable text selection: */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.orderrow-inner:hover {
    border-color: rgba(0,0,0,.3);
}
.orderrow-outer.active .orderrow-inner {
    background-color: rgba(51,122,183,.2);
    border-color: rgba(51,122,183,.3);
}
.orderrow-outer.dragover .orderrow-inner:hover, .orderrow-container.active .orderrow-inner:hover {
    border: solid 1px rgba(0,0,0,0);
}
.orderrow-indicator {
    float: right;
    margin-left: 10px;
    padding-top: 3px;
}
.orderrow-indicator .label {
    vertical-align: top;
}
.miniature-heading {
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: solid 1px #ddd;
    margin-bottom: 2px;

    & ~ .miniature-heading {
        margin-top: 12px;
    }

    &.small {
        font-size: .9em;
        border-bottom: none;
    }
}
.miniature-md {
    border: dashed 1px #aaa;
    border-radius: 3px;
    margin-bottom: 3px;
    font-size: 0.8em;
    max-height: 8em;
    overflow: scroll;
    padding: 1px 6px;

    & pre {
        font-size: inherit;
    }
}
.miniature-label {
    font-size: 0.8em;
    font-weight: bold;
    width: 112px;
    margin-right: 8px;
    float: left;
    padding: 2px 0;
    text-align: right;
    overflow: hidden;
}
.miniature-checkbox {
    margin-left: 120px;
    font-size: 0.8em;
    padding: 1px;
}
.miniature-content, .miniature-text, .miniature-textarea {
    font-size: 0.8em;
    overflow: hidden;
}
.miniature-text, .miniature-textarea {
    border: solid 1px #ddd;
    border-radius: 3px;
    background-color: #f2f2f2;
    padding: 1px 6px;
}
.miniature-textarea {
    min-height: 40px;
}
.miniature-panel {
    margin-bottom: 0;

    & .panel-heading {
        padding: 2px;
        & .panel-title {
            font-size: 1em;
        }
    }
    & .panel-body {
        padding: 5px;
    }
}


/* Course assignment */
td.b-left, th.b-left {
    border-left: solid 1px #ddd;
}
td.b-right, th.b-right {
    border-right: solid 1px #ddd;
}
.event_course_id {
    display: inline-block;
    background-color: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 1px 4px;
    min-width: 25px;
    text-align: center;
    cursor: default;
}
.event_course_id.nopart {
    color: rgba(255, 255, 255, .8);
    background-color: rgba(45, 129, 156, 0.5);
}
/* For the coloring of course cells to take precedence over the .ls-selected coloring,
   some parent element (usually the <table>) needs to get the .course-colored class
   s.t. this color has higher specificity */
.course-colored .course-primary {
    background-color: #e6e6e6;
}
.course-colored .course-primary.course-too-few, .lodgement-primary.lodge-too-few {
    background-color: #dfd181;
}
.course-colored .course-too-few, .lodgement-too-few {
    background-color: #f2e8b3;
}
.course-colored .course-primary.course-exactly-full, .lodgement-primary.lodge-exactly-full {
    background-color: #99cf99;
}
.course-colored .course-exactly-full, .lodgement-exact-full {
    background-color: #b3f2b3;
}
.course-colored .course-primary.course-cancelled-ok, .lodgement-primary.lodgement-illegal-camping-mat {
    background-color: #b8ceef;
}
.course-colored .course-cancelled-ok, .lodgement-illegal-camping-mat {
    background-color: #ceefff;
}
.course-colored .course-primary.course-too-many, .lodgement-primary.lodgement-too-many {
    background-color: #e08282;
}
.course-colored .course-too-many, .lodgement-too-many {
    background-color: #f2b3b3;
}
.course-colored .course-primary.course-cancelled, .lodgement-primary.lodgement-illegal-mixing {
    background-color: #cb86e6;
}
.course-colored .course-cancelled, .lodgement-illegal-mixing {
    background-color: #e6b3f2;
}
span.color-legend {
    display: inline-block;
    width: 30px;
    height: 1.2em;
    vertical-align: bottom;
    margin-bottom: 2px;
}

/* Finance log style */
tr.money-positive>td {
    background-color: #e9ffe9;
}
tr.money-negative>td {
    background-color: #ffe9e9;
}

/* Event Fees */
tr.eventfee .money-negative {
    /*color: #3c763d;*/
    /*background-color: #dff0d8;*/
    color: #449d44;
    white-space: nowrap;
}
tr.eventfee .money-positive {
    /*color: #31708f;*/
    /*background-color: #d9edf7;*/
}
tr.eventfee .eventfee-personalized {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

/* ************** *
 * Helper classes *
 * ************** */
.softhide {
    /* Similar to bootstrap's .hide but without !important */
    display: none;
}
.p {
    /* Give elements the spacing of a paragraph */
    margin-bottom: 10px;
}
.heading-supplement {
    /* Subheading without to much space above */
    margin-top: -9px;
}
.nowrap {
    white-space: nowrap;
}
.strikethrough {
    text-decoration: line-through;
}
.link-disabled:not(.text-muted,.text-info,.text-warning,.text-danger) {
    /* Make text look like a disabled link */
    color: #777;
}
.link-disabled {
    /* Make text look like a disabled link */
    cursor: not-allowed;
}
.link-hidden {
    /* Make text look like it would not be a link */
    color: inherit;
}
.button-par {
    /* A div containing buttons, which may be wrapped with nice spacing in between */
    margin-bottom: -5px;
}
.button-par.p {
    margin-bottom: 5px;
}
.button-par .btn {
    margin-bottom: 5px;
}
.btn-wrap {
    white-space: normal;
}
.btn-wrap.btn-icon {
    position: relative;
    padding-left: 31px;
}
.btn-wrap.btn-icon>.fa-fw {
    position: absolute;
    top: 50%;
    margin-top: -7px;
    left: 10px;
}
.clickable {
    cursor: pointer;
}
.dummy {
    visibility: hidden;
}
ul.styleless {
    list-style: none;
    padding-left: 15px;
}
.hide-hover {
    /* Hide elements until superior container element is hovered */
    opacity: 0.5;
    transition: opacity 0.3s;
}
.hide-hover-container:hover .hide-hover, .hide-hover:focus {
    opacity: 1;
}

.list-button-float {
    float: right;
    margin-left: 1em;
}

.clearfix-after::after {
    content: '';
    clear: right;
    display: block;
}

.display-inline {
    display: inline;
}

.button-group-below-text {
    margin-top: 5px
}

.clear-both {
    clear: both;
}

.flex-width {
    width: fit-content;
}

/* mark mandatory form fields */
label .required-marker::after, th.required-col::after {
    content: " *";
    color: #a94442;
    position: absolute;
}

/* Display icons in light gray. */
span.fag {
    color: #aaaaaa;
}

/* Classes for dynamically hiding results of the constraint violation filter.
 *
 * Elements with `.maybehide` are hidden by default, but will be displayed
 *  depending on their contents.
 *
 * Elements with `.maybenothide` are shown by default, but are hidden if they are
 *  preceded by a `.maybehide` that is not hidden.
 * In other words they are shown iff all preceding `.maybehide` elements are hidden.
 * They serve as dynamically shown/hidden alt texts to the `.maybehide` elements.
 */

.maybehide {
    display: none;
}
.maybenothide {
    display: block;
}

/* On the global violation summary there are two sections with three layers each.
 *
 * 1. The view by event. This has a list of events with a list of violations each.
 *    The classes are nested like so: .event .violations-list .violations
 *
 * 2. The view by violation class. Each violation class has a list of events.
 *    The outer classes are reversed: .violations-list .event .violations
 *
 * Selector 1 is responsible for showing the violation list inside an event in view 1.
 * Selector 2 is responsible for showing one event for one violation class in view 2.
 * Selector 3 is responsible for showing the outer event in view 1.
 * Selector 4 is repsonsible for showing the outer violation class in view 2.
 *
 * Selectors 1 and 2 are symmetrical, but 3 and 4 are not. This is because the heading
 *  for the violation class in view 2 should become hidden if there are no not-hidden
 *  violations listed for it. On the other hand the event heading in view 1 will stay
 *  visible and an alt-text (.maybenothide) is displayed instead.
 *
 * On the violation pages for individual events a variation of view 1 is used, where
 *  everything is wrapped in an '.event' element without '.maybehide'. This activates
 *  selector 1, because selector 4 would break the view, since the '.violation-list'
 *  elements do not have '.event' descendants. Selector 3 is not needed here.
 */

/* 1 */.event .violation-list.maybehide:not(.softhide):has( .violations:not(.softhide)),
/* 2 */.violation-list .event.maybehide:not(.softhide):has( .violations:not(.softhide)),
/* 3 */.event.maybehide:not(.softhide):has( .violation-list:not( .softhide)),
/* 4 */.violation-list.maybehide:not(.softhide):has( .event:not( .softhide)):has( .violations:not(.softhide)) {
    display: block;

    & ~.maybenothide {
        display: none;
    }
}

/* In modals, main content and note are separate divs to more easily update them
 * programmatically, but should have no visual separation.
 */
#cdedb-modal-content {
    padding-bottom: 0;
}
#cdedb-modal-content-note {
    padding-top: 0;
}

/*
 * the following should be replaced with
 * display: inline-flex; width: auto;
 * in Bootstrap 5
 */
.input-group-inline {
    display: inline-table !important;
    vertical-align: middle !important;
}

.input-group-inline .form-control, .input-group-inline .input-group-btn {
    width: auto !important;
}

.monospace {
    font-family: monospace, monospace;
    white-space: pre-wrap;

    :is(pre)& {
        margin-top: 2px;
        margin-bottom: 2px;
    }
}
