:root {
    --sb5-bg-alternate: #f9f9f9;
    --sb5-bg-handle: #dddddd;
    --sb5-bg-handle-hover: #d1d1d1;

    /* Custom graph color palette */
    --color-1: #0d6efd; /* blue */
    --color-2: #dc3545; /* red */
    --color-3: #198754; /* green */
    --color-4: #fd7e14; /* orange */
    --color-5: #20c997; /* teal */
    --color-6: #6f42c1; /* purple */
}

[data-bs-theme=dark] {
    --sb5-bg-alternate: #30374a;
    --sb5-bg-handle: #252b37;
    --sb5-bg-handle-hover: #1f242e;
}

.text-1 { color: var(--color-1); }
.bg-1 { background-color: var(--color-1); }
.text-2 { color: var(--color-2); }
.bg-2 { background-color: var(--color-2); }
.text-3 { color: var(--color-3); }
.bg-3 { background-color: var(--color-3); }
.text-4 { color: var(--color-4); }
.bg-4 { background-color: var(--color-4); }
.text-5 { color: var(--color-5); }
.bg-5 { background-color: var(--color-5); }
.text-6 { color: var(--color-6); }
.bg-6 { background-color: var(--color-6); }




svg.danger {
    stroke: var(--bs-danger);
}

svg.success {
    stroke: var(--bs-success);
}

svg.info {
    stroke: var(--bs-info);
}

svg.primary {
    stroke: var(--bs-primary);
}

.offcanvas.offcanvas-top {
    bottom: auto;
}

form .separator .card-title {
    padding-top: 1rem;
}

form .separator:first-child .card-title {
    padding-top: 0;
}


.with-indicator { position: relative; }
.with-indicator .indicator {
    background: #3f80ea;
    border-radius: 50%;
    box-shadow: 0 .1rem .2rem rgba(0,0,0,.05);
    color: #fff;
    display: block;
    font-size: .675rem;
    height: 18px;
    padding: 1px;
    position: absolute;
    right: -8px;
    text-align: center;
    top: -8px;
    transition: top .1s ease-out;
    width: 18px;
}

#drop-zone {
    position: relative;
}

#preview-img {
    object-fit: cover;
    aspect-ratio: 1/1;
}

#drop-zone.hover img {
    filter: blur(3px);
}

#drop-zone .loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
}

.list-group-item.active {
    z-index: 1;
}

.tab-drop-zone {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    border: 2px dashed var(--bs-highlight-color);
    border-radius: 5px;
    text-align: center;
    margin: auto;
    background-color: var(--bs-card-color);
    cursor: pointer;
}
.tab-drop-zone.dragover {
    border-color: var(--bs-primary-subtle);
    background-color: var(--bs-card-color);
    color: var(--bs-primary);
}
.file-preview-item img {
    width: 120px;
    object-fit: cover;
    aspect-ratio: 1/1;
    margin-bottom: 10px;
}

.sq-150 {
    width: 150px;
}

.sq-150 img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.pointer {
    cursor: pointer;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    width: 100%!important;
}

.select2-container {
    width: 100% !important;
}

/**
 * Nestable Draggable Handles
 */

.dd {
    max-width: 100%;
}

.dd-placeholder {
    background: var(--bs-border-color);
}

.dd3-content {
    display: block;
    position: relative;
    height: 40px;
    margin: 10px 0;
    padding: 10px 10px 10px 60px;
    color: var(--bs-card-color);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--bs-border-color);
    background: var(--sb5-bg-alternate);
    -webkit-border-radius: 3px;
    border-radius: 3px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.dd-dragel > .dd3-item > .dd3-content {
    margin: 0;
}

.dd3-item > button {
    margin-left: 40px;
    margin-top: 10px;
}

.dd3-handle {
    position: absolute;
    margin: 0;
    left: 0;
    top: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    text-indent: 30px;
    white-space: nowrap;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    background: var(--sb5-bg-handle);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    z-index: 1;
}

.dd3-handle:before {
    content: '≡';
    display: block;
    position: absolute;
    left: 0;
    top: 8px;
    width: 100%;
    text-align: center;
    text-indent: 0;
    color: var(--bs-dark);
    font-size: 20px;
    font-weight: normal;
}

.dd3-handle:hover {
    background: var(--sb5-bg-handle-hover);
}

.ent-sett-box tr td:nth-child(3) {
    color: var(--bs-primary);
}

/* Pulsating dot for map marker */
.pulsating-dot {
    width: 15px;
    height: 15px;
    background-color: #FF0000;
    border-radius: 50%;
    position: relative;
    animation: pulse 1.5s infinite;
    translate: 0% 50%;
}

.form-select-lg {min-height: calc(2px + 2.44375rem);}

@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.5);
        opacity: 1;
    }
}

@media screen and (min-width: 768px) and (max-width: 1439px) {
    .list-group.page-menu { flex-direction: row; gap: 10px; }
    .list-group.page-menu .list-group-item { border-width: 1px; }
    .list-group.page-menu .list-group-item:last-child, .list-group.page-menu .list-group-item:first-child { border-radius: 0; }
}