:root {
    --font-size: 13px;
    --spacing: 0.3rem;

    --primary: #4659A5 !important;

    --form-element-spacing-vertical: 0.1rem;
    --form-element-spacing-horizontal: 0.5rem;

    --grid-spacing-horizontal: 1rem;
    --grid-spacing-vertical: 1rem;

    --border-radius: 0.25rem;

    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
}

html {
    background-color: #fcfcfc;
}

body,
h1,
h2,
h3,
h4,
h5 {
    font-family: 'Fira Sans', Sans-serif;
}

h4 {
    margin: 0;
}

.container {
    max-width: min(1880px, 98%) !important;
}

body>header {
    position: fixed;
    top: 0;
    padding: 0 1rem !important;
    background-color: #b3d1c9;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 1px 3px, rgba(0, 0, 0, 0.15) 0px 3px 6px;
}

body>header strong {
    color: #000;
    opacity: 0.9;
    font-size: 1.75rem;
}

body>header strong span {
    color: red;
    left: 4em;
    position: absolute;
    top: 1.2em;
}

body>header a {
    color: #000;
    opacity: 0.9;
}

body>header a:hover {
    opacity: 1;
}

dialog article {
    padding: 1.5em 2em;
}

#nav-logo {
    margin: 0;
    width: 25r em;
}

#nav-logo img {
    width: 12em;
    margin: 0;
    margin-top: -12px;
    margin-right: 1rem;
}

summary {
    padding: 0 !important;
    border: 0 !important;
    color: #000 !important;
    opacity: 0.9 !important;
}

main {
    margin-top: 5rem;
}

h2,
h3 {
    margin-bottom: 0.5rem;
}

h5 {
    margin: 0.5rem 0 0 0;
    text-transform: uppercase;
    color: var(--primary);
}

input,
select,
textarea {
    background-color: #fff;
    border: 1px solid #d0d0d0;
}

.input,
.input li {
    margin: 0;
    padding: 0;
}

.input li {
    list-style-type: none;
}

[type=text]:read-only {
    background-color: var(--form-element-disabled-background-color);
    border-color: var(--form-element-disabled-border-color);
    opacity: var(--form-element-disabled-opacity);
    cursor: not-allowed;
}

[type=checkbox]:checked,
[type=checkbox]:checked:active,
[type=checkbox]:checked:focus,
[type=radio]:checked,
[type=radio]:checked:active,
[type=radio]:checked:focus {
    background-color: var(--primary);
}

table {
    background-color: #fff;
}

table th {
    font-weight: bold;
}

tr:nth-child(even):not(#bkb-date-picker-dialog tr) {
    background-color: rgba(0, 0, 0, 0.03);
}

td,
th {
    vertical-align: top;
}

[role=button],
button,
input[type=button],
input[type=reset],
input[type=submit] {
    display: inline-block;
    width: unset !important;
}

input:disabled,
button:disabled {
    cursor: not-allowed;
}

select:not([multiple]) {
    height: calc(1rem * var(--line-height) + var(--form-element-spacing-vertical) * 2 + var(--border-width) * 2);
}

label small {
    color: gray;
}

span.error,
p.error,
ul.error,
.invalid-feedback {
    color: rgb(255, 10, 10);
}

ul.error {
    list-style-type: none;
}

img {
    margin: 1rem 0;
}

#table-search {
    width: 30%;
    float: right;
}

#table-search .clear-search {
    float: right;
}

.text-gray-500 {
    color: #a0aec0;
}

.hide {
    display: none;
}

#map img {
    /* Fixar bort ovan marginal i google maps karta */
    margin: 0;
}

.nowrap {
    white-space: nowrap;
}

.right {
    float: right;
    margin-left: 0.4rem;
}

.clear {
    clear: both;
}

.button-round {
    border-radius: 50%;
    height: 2rem;
    width: 2rem;
    background-color: #96a9e5;
    border-color: #96a9e5;
}

#lines th {
    vertical-align: bottom;
}

#lines tbody tr {
    cursor: pointer;
}

#lines .delete {
    display: none;
}

#lines .edit {
    background-color: rgba(0, 0, 0, 0.15);
}

.alert {
    box-shadow: rgba(0, 0, 0, 0.15) 0px 1px 3px, rgba(0, 0, 0, 0.15) 0px 3px 6px;
    border-radius: 0.25rem;
    animation: hideAnimation 5s forwards;
}

.alert.alert-info {
    background-color: var(--info);
    color: white;
}

.alert.alert-success {
    background-color: var(--success);
    color: white;
}

.alert.alert-warning {
    background-color: var(--warning);
}

.alert.alert-danger {
    background-color: var(--danger);
    color: white;
}

@keyframes hideAnimation {
    0% {
        opacity: 1;
        line-height: 1.4;
        padding: 1em;
        margin: 0.5em 0;
    }

    90% {
        opacity: 1;
        line-height: 1.4;
        padding: 1em;
        margin: 0.5em 0;
    }

    100% {
        display: hidden;
        opacity: 0;
        line-height: 0;
        padding: 0;
        margin: 0;
    }
}

/* https://www.computerhope.com/jargon/w/w3c-color-names.htm */
.alert.info {
    background-color: PaleGreen;
    color: black;
}

.alert.warning {
    background-color: Gold;
    color: black;
}

.alert.error {
    background-color: OrangeRed;
    color: white;
}

/* PRINT */
@media print {

    .hide-print,
    #table-search,
    a[role="button"] {
        display: none;
    }

    .container {
        width: 100%;
        max-width: 100%;
    }

    .grid {
        display: block;
    }
}

/* SCREEN */
@media screen {
    .show-print {
        display: none;
    }
}

/* KALENDER */
#calendar-nav {
    margin-top: 1.5em;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

#previous-month {
    text-align: left;
}

#this-month {
    text-align: center;
}

#next-month {
    text-align: right;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

#calendar .weekday {
    text-align: center;
}

#calendar .planned {
    color: rgba(0, 128, 0, 0.5);
}

#calendar .day {
    border: 1px solid lightgray;
    background-color: white;
    padding: 0.3em;
    min-height: 3em;
    overflow: hidden;
}

#calendar .day ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

#calendar .day li {
    line-height: 1.2em;
    white-space: nowrap;
    padding: 0.3em 0;
}

#calendar .day li:not(:last-child) {
    border-bottom: 1px solid #eee;
}

#calendar .day li.hidden::before {
    font-size: 1.5em;
    font-weight: bold;
    content: "GÖMD";
    position: absolute;
    color: rgba(128, 0, 0, 0.5) !important;
}

#calendar .day li.hidden>* {
    color: rgba(0, 0, 0, 0.2) !important;
}

#calendar .day a {
    display: block;
    width: 100%;
}

#calendar .day small {
    font-size: 0.7em;
    padding-left: 1em;
    color: rgba(0, 0, 0, 0.6);
}

#calendar .day-7:not(.day-not-in-month) {
    background-color: #ffe6e6;
}

#calendar .day-not-in-month {
    color: #bbb;
    background-color: #eee;
}

#calendar .date {
    float: right;
    text-align: right;
}

/* Meddelanden */
.speech-bubble-left {
    position: relative;
    background: #e9e9e9;
    border-radius: .4em;
    padding: 0.5em 1em;
    margin: 1em 10% 1em 0;
}

.speech-bubble-left a {
    color: #212529;
}

.speech-bubble-left:after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: #e9e9e9;
    border-left: 0;
    margin-top: -10px;
    margin-left: -10px;
}

.speech-bubble-right {
    text-align: right;
    position: relative;
    background: #fade5c;
    border-radius: .4em;
    padding: 0.5em 1em;
    margin: 1em 0 1em 10%;
}

.speech-bubble-right a {
    color: #212529;
}

.speech-bubble-right .fas {
    color: #212529;
}

.speech-bubble-right:after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-left-color: #fade5c;
    border-right: 0;
    margin-top: -10px;
    margin-right: -10px;
}

.message-thread {
    padding-left: 20%;
    display: none;
}

.message-posted,
.close-message {
    text-align: right;
    font-size: 0.8em;
}

.pickup-table {
    border-top: 1px solid #ddd;
    font-size: 1.2em;
}

.pickup-table tr td {
    padding: 0.7em;
    border-bottom: 1px solid #ddd;
}

.pickup-stop-check,
.pickup-check,
.dropoff-stop-check,
.dropoff-check {
    width: 1.5em;
    height: 1.5em;
}

.pickup-check-col,
.route-icon-col {
    width: 3em;
}

.pickup-check-route-col td {
    background-color: #eee;
}

#selected_stop_id option.stopgroup-1 {
    color: #999;
    font-style: italic;
}

#selected_stop_id option.is-passtime,
#selected_stop_id option:not(.stoptype-1) {
    color: #999;
}

#selected_stop_id option.has-pickups {
    color: green;
    font-weight: bold;
}


#global-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    display: none;
}