body {
    /*min-height: 75rem;*/
    padding-top: 57px;
}

@media screen and (max-width: 960px) {
    body {
        padding-top: 50px;
    }
}

#main {
    min-height: calc(100vh - 120px);
}

/*reset*/
h1, h2, h3, h4, h5, h6 {
    font-family: initial;
    font-weight: initial;
    margin: initial;
    color: inherit;
}

.navbar {
    --bs-navbar-padding-y: 0.4rem;
}

[data-bs-theme=dark] h1,
[data-bs-theme=dark] h2,
[data-bs-theme=dark] h3,
[data-bs-theme=dark] h4,
[data-bs-theme=dark] h5,
[data-bs-theme=dark] h6 {
    color: white;
}

img {
    max-width: 100%;
}

.device_details img {
    /*max-width: initial;*/
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway';
}

h1 {
    font-weight: 600;
    font-size: 24px;
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 24px;
    }
}

h4, .h4 {
    font-size: 18px;
}

/* Video Block */
.vblock {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /*width: 24.8%;*/
    width: 100%;
    min-height: 220px;
    float: left;
    text-align: center;
    padding: 0;
    height: calc(49.6vw * 1/3);
    margin: 1px;
    vertical-align: middle;
    overflow: hidden;
    background-color: #000000;
}

.vblock-top {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 1;
    font-size: 14px;
    opacity: 0.75;
    padding: 1px 0;
    top: 0;
    width: 100%;
    background-color: #262626;
    color: white;
    font-weight: normal;
    text-align: center;
}

.vblock-bottom {
    position: absolute;
    z-index: 1;
    bottom: 0;
    width: 100%;
    opacity: 0.85;
    background-color: #262626;
    color: white;
    font-weight: normal;
    font-size: 13px;
    text-align: center;
}

.recent-activity .vblock-bottom {
    font-size: 17px;
    font-weight: 300;
}

.vblock-icon {
    margin: 0 5px;
    color: #4ba3cd;
    cursor: pointer;
}

.vblock-img {
    /*width: 100%;*/
    max-height: 100%;
    background-image: url(../images/camera_preloader.gif);
    background-repeat: no-repeat;
    background-position: center center;
    position: relative;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
}

.vblock .camera_preview_device {
    width: auto;
    height: max-content;
    min-width: unset;
    min-height: unset;
}

@media screen and (max-width: 992px) {
    .vblock-top,
    .vblock-bottom {
        font-size: 10px;
    }
}

@media screen and (min-width: 768px) {
    .vblock {
        min-height: 120px;
    }
}
/* Video Block */

.video-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.back-link {
    font-size: 18px;
    margin-right: 5px;
    cursor: pointer;
    position: relative;
}

.menu-badge {
    color: var(--color-green-text);
    top: -9px;
    position: relative;
    padding: 0;
    left: 0;
}

.dropdown-item {
    font-family: 'Raleway', sans-serif;
}

.dropdown-item:hover, .dropdown-item:focus {
    background: none;
    text-decoration: underline;
}

.logo {
    height: 23px;
    margin: 0;
    top: -3px;
    position: relative;
}

.logo.ny {
    height: 40px;
}


@media (max-width: 400px) {
    .logo.ny {
        height: 35px;
    }
}

.logo.custom {
    height: auto;
    max-height: 45px;
}

@media (max-width: 860px) {
    .logo {
        height: 23px;
        top: 0;
    }
}

.video-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.dropdown-item .bi {
    font-size: 20px;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: transparent;
    color: inherit;
    text-decoration: underline;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 1);
    font-family: 'Raleway', sans-serif;
    padding-right: 15px;
    padding-left: 15px;
    font-size: 16px;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--color-green-text);
}

.end_user_link {
    cursor: pointer;
}

.navbar-nav .nav-link.active {
    color: #fff;
    text-decoration: underline;
}

.navbar-nav .nav-link.active i,
.navbar-nav .nav-link:active i,
.navbar-nav .nav-link:hover i {
    color: var(--color-green-main);
}

.location_form {
    position: relative;
}

.location_form[disabled] {
    opacity: 0.8;
    pointer-events: none;
}

.location_form .spinner {
    position: absolute;
    z-index: 9;
    left: 40%;
    top: 10px;
}

.logo_footer {
    width: 40px;
}

footer {
    z-index: 2;
}

.footer_buttons #support_button {
    position: relative;
    bottom: auto;
    left: auto;
    margin-left: 20px;
}

.btn:focus {
    box-shadow: none;
}

.page-link {
    color: var(--color-gray-main);
}

[data-bs-theme=dark] .page-link {
    color: #ffffff;
}

.page-item.active .page-link {
    background-color: var(--color-green-main);
    border-color: var(--color-green-main);
}

.page-link:focus {
    box-shadow: none;
}

.camera_block {
    background-color: var(--color-grey-second);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.camera_block_top {
    position: absolute;
    top: 0px;
    opacity: 0.85;
    background-color: var(--color-gray-main);
    color: white;
    font-weight: normal;
    font-size: 14px;
    text-align: center;
    left: 0;
    right: 0;
    padding: 2px 0;
}

.camera_block_bottom {
    position: absolute;
    bottom: 0px;
    opacity: 0.85;
    background-color: var(--color-gray-main);
    color: white;
    font-weight: normal;
    font-size: 14px;
    text-align: center;
    left: 0;
    right: 0;
}

.filter-toggle:not(.collapsed) {
    background: var(--color-green-main);
    color: #ffffff;
}

.stream_rotate {
    /*display:none;*/
}

.events_view i.active {
    color: var(--color-green-main);
}

.slider_arrow {
    color: #ffffff;
    opacity: 0.5;
}

.slider_arrow:hover {
    opacity: 1;
}

/* SELECT 2 */
.select2-container--default .select2-selection--single {
    background-color: var(--bs-body-bg) !important;
    border: var(--bs-border-width) solid var(--bs-border-color) !important;
    border-radius: 0.375rem !important;
    height: auto !important;
    padding: 0.175rem 2.25rem 0.175rem 0.75rem;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--bs-body-color) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--bs-body-color) !important;
    padding: 0 !important;
}

.select2-dropdown,
.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
    border: var(--bs-border-width) solid var(--bs-border-color) !important;
}

[data-bs-theme=dark] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")!important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--selected {
    background-color: var(--bs-green)!important;
    color: #ffffff !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    width: 13px !important;
    height: 12px !important;
    right: 10px !important;
    left: auto !important;
    border: none !important;
    background-size: contain;
    background-repeat: no-repeat;
}

.select2 {
    top: 0 !important;
    height: auto !important;
}

/* SELECT 2 */

.camera_block .camera_preview_device {
    min-width: auto;
    min-height: auto;
}

.table-responsive {
    display: inherit;
    width: auto;
}

.see_all {
    display: flex;
    align-items: center;
}

.see_all .see_all_container {
    width: 45px;
    height: 22px;
    display: flex;
    align-items: center;
    margin: 0;
}

.see_all .see_all_single {
    height: 16px;
    width: 16px;
}

.see_all #open_thumbnail {
    margin-top: 0;
    margin-left: 3px;
}

.see_all #close_thumbnail {
    margin-top: 0;
    margin-left: 7px;
}

/* TODO: remove after redesign */
#site_menu.site_menu {
    float: none;
    position: relative !important;
    width: 100%;
    top: auto;
    left: auto;
    background: none!important;
}

.site_menu .side_menu_folder {
    position: absolute;
    left: auto;
    right: -15px;
    top: 70px;
}

.big-page-side-menu .side_menu_folder {
    left: auto !important;
    right: 2px !important;
    top: 90px;
}

.main_container {
    width: 100% !important;
    left: auto !important;
    margin: 0 !important;
}

.main_container .view_location_top {
    background-color: transparent !important;
    color: inherit !important;
}

.change_grid_type {
    margin: 0;
}

.top_title {
    color: inherit !important;
}

#space_tile_1 {
    color: black !important;
}

.change_grid_type {
    margin: 0 !important;
}

.top_2_button {
    margin: 0 !important;
    display: flex;
    align-items: center;
}

.top_2_button .switch {
    margin: 0 10px;
}

#site_menu .single_space {
    margin: 0;
    background-color: transparent !important;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
}

#space_list li {
    margin-bottom: 8px;
}

#space_list .sub_space_list li {
    margin: 4px 0;
}

#edit_devices.devices {
    border: none;
}

.main_container .grid {
    background-color: transparent !important;
}

.single_space {
    cursor: pointer;
}

.current_location_list {
    margin-left: 0;
    margin-right: 0;
}

.marker i {
    color: #ffffff;
}
.single_device:hover {
    background-color: transparent !important;
}

#sidebar.collapsed {
    width: 0;
    padding: 0;
}

.collapsed .sidebar-wrapper {
    width: 0;
    padding: 0!important;
}

#sidebar .single_space {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#sidebar .single_space.active {
    color: #488700;
}

/* TODO: remove after redesign */

.as-dropdown {
    position: relative;
}

.as-dropdown a {
    background: white;
    padding: 5px 10px;
    color: #333;
    width: 100%;
    display: block;
    border-bottom: 1px solid #ddd;
    font-size:15px;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
}

.as-dropdown a:hover {background-color: #ddd;}

.as-dropdown a:first-child:hover {background-color: white;}

.as-dropdown-selection a:first-child:before {
    content: '';
    position: absolute;
    width: 1px;
    height: 1px;
    border: 5px solid transparent;
    border-bottom-color: white;
    right: 13px;
    top: -10px;
    margin-left: -5px;
}

.as-dropdown-selection {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 11;
    top: 38px;
    right: 0px;
    border-radius: 3px;
}

.as-dropdown:hover .as-dropdown-selection {
    display: block!important;
}

.video-guide {
    color: #ffffff;
    text-decoration: none;
}

.video-guide i {
    color: var(--color-green-main);
    text-decoration: none;
}

.video-guide:hover {
    color: inherit;
    text-decoration: none;
}

[data-bs-theme=dark] .tablinks {
    color: #ffffff;
}

[data-bs-theme=dark] iframe body {
    color: #ffffff;
}

.select2-container--default .select2-selection--single {
    min-width: 250px;
    max-width: 100%;
}

.pointer {
    cursor: pointer;
}

/* CUSTOM ICONS */
.abp-icon {
    background-color: var(--bs-body-color);
    display: inline-block;
    vertical-align: middle;
    width: 22px;
    height: 22px;
}

.abp-icon.pointer {
    cursor: pointer;
}

.abp-icon.fs-1 {
    width: 48px;
    height: 48px;
}

.abp-icon.fs-2 {
    width: 40px;
    height: 40px;
}

.abp-icon.fs-3 {
    width: 35px;
    height: 35px;
}

.abp-icon.fs-4 {
    width: 32px;
    height: 32px;
}

.abp-icon.fs-5 {
    width: 26px;
    height: 26px;
}

.abp-icon.fs-6 {
    width: 22px;
    height: 22px;
}

.abp-icon.lpr {
    -webkit-mask: url(/assets/images/icons/lpr.svg) no-repeat center;
    mask: url(/assets/images/icons/lpr.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.abp-icon.ptz {
    -webkit-mask: url(/assets/images/icons/ptz-camera.svg) no-repeat center;
    mask: url(/assets/images/icons/ptz-camera.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.abp-icon.camera-actions {
    -webkit-mask: url(/assets/images/icons/camera_actions.svg) no-repeat center;
    mask: url(/assets/images/icons/camera_actions.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.abp-icon.disarm {
    -webkit-mask: url(/assets/images/icons/rec-disarm.svg) no-repeat center;
    mask: url(/assets/images/icons/rec-disarm.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    position: relative;
    top: -3px;
}

.abp-icon.arm {
    -webkit-mask: url(/assets/images/icons/rec-arm.svg) no-repeat center;
    mask: url(/assets/images/icons/rec-arm.svg) no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    position: relative;
    top: -3px;
}

.camera-actions:after {
    content: none;
}

/* CUSTOM ICONS */

.cursor-zoom {
    cursor: url(/assets/images/icons/icon-zoom.png), zoom-in;
}

.collapsed .tab-content > .active {
    display: none;
}

.single_device .marker_enabled i {
    background-color: var(--color-green-main) !important;
}

.action-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
}

.dropdown-toggle {
    margin: 0;
}

.dropdown-menu {
    min-width: 100%;
}

.dropdown-menu li {
    cursor: pointer;
}

.dropdown-menu {
    padding: 10px 20px 0 10px;
}

.video_control .dropdown-menu {
    width: max-content;
}

#colorbox, #cboxWrapper {
    max-width: 100%;
}

.cloud_recording_event_frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloud_recording_event_frame .camera_title_top {
    font-size: 14px;
    opacity: 0.75;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 0;
    right: 0;
    width: auto;
    z-index: 2;
}

/*.cloud_recording_event_frame:hover:before {*/
/*    content: 'Video preview';*/
/*    position: absolute;*/
/*    top: 50%;*/
/*    font-size: 16px;*/
/*    margin: -30px 0 0 -24px;*/
/*    color: #000;*/
/*    opacity: 0.6;*/
/*    text-align: center;*/
/*    border: 2px dashed #ffffff;*/
/*    padding: 5px 20px;*/
/*    background: rgba(255, 255, 255, 0.5);*/
/*}*/

@media screen and (max-width: 680px) {
    .cloud_recording_event_frame .camera_title_top {
        /*font-size: 16px;*/
    }
}

.event-list-img img {
    width: 640px;
    max-width: 100%;
}

.video_control {
    top: -3px;
    position: relative;
}

.jconfirm.jconfirm-bootstrap .jconfirm-box {
    background-color: var(--bs-body-bg)!important;
}

.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-title-c,
.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-content,
.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-closeIcon {
    color: var(--bs-body-color)!important;
}

.login-box {
    position: relative;
    padding: 40px 40px 20px;
    box-shadow: 0 2px 4px 1px rgb(0 0 0 / 10%);
    background-color: #ffffff;
    border-radius: 2px;
}

@media screen and (max-width: 540px) {
    .login-box {
        width: 80%;
        padding: 30px 20px 20px;
    }
}

.login-or {
    position: relative;
    font-size: 18px;
    color: var(--bs-body-color);
    margin: 30px 0;
}

.hr-or {
    background-color: #8f8f8f;
    height: 1px;
}

.span-or {
    display: block;
    position: absolute;
    left: 50%;
    top: -13px;
    margin-left: -20px;
    background-color: #ffffff;
    width: 40px;
    text-align: center;
}

.oauth-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #4285F4;
    color: white;
    padding: 9px 20px 9px 9px;
    text-decoration: none;
}

.oauth-button.microsoft {
    background: #2f2f2f;
}

.oauth-logo {
    height: 100%;
    border-radius: 2px;
    background: white;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.microsoft .oauth-logo {
    background: none;
    width: 25px;
}

.forgot-password {
    color: var(--bs-green);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.forgot-password:hover {
    text-decoration: underline;
}

.support-button {
    color: var(--bs-green);
    text-decoration: none;
}

.invalid-feedback {
    color: var(--bs-danger);
}

.signup-block {
    color: var(--bs-gray);
}

.device_details-events {
    position: relative;
}

.event_grid .event_images img {
    display: inline-block!important;
    width: 33%;
    padding: 4px 2px;
}

/* PTZ */
#ptz-actions-camera-preview-overlay {
    position: absolute;
    font-size: 5em;
    color: #ffffff;
    border: 1px dashed lime;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
}
#ptz-actions-camera-preview-overlay:before {
    content: 'PTZ Control Mode';
    color: lime;
    font-size: 14px;
    position: absolute;
    right: 4px;
}

.ptz-action-container { z-index: 3 }

#ptz-actions-camera-preview-overlay { -webkit-user-select: none; -webkit-touch-callout: none; -moz-user-select: none; -ms-user-select: none; user-select: none; display:none; }
#ptz-actions-camera-preview-overlay button { position: absolute; opacity: 0.6; cursor: pointer; text-decoration: none; z-index: 9; background: transparent; outline: none; border: none; color: white; }
#ptz-actions-camera-preview-overlay button:hover { opacity: 1; }
#ptz-actions-camera-preview-overlay .up { left: Calc(50% - 37.5px); top: -15px;}
#ptz-actions-camera-preview-overlay .down { left: Calc(50% - 37.5px); bottom: 25px; }
#ptz-actions-camera-preview-overlay .left { left: Calc(2.5% - 15px); top: Calc(50% - 37.5px); }
#ptz-actions-camera-preview-overlay .right { right: Calc(2.5% - 15px); top: Calc(50% - 37.5px); }
#ptz-actions-camera-preview-overlay .home { left: 2.5%; bottom: 50px; font-size: 50px; }
#ptz-actions-camera-preview-overlay .zoom-plus { right: Calc(7.5% + 25px); bottom: 50px; font-size: 50px; }
#ptz-actions-camera-preview-overlay .zoom-minus { right: 2.5%; bottom: 50px; font-size: 50px; }
/* PTZ */

#camera_stream {
    overflow: hidden;
}

.toggle-zoom {
    position: absolute;
    z-index: 9;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    color: var(--color-blue);
    font-size: 12px;
    border-radius: 4px;
}

#zoomBlocker {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
}

@media screen and (max-width: 992px) {
    #camera_stream {
        margin: 0 -10px;
    }
}

@media screen and (orientation: portrait) and (max-width: 460px) {
    .device_details-events {
        overflow-y: scroll;
        overflow-x: hidden;
    }

    .event_grid .event_images img {
        width: 100%;
    }
}

@media screen and (orientation: landscape) {
    .device_details-events {
        height: auto!important;
    }
}
