@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

body {
    font-family: 'Rubik', sans-serif;
}

main>.container {
    padding: 70px 15px 20px;
}

.text-xs {
    font-size: 12px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer>.container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after,
a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li>form>button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li>form>button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav>li>form>button.logout:focus,
.nav>li>form>button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav>li>form>button.logout:focus {
    outline: none;
}

.form-group {
    margin-bottom: 1rem;
}

.btn-nostyle {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.table-responsive .dropdown,
.table-responsive .btn-group,
.table-responsive .btn-group-vertical {
    position: static;
}


.table>thead>tr>th:first-child {
    padding-left: 20px;
}

.table>thead>tr>th:last-child {
    padding-right: 20px;
}

.table>tbody>tr>td:first-child {
    padding-left: 20px;
}

.table>tbody>tr>td:last-child {
    padding-right: 20px;
}

.table>thead>tr>th {
    font-weight: 500;
    color: var(--text-dark);
    background-color: var(--bs-gray-100);
}

.table-border-rounded>table {
    margin-bottom: 0 !important;
}

.table-border-rounded {
    border-bottom: transparent !important;
}

.flash {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 10px 20px;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    opacity: 1;
}

.flash.fade-out {
    opacity: 0;
    pointer-events: none;
}

.flash-default {
    border-radius: 5px;
    background-color: var(--bs-gray-100);
    border: var(--bs-gray-300) 1px solid;
}

.flash-success {
    border-radius: 5px;
    background-color: var(--bs-success-bg-subtle);
    border: var(--bs-success) 1px solid;
    color: var(--bs-success);
}

.flash-danger {
    border-radius: 5px;
    background-color: var(--bs-danger-bg-subtle);
    border: var(--bs-danger) 1px solid;
    color: var(--bs-danger);
}

.flash-info {
    border-radius: 5px;
    background-color: var(--bs-info-bg-subtle);
    border: var(--bs-info) 1px solid;
    color: var(--bs-info);
}

.flash-warning {
    border-radius: 5px;
    background-color: var(--bs-warning-bg-subtle);
    border: var(--bs-warning) 1px solid;
    color: var(--bs-warning);
}

@media screen and (max-width: 767px) {
    .flash {
        position: sticky;
    }
}

.search-input {
    border: none;
}

.search-input:focus {
    outline: none;
    border: none;
    background-color: transparent;
}

.pointer {
    cursor: pointer;
}

.btn-light-nohover {
    background-color: var(--bs-tertiary-bg);
}

.btn-light-nohover:hover {
    background-color: var(--bs-tertiary-bg);
}

.help-block {
    color: #dc3545;
}

#mapid {
    height: 400px;
    margin-bottom: 25px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .mapbox-gl-draw_ctrl-draw-btn {
        top: auto !important;
        bottom: 10px !important;
        left: 10px !important;
        transform: translateX(0%);
        width: auto;
    }
}


/* ----------- */

.tracking-container {
    max-width: 800px;
}

.tracking-item {
    display: flex;
    position: relative;
    margin-bottom: 20px;
}

.tracking-item:last-child {
    margin-bottom: 0;
}

.status-dot-active {
    width: 16px;
    height: 16px;
    background-color: #0d6efd;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.status-dot-inactive {
    width: 16px;
    height: 16px;
    background-color: #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.status-dot-active::after {
    font-family: "bootstrap-icons";
    content: "\F26E";
    color: white;
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.status-dot-inactive::after {
    font-family: "bootstrap-icons";
    content: "\F26E";
    color: white;
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.status-line-active {
    position: absolute;
    top: 15px;
    left: 7px;
    width: 2px;
    height: calc(100% + 5px);
    background-color: #0d6efd;
    z-index: 0;
}

.status-line-inactive {
    position: absolute;
    top: 15px;
    left: 7px;
    width: 2px;
    height: calc(100% + 5px);
    background-color: #ccc;
    z-index: 0;
}

.tracking-item:last-child .status-line {
    display: none;
}

.tracking-details {
    margin-left: 20px;
}

.tracking-title {
    font-weight: bold;
    margin: 0;
    margin-bottom: 5px;
}

.tracking-time {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}


/* ----------- */

.webhooks-btn {
    cursor: pointer;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: .25rem;
    font-size: 80%;
    color: #dc3545;
}

.img-250 {
    max-height: 250px;
    width: auto;
}

.img-500 {
    max-height: 500px;
    width: auto;
}

.text-xxs {
    font-size: x-small;
}

.bounce {
    display: inline-block;
    animation: move-up-down 2s infinite;
    position: relative;
}

@keyframes move-up-down {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.ringing {
    display: inline-block;
    animation: shake 0.5s ease-in-out infinite;
    position: relative;
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
    75% {
        transform: rotate(-10deg);
    }
}

/* keep dropdown on right side fit within the screen */
.right-dropdown {
    max-width: 100vw;
    overflow-x: hidden;
    left: auto !important;
    right: 0 !important;
}
