/* CUSTOM */

/* mark required tag-labels */
div:has(.dc-tag[required]) > label:after {
    content: "*";
    color: red;
}

/* bootstrap5: default background for modal-header */
.modal .modal-header { background: var(--bs-primary-bg-subtle); }

/* bootstrap5: DanCon.tooltip (changes done here have to be done in custom.min.css for BS4-layoutv2 as well) */
.tooltip-text-primary { --bs-tooltip-color: var(--bs-primary); }
.tooltip-text-secondary { --bs-tooltip-color: var(--bs-secondary); }
.tooltip-text-success { --bs-tooltip-color: var(--bs-success); }
.tooltip-text-danger { --bs-tooltip-color: var(--bs-danger); }
.tooltip-text-warning { --bs-tooltip-color: var(--bs-warning); }
.tooltip-text-info { --bs-tooltip-color: var(--bs-info); }
.tooltip-text-light, .tooltip { --bs-tooltip-color: var(--bs-light); }
.tooltip-text-dark { --bs-tooltip-color: var(--bs-dark); }
.tooltip-text-black { --bs-tooltip-color: var(--bs-black); }
.tooltip-text-white { --bs-tooltip-color: var(--bs-white); }
.tooltip-text-transparent { --bs-tooltip-color: var(--bs-transparent); }
.tooltip-bg-primary { --bs-tooltip-bg: var(--bs-primary); }
.tooltip-bg-secondary { --bs-tooltip-bg: var(--bs-secondary); }
.tooltip-bg-success { --bs-tooltip-bg: var(--bs-success); }
.tooltip-bg-danger { --bs-tooltip-bg: var(--bs-danger); }
.tooltip-bg-warning { --bs-tooltip-bg: var(--bs-warning); }
.tooltip-bg-info { --bs-tooltip-bg: var(--bs-info); }
.tooltip-bg-light { --bs-tooltip-bg: var(--bs-light); }
.tooltip-bg-dark { --bs-tooltip-bg: var(--bs-dark); }
.tooltip-bg-black { --bs-tooltip-bg: var(--bs-black); }
.tooltip-bg-white { --bs-tooltip-bg: var(--bs-white); }
.tooltip-bg-transparent { --bs-tooltip-bg: var(--bs-transparent); }
.tooltip { --bs-tooltip-max-width: 480px; --bs-tooltip-padding-y: .1em; --bs-tooltip-opacity: .95; --bs-tooltip-bg: var(--bs-gray-700); }

/* bootstrap5: vertical tabs */
.nav-tabs-vertical .nav-tabs {
    border-bottom-color: transparent;
}
.nav-tabs-vertical .nav-tabs .nav-link, .nav-tabs-vertical .flex-fill {
    border: 1px solid transparent;
    border-right-color: #dee2e6;
    border-top-right-radius: 0;
    border-bottom-left-radius: var(--bs-nav-tabs-border-radius);
}
.nav-tabs-vertical .nav-tabs .nav-item.show .nav-link, .nav-tabs-vertical .nav-tabs .nav-link.active {
    border-color: #dee2e6 #fff #dee2e6 #dee2e6;
}
/* horizontal line top of content-div
.nav-tabs-vertical + .float-start {
    border: 1px solid transparent;
    border-top-color: #dee2e6;
}*/

/* custom rules of layout v1/v2 still used in v3 */
body {
    padding-left: 10px;
    padding-right: 10px;
    font-family: "Lato", sans-serif;
}
.globallogo {
    margin-top: -10px;
}
thead {
    font-size: 16px;
}
tbody {
    font-size: 14px;
}
form {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* icon in full-calendar for events with attachments */
.fc-title .attachment-icon {
    position: absolute;
    right: 0;
    top: 0;
    padding: 0 1px 0 1px;
}
.fc-list-item-title .attachment-icon {
    margin-left: 6px;
}

/* fix: no margin-y in modal-forms */
.modal form {
    margin-top: 0;
    margin-bottom: 0;
}

/* FIXES */

/* bootstrap 5: stop default link color to be stronger than link-<color> in wrapper */
a {
    color: inherit;
}

/* bootstrap 5: alerts (only used in header) with less padding and round corners at bottom only */
.alert {
    padding: .75rem 1.25rem;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* bootstrap 5: readonly input looking like disabled */
.form-control:not(select):read-only {
    background-color: #e9ecef;
    opacity: 1;
}
.form-control:not(select):focus:read-only {
    background-color: #e9ecef;
    border-color: #ced4da;
    box-shadow: none;
}

/* select2 with bootstrap 5: multiple select2 uses with 100% if in input-group and goes in new line if there is input-group-text */
.input-group .select2 {
    width: 50% !important;
}
/* select2 with bootstrap 5: fontsize too big in multiple selections */
.select2-selection--multiple .select2-selection__choice__remove {
    width: auto !important;
    height: auto !important;
}
.select2-selection--multiple .select2-selection__choice {
    font-size: .85rem !important;
    padding-top: .2em !important;
    padding-bottom: .1em !important;
} 
/* select2 with bootstrap 5: box-shadow includes dropdown */
.select2-container--bootstrap-5.select2-container--focus .select2-dropdown,
.select2-container--bootstrap-5.select2-container--open .select2-dropdown {
    border-color: #86b7fe;
    box-shadow: 0 0.5rem 0 0.25rem rgba(13, 110, 253, 0.25);
}
/* select2 with bootstrap 5: dont select first option when clearing multiple */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear {
    top: 1rem;
    right: .4rem;
}

/* datatables resizePage + scrollX: avoid endless resizing-loop */
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
    overflow-x: scroll !important;
}

/* datatables footer below scrollbar: avoid being too narrow */
.dataTables_scrollFootInner {
    width: 100% !important;
}
