/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
    color: #222;
    height: 100%;
    width: 100%;
}


/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

ul, ol {
    list-style: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}


/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Generic HTML elements
   ========================================================================== */

* {
    font-family: "Open Sans";
}

body {
    height: 100%;
    width: 100%;
}

.borderless td, .borderless th {
    border: none !important;
}

.whiteLink {
    color: #efefef;
    cursor: pointer;
    text-decoration: underline;
}

.whiteLink:focus, .whiteLink:hover {
    color: #d8d8d8;
}

.ui.button.toggle.active, .ui.buttons .button.toggle.active, .ui.toggle.buttons .active.button {
    background-color: #2185d0 !important;
}

/* These two are to fix a Semantic bug dealing with loaders inside a modal */
.ui.dimmer .ui.loader.dark:before {
    border-color: rgba(0,0,0,.1);
}

.ui.dimmer .ui.loader.dark:after {
    border-color: #767676 transparent transparent;
}

/* ==========================================================================
   Useful CSS
   ========================================================================== */

.rangeslider__fill {
    background-color: #C61A1B !important;
}

.centerVertically {
    position: relative;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.lightBackgroundLink {
    color: #242424;
    cursor: pointer;
    text-decoration: underline;
}

.lightBackgroundLink:focus, .lightBackgroundLink:hover {
    color: #909090;
}

.distributedEvenly {
    margin: auto;
}

.tableContainer {
    overflow: auto;
    flex: 1;
}

.pagerContainer {
    text-align: center;
    margin-top: 20px
}

.paginatedTable {
    margin-bottom: 20px;
    border: 1px solid #eaeaea;
}

.tableUnderNavContent {
    flex: 1;
    height: inherit;
    display: flex;
    padding: 50px 60px 0 60px;
    flex-direction: column;
}

#tableCellButtonActions > button:not(:last-child) {
    margin-right: 10px;
}

.ui.green.button {
    background-color: #30AE33;
}

#tableActionDiv {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}

#tableActionDiv > form > .fields {
    margin-bottom: 0;
}

.itemsPerPageDropdown {
    margin-right: 15px;
}

.clickableSegment:hover {
    background: #F7F7F7;
    cursor: pointer;
}

.flexCenterColumn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.flexCenterRow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flexCenteredContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.react-markdown > ul {
    list-style: initial;
}

/* ==========================================================================
   Right Content
   ========================================================================== */

.Component_HorizontalNav {
    margin-top: 30px;
    padding: 0 30px;
}

.Component_HorizontalNav > a, .Component_HorizontalNav > a:focus {
    color: #4d4d4d;
    font-size: 14px;
    font-weight: 400;
    padding: 8px;
    display: inline-block;
    text-decoration: none;
}

.Component_HorizontalNav > a:hover {
    text-decoration: none;
    color: #343434;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #E2E2E2;
}

#contentWrapper {
    min-width: 500px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.Component_HorizontalNav > a.active {
    border-bottom: 3px solid #C61A1B;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    background-color: #FBFBFB;
}

.nav-tabs > li > a {
    color: #969696;
    cursor: pointer !important;
}

.horizontalNavAndContent {
    display: flex;
    flex-direction: column;
}

.underHorizNavContent {
    flex-grow: 1;
    background-color: #FBFBFB;
    position: relative;
    min-height: 0;
}

#pageWrapper {
    flex: 1;
    order: 1;
    display: flex;
    overflow: auto;
    z-index: 0;
}

.pageContent {
    position: relative;
    flex: 1;
    background-color: #EAEAEA;
}

/* ==========================================================================
   Main CSS
   ========================================================================== */

#topContent {
    height: 100%;
    display: flex;
    flex-direction: row;
}

#content {
    height: 100%;
}

#mainRoot {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Bad Browser
   ========================================================================== */

.unsupported-browser-content {
    max-width: 550px;
    text-align: center;
}

/* ==========================================================================
   Animations
   ========================================================================== */

.sheetTransition-enter {
    transform: translateY(70%);
    opacity: 0;
}

.sheetTransition-enter.sheetTransition-enter-active {
    transform: translateY(0%);
    opacity: 1;
    transition: transform 300ms ease-in-out,
                opacity 300ms ease-in-out;
}

.sheetTransition-exit {
    transform: translateY(0%);
    opacity: 1;
}

.sheetTransition-exit.sheetTransition-exit-active {
    transform: translateY(70%);
    opacity: 0;
    transition: transform 400ms ease-in-out,
                opacity 300ms ease-in-out;
}

@keyframes flickerAnimation { /* flame pulses */
    0%   { opacity: 1; }
    25%  { opacity: 1; }
    75%  { opacity: 0.25; }
    100% { opacity: 1; }
}

.animateFlicker {
    opacity:1;
    animation: flickerAnimation 3s infinite;
}

@keyframes update-text-animation {
    0%   { color: #3a3a3a; }
    25%  { color: #3a3a3a; }
    75%  { color: #c61a1b; }
    100% { color: #3a3a3a; }
}

#update-button {
    animation: update-text-animation 3s infinite;
    margin: 0;
    padding: 9px 13px;
    background-color: #ffffff;
}

#notification-group.active {
    animation: notification-group-animation 2.5s infinite;
}

@keyframes notification-group-animation {
    0%   { background-color: #c61a1b; }
    25%  { background-color: #c61a1b; }
    75%  { background-color: #eebd12; }
    100% { background-color: #c61a1b; }
}

/* ==========================================================================
   Leaflet
   ========================================================================== */

.bryxMap {
    flex-grow: 1;
    border: 1px solid lightgray;
}

.leaflet-marker-icon {
    outline: none;
}

.leaflet-marker-icon.leaflet-interactive {
    cursor: pointer;
}

.leaflet-marker-icon.leaflet-interactive.hydrantIcon {
    cursor: default;
}

.leaflet-bar button,
.leaflet-bar button:hover {
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #ccc;
    width: 26px;
    height: 26px;
    line-height: 26px;
    display: block;
    text-align: center;
    text-decoration: none;
    color: black;
}

.leaflet-bar button {
    background-position: 50% 50%;
    background-repeat: no-repeat;
    overflow: hidden;
    display: block;
}

.leaflet-bar button:hover {
    background-color: #f4f4f4;
}

.leaflet-bar button:first-of-type {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.leaflet-bar button:last-of-type {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-bottom: none;
}

.leaflet-bar.disabled,
.leaflet-bar button.disabled {
    cursor: default;
    pointer-events: none;
    opacity: .4;
}

.leaflet-touch .leaflet-bar button {
    width: 30px;
    height: 30px;
    line-height: 30px;
}

/* ==========================================================================
   Semantic UI
   ========================================================================== */

.btn {
    width: 100%;
    min-height: 38px !important;
    font-size: 13px !important;
}

.dropdown_noIcon > i {
    display: none;
}

.popupItem {
    position: relative;
    cursor: pointer;
    display: block;
    border: none;
    height: auto;
    text-align: left;
    border-top: none;
    line-height: 1em;
    color: rgba(0,0,0,.87);
    padding: .78571429rem 1.14285714rem !important;
    font-size: 1rem;
    text-transform: none;
    font-weight: 400;
    box-shadow: none;
    -webkit-touch-callout: none;
}

.popupItem:hover {
    background: rgba(0,0,0,.05);
    color: rgba(0,0,0,.95);
    z-index: 13;
}

.popupCheckbox {
    padding: 1rem 1.14285714rem;
}

.ui.toggle.checkbox.bryxToggle input:checked~label:before {
    background-color: #C61A1B !important;
}

.ui.toggle.checkbox .box:before, .ui.toggle.checkbox label:before {
    background: rgba(0, 0, 0, 0.20);
}

.ui.toggle.checkbox.bryxToggle>label:after {
    background: linear-gradient(transparent,rgba(0,0,0,.05)) #e8e8e8;
}

.ui.search .prompt {
    border-radius: .28571429rem;
}

a.ui.card {
    text-decoration: none;
}

.vitalCardContent {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.vitalSingleValue {
    font-size: 48px;
    font-weight: 600;
    color: #C61A1B;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.vitalSingleValue_Units {
    font-size: 14px;
    font-weight: 200;
    color: #828282;
    margin-top: 12px;
}

.vitalDoubleValue {
    font-size: 40px;
    font-weight: 600;
    color: #C61A1B;
}

#vitalDoubleUnit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.vitalTimeAgo {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: #828282;
}

/* ==========================================================================
   Linkify
   ========================================================================== */

.Linkify {
    white-space: pre-wrap;
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-modal {
    height: 100%;
    width: 100%;
    position: fixed;
    background-color: #8f0808;
}

#loginForm {
    max-width: 500px;
    min-width: 450px;
    width: 25%;
}

.logoAndText {
    color: white;
    font-size: 16px;
    height: 50px;
    line-height: 20px;
    padding: 20px 15px;
    position: fixed;
    display: inline-block;
    left: 0;
    margin-left: 10px;
    z-index: 1;
}

.grayDivider {
    border-bottom-color: rgba(200, 200, 200, 0.3) !important;
    border-top-color: rgba(200, 200, 200, 0.3) !important;
    color: rgba(200, 200, 200, 0.9) !important;
    margin: 30px 0 20px 0;
}

.whiteDivider {
    border-bottom-color: rgba(249, 249, 249, 0.63) !important;
    border-top-color: rgba(249, 249, 249, 0.63) !important;
    color: rgba(249, 249, 249, 0.9) !important;
    margin: 30px 0 20px 0;
}

#signinLogo {
    margin-right: auto;
    margin-left: auto;
    display: block;
    margin-bottom: 10%;
    width: 75%;
}

@keyframes rotate {
    0% {
        transform: translateY(-50%) rotate(0deg);
        animation-timing-function: ease;
    }
    80% {
        transform: translateY(-50%) rotate(360deg);
    }
    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

@-webkit-keyframes rotate {
    0% {
        -webkit-transform: translateY(-50%) rotate(0deg);
        -webkit-animation-timing-function: ease;
    }
    80% {
        -webkit-transform: translateY(-50%) rotate(360deg);
    }
    100% {
        -webkit-transform: translateY(-50%) rotate(360deg);
    }
}

#loadingIcon {
    width: 100px;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    margin: auto;
    display: block;
    animation-name: rotate;
    -webkit-animation-name: rotate;
    animation-duration: 2s;
    -webkit-animation-duration: 2s;
    animation-iteration-count: infinite;
    -webkit-animation-iteration-count: infinite;
}

#topBanner {
    -webkit-app-region: drag;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    background: #C61A1B;
    color: white;
    cursor: default;
    font-size: 16px;
    height: 50px;
    line-height: 20px;
    padding: 10px 15px;
}

#joinLink {
    display: table;
    margin: 0 auto;
}

#contactSupportDiv {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1;
    margin-right: 20px;
    padding: 20px 0;
}

#contactSupportLink {
    font-size: 16px;
}

#signinButton {
    background-color: #efefef;
}

#signinButton:hover {
    background-color: #d8d8d8;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

#TopBar_SignedIn {
    background-color: #f1f1f1;
    box-shadow: 1px 1px 7px #afafaf;
    color: #686868;
    font-size: 16px;
    height: 70px;
    z-index: 2;
    order: 0;
}

#TopBar_RightSection {
    margin-right: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#TopBar_AgencyName, #TopBar_Name {
    margin-left: 30px;
    font-weight: 400;
}

#TopBar_Name {
    margin-right: 20px;
}

/* ==========================================================================
   Side Nav
   ========================================================================== */

.siteName {
    margin-left: 5px;
    font-weight: 500;
}

#Nav_SignedIn {
    background-color: #192126;
    width: 220px;
}

#Nav_SiteName {
    background: #8f0808;
    color: white;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1px;
    padding: 20px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#Nav_Options {

}

.Nav_LinkSection {
    color: #888888;
    font-size: 12px;
    font-weight: 400;
    margin-left: 20px;
}

#Nav_LinkList {
    padding-left: 0;
    margin-top: 10px;
}

#Nav_LinkList > a > img {
    width: 24px;
    margin-right: 10px;
}

#Nav_LinkOptions {
    margin-left: 20px;
    margin-top: 10px;
}

#Nav_Links > a, #Nav_Links > a:focus {
    color: #B8B8B8;
    display: flex;
    text-decoration: none;
}

#Nav_LinkList > a, #Nav_LinkList > a:focus {
    color: #B8B8B8;
    display: flex;
    font-size: 14px;
    font-weight: 400;
    padding-bottom: 15px;
    padding-left: 20px;
    padding-top: 15px;
    text-decoration: none;
}

#Nav_LinkList a:hover, #Nav_Links > a:hover {
    text-decoration: none;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.Nav_SelectedLink {
    border-left: 5px #8f0808 solid;
    color: #efefef !important;
    padding-left: 16px !important;
    background-color: rgba(255, 255, 255, 0.03);
}

#Nav_SiteName img {
    width: 30px;
}

/* ==========================================================================
   Jobs
   ========================================================================== */

.JobInfoViewMenu {
    min-height: 50px !important;
    margin: 0 !important;
}

.JobListItem {
    border-top: 1px solid #d8d8d8;
    background-color: white;
    cursor: default;
    padding-right: 8px;
}

.JobListItem_Clickable {
    cursor: pointer;
}

.JobListItem_Clickable:hover {
    background-color: #dadada;
}

.JobListItem_Selected{
    background-color: #eaeaea;
}

.JobDetailButton {
    color: white !important;
    background-color: #c61a1b !important;
    font-family: "Open Sans" !important;
}

.ui.button.toggle.active.JobListToggleBtn {
    background-color: #c61a1b !important;
}

.ui.button.toggle.active.JobListToggleBtn:hover {
    background-color: #ab1a1b !important;
}

.ui.top.attached.label:first-child+.JobResponderItem_positive {
    border-top: 2px #30ae33 solid !important;
}

.ui.top.attached.label:first-child+.JobResponderItem_negative {
    border-top: 2px #c61a1b solid !important;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.GroupListItem {
    border-top: 1px solid #d8d8d8;
    padding: 15px;
    background-color: white;
    cursor: pointer;
}

.GroupListItem:hover {
    background-color: #dadada;
}

.GroupListItem_Selected {
    background-color: #eaeaea;
}

.group-container {
    background: #ECECEC;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
}

.group-header-container {
    padding: 20px;
    background-color: white;
    flex: 0;
}

.message-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px;
}

.message-container {
    margin-bottom: 12px;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.message-container:first-child {
    margin-top: 11px;
}

.message-body {
    background-color: #FFFFFF;
    padding: 10px 10px 8px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-width: 450px;
}

.message-me {
    background-color: #C61A1B;
    color: #FFFFFF;
}

.message-bryx {
    font-weight: 500;
}

.message-input {
    background: #F5F5F5;
}

.message-img {
    padding: 0;
    position: relative;
    cursor: pointer;
}

.message-img .dimmer {
    border-radius: 8px;
}

.input-bar {
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
}

.message-time {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    height: 20px;
}

.message-time-text {
    color: #a0a0a0;
    margin-top: 3px;
    text-align: right;
}

.message-time-img {
    bottom: 10px;
    right: 10px;
    padding: 2px 5px;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 100;
    color: #ffffff;
    border-radius: 8px;
}

.message-bubble-container {
    position: relative;
}

i.message-context-icon {
    display: none !important;
}

.message-bubble-container:hover i.message-context-icon {
    display: block !important;
}

i.message-context-icon-right {
    position: absolute;
    top: -13px;
    right: -18px;
}

i.message-context-icon-left {
    position: absolute;
    top: -15px;
    left: -18px;
}

.message-me .message-time-text {
    color: #f1f1f1;
}

.message-wrapper-failed {
    opacity: 0.6;
}

.message-wrapper-right {
    align-items: flex-end;
}

.message-wrapper-center {
    align-items: center;
}

.message-sender {
    font-size: 12px;
    margin-left: 5px;
    margin-bottom: 2px;
    color: #9E918E;
}

.seen-check {
    width: 20px;
    margin-bottom: 4px;
    margin-left: 5px;
}

.seen-list-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 30px;
}

.seen-list-item-icon-container {
    width: 25px;
    margin-right: 10px;
}

/* ==========================================================================
   Streams
   ========================================================================== */

#playbackControl {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: #cacaca;
    opacity: 0.5;
    width: 400px;
    border-radius: 5px;
    padding: 18px;
    pointer-events: auto;
}

#playbackControl:hover {
    opacity: 1;
}

/* ==========================================================================
   Duty Status
   ========================================================================== */

.duty-icon {
    opacity: 0.8;
    cursor: pointer;
    width: 25px;
    height: 25px;
}

.duty-icon:hover {
    opacity: 1;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

.notificationItem {
    border-top: 1px solid #d8d8d8;
    background-color: white;
    cursor: pointer;
}

.notificationItem .notificationItemX {
    visibility: hidden;
}

.notificationItem:hover {
    background-color: #f1f1f1;
}

.notificationItem:hover .notificationItemX {
    visibility: visible;
}

#notificationsMenu {
    width: 400px;
    max-width: none;
    min-height: 400px;
    max-height: 600px;
    height: 50vh;
    z-index: 1001;
    position: absolute !important;
    right: 64px !important;
    top: 38px !important;
    padding: 0;
    display: flex !important;
    flex-direction: column;
}

#settingsMenu {
    top: 38px !important;
    right: 7px !important;
    z-index: 1001;
    min-width: 162px;
    padding: 0;
}

#dutyMenuItem {
    top: 38px !important;
    right: 121px !important;
    z-index: 1001;
}

/* ==========================================================================
   Settings
   ========================================================================== */

.shiftItem {
    margin: 1rem 0;
}

.shiftItem:first-child {
    margin-top: 0;
}

.shiftItem:last-child {
    margin-bottom: 0;
}

.alertSettingsContent {
    padding: 1rem 5rem;
    background-color: #f1f1f1;
    height: 100%;
    overflow-y: auto;
}

.changePasswordForm.ui.form .field {
    margin: 0 0 1.5em;
}

/* Users */

#UsersFormSection {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    margin-bottom: 14px;
    align-items: center;
}

#SearchFormGroup {
    width: 200px;
}

#InviteUserButton {
    min-width: 70px;
}

.notificationDot {
    position: absolute;
    right: 0;
}

/* ==========================================================================
   Patients
   ========================================================================== */
.patient-item {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    padding: 20px;
}

.patient-item-image {
    margin-right: 20px;
    flex: 0;
    height: 100%;
}

.patient-item-label {
    font-size: 12px;
    color: black;
}

.patient-item-value {
    color: #c61a1b;
    margin-left: 5px;
    font-size: 16px;
    line-height: 16px;
}

.gcs-label {
    width: 60px;
    padding-top: 14px;
    font-weight: bold;
}

.gcs-desc-label {
    color: #828282;
}

/* ==========================================================================
   Agency
   ========================================================================== */

.settingLabel {
    padding-left: 0;
    padding-right: 10px;
    font-weight: 400;
}

/* ==========================================================================
   Location Services
   ========================================================================== */

/* ==========================================================================
   Site surveys
   ========================================================================== */
.ui.grid.siteSurveyGrid {
    min-height: 500px;
    margin-bottom: 0;
}
.ui.form .one.wide.field.siteSurveyRowRemoveField {
    width: 4rem !important;
    align-self: flex-end;
}

.siteSurveyList {
    max-height: 50vh;
    overflow-y: auto;
    display: inline-block;
    flex: 1 1 auto;
}

.siteSurveyWrapper {
    display: flex;
}

.siteSurveyMapRow {
    display: flex;
}

.siteSurveySearchRow {
    margin-top: 2em;
    display: flex;
    flex-direction: row;
}

.siteSurveyMapWrapper {
    flex: 1 1 auto;
    height: 50vh;
}

.siteSurveyGrid .leaflet-container {
    z-index: 0;
}
