/* TODO: Passare a scss */
html,
body {
  min-height: 100%;
  font-family: "Nunito Sans", Arial, Helvetica, sans-serif;
  font-weight: 600;
  color: #121212;
}

/* #region Menu */
.no-scroll {
  overflow: hidden;
}

nav.vertical-menu {
  flex-shrink: 0;
  position: fixed;
  height: 100vh;
  width: 270px;
  display: flex;
  flex-direction: column;
  color: #eeeeee;
  background: #212121;
  justify-content: flex-start;
  align-items: stretch;
  margin-left: -271px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 100;
  transition: transform 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

nav.vertical-menu.expanded {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  transform: translateX(270px);
}

nav.vertical-menu::-webkit-scrollbar {
  width: 8px;
  background: #424242;
}

nav.vertical-menu::-webkit-scrollbar-thumb {
  background: #888888;
}

nav.vertical-menu::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

nav.vertical-menu > div.menu-user {
  display: block;
  padding: 15px;
  background: #263340;
  border-bottom: 4px solid #ffca28;
  margin-bottom: 12px;
  min-height: 100px;
}

nav.vertical-menu > div.menu-user > div.username {
  font-size: 1.3em;
  font-weight: bold;
  padding-bottom: 4px;
}

nav.vertical-menu > div.menu-user > div.login-logout > a {
  font-size: 1.12em;
}

nav.vertical-menu div.panel-group {
  margin-bottom: unset;
}

nav.vertical-menu > div.panel-group > div.collapse div.menu-item,
nav.vertical-menu > div.panel-group > div.collapsing div.menu-item {
  padding-left: 15px;
}

nav.vertical-menu > div.panel-group > div.collapse div.sub.menu-item,
nav.vertical-menu > div.panel-group > div.collapsing div.sub.menu-item {
  padding-left: 50px;
}

nav.vertical-menu a {
  text-decoration: none !important;
}

nav.vertical-menu a > div.menu-item {
  color: #ffffff;
  text-align: center;
  padding: 8px 0;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: background 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

nav.vertical-menu a[aria-expanded="true"] > div.menu-item:not(.sub) {
  background: #444444;
}

nav.vertical-menu a > div.sub.menu-item {
  background: #333333;
}

nav.vertical-menu a > div.menu-item.disabled {
  cursor: default;
  color: #555555;
}

nav.vertical-menu a > div.menu-item:hover:not(.disabled) {
  background: #444444;
}

nav.vertical-menu a > div.menu-item > div.mdi {
  font-size: 1.5em;
  margin: 0 15px;
  text-rendering: optimizeSpeed;
}

nav.vertical-menu a > div.menu-item > div.desc {
  font-size: 1em;
  flex-grow: 1;
  text-align: left;
}

nav.vertical-menu a > div.menu-item > div.expand-icon {
  transition: transform 350ms ease-out;
}

nav.vertical-menu a[aria-expanded="true"] > div.menu-item > div.expand-icon {
  transform: rotate(180deg);
}

div.black-overlay {
  position: fixed;
  background: #000000;
  left: 0;
  top: 0;
  height: 100vh;
  width: 100vw;
  opacity: 0;
  transition: opacity 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 90;
  pointer-events: none;
  display: block;
}

div.black-overlay.darken {
  pointer-events: all;
  opacity: 0.75;
}

/* #endregion */

/* #region Header */
section.main header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background: #2c3e50;
  color: white;
  margin: 0;
  border-bottom: 4px solid #26c6da;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 10;
  user-select: none;
}

section.main header:not(.login-header) {
  height: 137px;
}

section.main header a,
section.main header a:hover,
section.main header a:visited {
  color: white;
}

section.main header div.bestdealer-header {
  margin: 20px 20px 0;
}

/* #region Horizontal menu */

section.main header div.horizontal-menu {
  padding: 4px 0px 8px 8px;
}

/* Menu + submenu item layout */
section.main header div.horizontal-menu div.menu-item {
  position: relative;
  display: inline-block;
}

section.main header div.horizontal-menu div.menu-item .menu-button {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  padding: 0 6px;
  cursor: pointer;
}

section.main
  header
  div.horizontal-menu
  div.menu-item
  .menu-button.menu-disabled {
  color: #ffffffa0;
  cursor: not-allowed;
}

/* Submenu container */
section.main header div.horizontal-menu div.menu-item div.menu-container-outer {
  display: none;
  position: absolute;
  padding: 8px 0;
  z-index: 10;
  transform-origin: top 25%;
}

/* Submenu layout */
section.main header div.horizontal-menu div.menu-item div.menu-container {
  background-color: #ffffff;
  min-width: 225px;
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 6px;
}

/* Submenu separator */
section.main
  header
  div.horizontal-menu
  div.menu-item
  div.menu-container
  div.menu-separator {
  width: 100%;
  height: 1px;
  background-color: #e0e3ec;
  display: block;
  margin-top: 4px;
}

/* Submenu items */
section.main header div.horizontal-menu div.menu-item div.menu-container a {
  width: 100%;
  display: block;
  padding: 6px;
  border-radius: 4px;
  color: #212121;
  text-decoration: none;
  transition: color 75ms linear, background-color 75ms linear;
}

section.main
  header
  div.horizontal-menu
  div.menu-item
  div.menu-container
  a:hover {
  /* color: #FFFFFF; */
  background-color: #e0e3ec;
}

section.main
  header
  div.horizontal-menu
  div.menu-item
  div.menu-container
  a:not(:first-child) {
  margin-top: 4px;
}

/* Margin for subsequent menu buttons */
section.main header div.horizontal-menu div.menu-item:not(:first-child) {
  margin-left: 4px;
}

/* Menu button animation item */
section.main header div.horizontal-menu div.menu-item .menu-button::before {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  background-color: #ffffff;
  border-radius: 6px;
  content: "";
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition-duration: 100ms;
  transition-property: opacity, transform;
}

/* Submenu open animation */
section.main
  header
  div.horizontal-menu
  div.menu-item:hover
  div.menu-container-outer {
  display: block;
  animation: fadein-slidedown 100ms ease-out;
}

@keyframes fadein-slidedown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Menu button hover animation */
section.main
  header
  div.horizontal-menu
  div.menu-item:hover
  .menu-button::before {
  opacity: 0.2;
  transform: scale(1);
}

section.main
  header
  div.horizontal-menu
  div.menu-item
  .menu-button
  span.expand-icon::before {
  transition: transform 100ms ease-out;
  transform: none;
}

section.main
  header
  div.horizontal-menu
  div.menu-item:hover
  .menu-button
  span.expand-icon::before {
  transform: rotateX(180deg);
}

/* Menu button layout */
section.main header div.horizontal-menu div.menu-item .menu-button * {
  vertical-align: middle;
}

section.main header div.horizontal-menu div.menu-item a.menu-button {
  color: white;
  text-decoration: none;
}

/* #endregion */

section.main header div.mdi.mdi-menu {
  font-size: 1.5em;
  margin: 12px 15px 15px 0;
  height: 30px;
  padding-left: 5px;
  padding-right: 5px;
  position: relative;
  cursor: pointer;
  display: block;
}

section.main header div.mdi.mdi-menu::after {
  position: absolute;
  bottom: -5px;
  left: -6px;
  right: -5px;
  top: -5px;
  background-color: #ffffff;
  border-radius: 50%;
  content: "";
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition-duration: 150ms;
  transition-property: opacity, transform;
}

section.main header div.mdi.mdi-menu:hover::after {
  opacity: 0.2;
  transform: scale(1);
}

section.main header div.logo {
  display: block;
  width: 250px;
  height: 62px;
  background: url("../images/logo.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  margin-bottom: 8px;
}

section.main header div.head-logo {
  display: flex;
  flex-direction: row;
  margin-right: 15px;
}

section.main header div.row div.spacer {
  flex-grow: 1;
}

section.main header div.title {
  font-size: 3em;
  margin-bottom: 4px;
}

section.main header div.welcome-msg {
  text-align: right;
  max-width: 270px;
}

@media screen and (max-width: 920px) {
  section.main header div.welcome-msg {
    max-width: 250px;
  }
}

section.main header div.welcome-msg > h4 {
  margin: 0;
}

section.main header table.dealer-disp-table {
  margin-top: -10px;
  margin-right: 250px;
  border-collapse: collapse;
}

section.main header table.dealer-disp-table thead {
  background-color: rgba(255, 255, 255, 0.25);
}

section.main header table.dealer-disp-table td {
  min-width: 60px;
}

section.main header table.dealer-disp-table tbody td {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top: none;
}

section.main header table.dealer-disp-table thead td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

section.main header table.dealer-disp-table tbody td.in-scadenza {
  border-bottom: 1px solid rgba(255, 225, 0, 0.5);
  background: rgba(255, 225, 0, 0.5);
}

section.main header table.dealer-disp-table tbody td.esaurite {
  border-bottom: 1px solid rgba(255, 50, 50, 0.6);
  background: rgba(255, 50, 50, 0.6);
}

/* #endregion */

/* #region Main container */
section.main section.content {
  display: block;
  padding: 10px 20px;
  padding-top: 150px;
}

section.main select option {
  line-height: 30px;
}

/* #endregion */

/* #region Login screen */

section.login-page-section {
  background: linear-gradient(to bottom, hsl(211, 36%, 56%) 10%, #fff 35%);
}

section.login-page-section h1 {
  margin-top: 10px;
  font-size: 1.75em;
}

section.login-page-section label.control-label {
  margin-bottom: 0;
}

@media screen and (min-width: 1200px) and (max-width: 1600px) {
  section.login-page-section div.site-login div.container {
    width: 1024px;
  }
}

.login-sticky {
  position: sticky;
  top: 94px;
}

.tns-outer {
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.tns-outer:after {
  z-index: 2;
  position: absolute;
  top: -30px;
  bottom: -30px;
  content: " ";
  pointer-events: none;
}

.tns-ovh {
  border-radius: 6px;
}

img.slider-thumbnail {
  width: 100%;
  height: auto;
  float: left;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 3px solid #6fbaff;
}

div.main-slider-thumbnails > div {
  outline: none;
  transition: filter 150ms;
  z-index: 3;
}

div.main-slider-thumbnails > div:not(.tns-nav-active) {
  filter: grayscale(0.5) brightness(0.75);
}

div.main-slider-thumbnails > div:not(.tns-nav-active):hover {
  filter: grayscale(0.5);
}

div.main-slider-thumbnails > div:not(.tns-nav-active) > img {
  border: 3px solid #cccccc;
  cursor: pointer;
}

div.home-moduli > div > a {
  text-decoration: none;
}

div.home-moduli > div > a:hover > span:not(.mdi) {
  text-decoration: underline;
}

div.home-moduli > div > a > span.mdi::before {
  font-size: 1.5em;
  vertical-align: sub;
}

div.home-moduli > div > a > span:not(.mdi) {
  font-size: 1.1em;
}

div.home-service {
  padding-left: 15px;
}

a.link-officine {
  color: #c80000 !important;
  font-weight: bold;
}

a.link-officine span.mdi {
  font-size: 1.5em;
}
div.home-moduli > div > a.link-officine > span:not(.mdi) {
  text-decoration: underline !important;
  font-size: 1.25em;
}

a.link-officine:hover {
  color: hsl(0, 80%, 55%) !important;
}

.officine-scroll-view {
  max-height: 70vh;
  overflow-y: auto;
  padding: 0 6px;
}

div.credits {
  text-align: right;
}

div.credits a {
  color: #004a98 !important;
}
div.credits a img {
  height: 22px;
  vertical-align: middle;
  text-decoration: none;
}

/* #endregion */

/* #region GridView classes */

/* #region sticky headers */

table.table > thead > tr > th {
  top: 136px;
  z-index: 1;
  border: none;
  height: 40px;
  position: sticky;
  background: #ffffff;
  vertical-align: middle;
}

table.table > tfoot > tr > td {
  background: #52ee63;
  position: sticky;
  bottom: 0;
  z-index: 1;
  border: none;
}

/* #endregion */

table.table {
  margin-top: 20px;
  font-family: "Assistant";
}

.table-striped > tbody > tr,
.table-striped > tfoot > tr {
  transition: background 100ms;
}

.table-striped > tbody > tr td:first-child {
  transition: background 100ms;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #eaeaea;
}
.table-striped > tbody > tr:nth-of-type(even):hover,
.table-striped > tbody > tr:nth-of-type(odd):hover {
  background-color: #cccccc;
}
.table-striped > tbody > tr > td {
  vertical-align: middle;
}
.table-striped > thead .form-control {
  padding: 5px;
}

th.large-col {
  min-width: 200px;
}
th.small-col {
  width: 100px;
}
th.small-col-60 {
  width: 60px;
  min-width: 60px;
}
th.small-col-70 {
  width: 70px;
  min-width: 70px;
}
th.small-col-75 {
  width: 80px;
  min-width: 75px;
}
th.small-col-90 {
  width: 90px;
  min-width: 90px;
}
th.small-col-100 {
  width: 100px;
  min-width: 100px;
}
th.small-col-min {
  width: 1px;
}
th.small-col-120 {
  width: 120px;
  min-width: 120px;
}
th.small-col-130 {
  width: 130px;
  min-width: 130px;
}
th.small-col-140 {
  min-width: 140px;
  width: 140px;
}
th.big-col-140 {
  min-width: 140px;
  width: 200px;
}
th.small-col-150 {
  min-width: 150px;
  width: 150px;
}
th.big-col-150 {
  min-width: 150px;
  width: 250px;
}
th.big-col-175 {
  min-width: 175px;
  width: 250px;
}
th.small-col-160 {
  min-width: 160px;
  width: 160px;
}
th.small-col-200 {
  width: 200px;
  min-width: 200px;
}
th.small-col-220 {
  width: 220px;
  min-width: 220px;
}
th.small-col-bool {
  min-width: 70px;
  width: 70px;
}

table tbody tr td div.row-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
}

table tbody tr td div.row-cell > :first-child {
  padding-right: 2px;
}

.grid-true,
.grid-true > a,
.grid-true > a:hover,
.grid-true > a:visited {
  color: #00aa00 !important;
}
.grid-false,
.grid-false > a,
.grid-false > a:hover,
.grid-false > a:visited {
  color: #aa0000 !important;
}
.grid-cyan,
.grid-cyan > a,
.grid-cyan > a:hover,
.grid-cyan > a:visited {
  color: #00aaaa !important;
}

tfoot > tr {
  border-top: 3px solid #cccccc;
  background: #eaeaea;
  color: #006699;
}

tfoot > tr:hover {
  background: #e0e0e0;
}

.phone-number {
  opacity: 0.8;
}

.cell-today {
  background: #54afff;
  font-weight: bold;
  box-shadow: 0 0 8px #3d86c5;
  outline: #3d86c5 solid 1px;
  outline-offset: -1px;
  position: relative;
}

.cell-scaduto {
  color: #ffffff;
  background: #ff3333;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
  outline: #a92c2c solid 1px;
  outline-offset: -1px;
  position: relative;
}

.cell-fine-mese {
  color: #ffffff;
  background: #5e35b1;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(94, 53, 177, 0.75);
  outline: #4527a0 solid 1px;
  outline-offset: -1px;
  position: relative;
}

.cell-warning {
  background: #ffc928;
  box-shadow: 0 0 8px rgba(255, 201, 40, 0.75);
}

.daterangepicker {
  color: #424242;
}

.text-yellow {
  color: #f59e0b;
}

td.action-column {
  cursor: default;
  user-select: none;
}

/* #endregion */

/* #region Link colors and icons */
a:not(.btn),
a:not(.btn):visited {
  color: #0881aa;
}

.pagination > .active > a:visited {
  color: #ffffff;
}

a:not(.btn):hover {
  color: #0881aa;
}

a.disabled,
a.disabled:hover {
  color: #555555bf !important;
  cursor: not-allowed;
}

a.disabled-red,
a.disabled-red:hover {
  color: #aa0000 !important;
  cursor: not-allowed;
}

.grayed {
  color: #808080 !important;
}

span.mdi-file-pdf {
  color: #ff5555;
}

span.mdi-file-word {
  color: #0d47a1;
}

a:not(.disabled) span.mdi-file-code {
  color: #43a047;
}

span.mdi.fatt-icon {
  color: #ff5555;
}

a:not(.disabled) span.mdi-file-excel {
  color: #217346;
}

span.mdi.icon-small {
  font-size: 1em;
}

span.mdi.icon-medium {
  font-size: 1.2em;
}

#officine-icon > svg {
  vertical-align: baseline;
  margin-bottom: -2px;
}

.mdi.float-left {
  line-height: 1.9em;
}
/* #endregion */

/* #region Global Bootstrap style overrides */

input.force-caps,
textarea.force-caps,
a.force-caps,
td.force-caps {
  text-transform: uppercase;
}

input.force-caps::placeholder,
textarea.force-caps::placeholder {
  text-transform: none;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #484d51;
  color: #fff;
}

.btn-secondary:hover {
  background-color: #484d51;
  color: #fff;
}

.bold {
  font-weight: bold;
}

span.v-baseline,
span.mdi.v-baseline {
  vertical-align: baseline;
}

span.v-middle,
span.mdi.v-middle {
  vertical-align: middle;
}

.pointer {
  cursor: pointer;
}

.kv-drp-dropdown > span.left-ind,
.kv-drp-dropdown > span.right-ind {
  display: none;
}

.select2-container--krajee li.select2-results__option {
  font-size: 0.85em;
}

code {
  background-color: #e0e0e0;
}

.txt-right {
  text-align: right;
}

.mt-0 {
  margin-top: 0;
}

.mt-10 {
  margin-top: 10px !important;
}

.mt-20 {
  margin-top: 20px !important;
}

.mt-n25 {
  margin-top: -25px;
}

.mt-60 {
  margin-top: 60px;
}

.mr-20 {
  margin-right: 20px;
}

.mr-10 {
  margin-right: 10px;
}

.ml-10 {
  margin-left: 10px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-20 {
  margin-bottom: 20px;
}

.pb-10 {
  padding-bottom: 10px;
}

.pb-15 {
  padding-bottom: 15px;
}

.pb-20 {
  padding-bottom: 20px;
}

.pb-40 {
  padding-bottom: 40px;
}

.officine-convenzionate-simplified .btn-container {
  margin-bottom: 10px;
}

.officine-convenzionate-simplified .btn-container .btn:nth-child(n + 2) {
  margin-left: 12px;
}

div.window-popup.share-menu {
  min-width: 400px;
}

div.center-buttons {
  text-align: center;
}

div.my-20 {
  margin-top: 20px;
  margin-bottom: 20px;
}

div.window-popup.share-menu .btn-primary {
  min-width: 300px;
}

.share-append-text-invia::after {
  content: "Invia";
  margin-left: 8px;
  font-weight: bold;
}

@media screen and (max-width: 400px) {
  div.window-popup.share-menu {
    min-width: 100%;
  }

  div.window-popup.share-menu .btn-primary {
    min-width: 100%;
  }
}

#sms-message {
  height: 180px;
}

/* #region Breadcrumbs */
ul.breadcrumb {
  background-color: transparent;
  padding: 0;
  font-size: 1.2em;
  margin-bottom: 12px;
}

ul.breadcrumb > li > a,
ul.breadcrumb > li > a:visited,
ul.breadcrumb > li > a:hover {
  color: #fafafa;
  position: relative;
  text-decoration: none;
}

ul.breadcrumb > li > a::after {
  position: absolute;
  bottom: -5px;
  left: -6px;
  right: -5px;
  top: -5px;
  background-color: #ffffff;
  border-radius: 4px;
  content: "";
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition-duration: 150ms;
  transition-property: opacity, transform;
}

ul.breadcrumb > li > a:hover::after {
  opacity: 0.2;
  transform: scale(1);
}

ul.breadcrumb li.active {
  font-weight: bold;
  color: #c2d3d6;
}

.breadcrumb > li + li:before {
  vertical-align: bottom;
  content: "\F035F\00a0";
  font-family: "Material Design Icons";
}
/* #endregion */

/* #region float in 2020?! */
.float-left {
  float: left;
}

.float-right {
  float: right;
}

.clearfix {
  float: none;
}
/* #endregion */

button.close {
  margin-left: 8px;
}

@media (min-width: 850px) {
  .form-horizontal .control-label {
    text-align: left;
  }
}

/* #region select2 in table filters stuff */
.table .select2-bootstrap-prepend .input-group-addon {
  padding: 6px 6px;
}

.table .select2-container--krajee .select2-selection--single {
  padding: 6px 44px 6px 6px;
}

.select2-container--krajee .select2-results > .select2-results__options {
  max-height: 232px;
}
/* #endregion */

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: 6px;
  will-change: font-size;
  transition: font-size 250ms ease-out;
}

.table.condensed > thead > tr > th,
.table.condensed > tbody > tr > th,
.table.condensed > tfoot > tr > th,
.table.condensed > thead > tr > td,
.table.condensed > tbody > tr > td,
.table.condensed > tfoot > tr > td {
  padding: 0 6px;
}

/* #endregion */

/* #region Draggable dashboard widgets */
ul.sortable.grid {
  border: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

ul.sortable.grid li {
  width: 32%;
  min-width: 500px;
  min-height: 237px;
  border-radius: 4px;
  border: 2px solid #cccccc;
  background: #eeeeee;
  text-align: left;
  padding: 20px;
  vertical-align: middle;
  cursor: default;
  transition: background 150ms;
}

ul.sortable.grid li:hover {
  background: #ffffff;
}

ul.sortable.grid li h3 {
  margin-top: 0;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #cccccc;
}

ul.sortable.grid li h3 a {
  width: 100%;
  display: block;
  text-decoration: none;
  color: #333333;
}

ul.sortable.grid li h3 a:hover {
  text-decoration: dotted;
}

ul.sortable.grid li.sortable-placeholder {
  opacity: 0.5;
  border: 2px dotted #424242;
}

/* Table widgets */
table.widget-table {
  width: 100%;
}

table.widget-table tr {
  height: 30px;
  padding: 0 5px;
}

table.widget-table > thead {
  font-weight: bold;
  border-bottom: 2px solid #646464;
}

table.widget-table > tbody > tr:nth-child(even) {
  background-color: #dddddd;
}
/* #endregion */

/* #region Smaller desktop (<1450px vw) classes */

@media (max-width: 1600px) and (min-width: 850px) {
  /* #region Tables */
  .table:not(.no-table-resize) > thead > tr > th,
  .table:not(.no-table-resize) > tbody > tr > th,
  .table:not(.no-table-resize) > tfoot > tr > th,
  .table:not(.no-table-resize) > thead > tr > td,
  .table:not(.no-table-resize) > tbody > tr > td,
  .table:not(.no-table-resize) > tfoot > tr > td {
    padding: 6px 4px;
    font-size: 0.85em;
    font-weight: 600;
  }

  .table.condensed:not(.no-table-resize) > thead > tr > th,
  .table.condensed:not(.no-table-resize) > tbody > tr > th,
  .table.condensed:not(.no-table-resize) > tfoot > tr > th,
  .table.condensed:not(.no-table-resize) > thead > tr > td,
  .table.condensed:not(.no-table-resize) > tbody > tr > td,
  .table.condensed:not(.no-table-resize) > tfoot > tr > td {
    padding: 0 4px;
    font-size: 0.85em;
    font-weight: 600;
  }

  .table > .select2.select2-container span.select2-selection > span {
    font-size: 0.85em;
    vertical-align: middle;
  }

  .table > .select2-container--krajee .select2-selection--single {
    padding: 10px 20px 8px 6px;
  }

  .table
    > .select2-container--krajee
    .select2-selection--single
    .select2-selection__clear {
    right: 2.8rem;
  }

  th.small-col-130 {
    width: 105px;
    min-width: 105px;
  }
  th.small-col-200 {
    width: 160px;
    min-width: 160px;
  }
  th.small-col-220 {
    width: 180px;
    min-width: 180px;
  }
  /* #endregion */

  /* #region Table filters */
  .table .select2-bootstrap-prepend .input-group-addon {
    padding: 6px 4px;
    font-size: 0.9em;
  }

  .table .select2-container--krajee .select2-selection--single {
    padding: 10px 44px 8px 4px;
    font-size: 0.9em;
  }
  /* #endregion */

  /* #region Main content padding */
  section.main section.content {
    padding: 10px;
    padding-top: 150px;
  }
  /* #endregion */

  /* #region Input groups stuff */
  .input-group-addon {
    padding: 6px;
  }
  /* #endregion */

  /* #region */

  th.small-col-100 {
    width: 85px;
    min-width: 85px;
  }

  th.small-col-120 {
    width: 100px;
    min-width: 100px;
  }
  /* #endregion */

  /* #region */
  section.main header table.dealer-disp-table {
    margin-right: 80px;
  }
  /* #endregion */
}

@media screen and (min-width: 992px) and (max-width: 1290px) {
  .site-login .container .tns-outer {
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
  }

  .site-login .container .main-slider-thumbnails {
    max-width: 87%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (max-width: 1080px) {
  section.main header table.dealer-disp-table {
    margin-right: 20px;
  }
}

@media screen and (max-width: 900px) {
  section.main header table.dealer-disp-table {
    display: none;
  }
}

/* #endregion */

/* #region Grid row colors */

/* #region Guasti */

tr[class^="guasto-stato"] > td:first-child a {
  color: #ffffff;
  font-weight: bold;
}

/* Guasti aperti */
tr.guasto-stato-1 > td:first-child {
  background-color: #fb2a2a;
  border: 1px solid #c40505;
}

/* Guasti in attesa */
tr.guasto-stato-2 > td:first-child {
  background-color: #ffc928;
  border: 1px solid #faab00;
}

tr.guasto-stato-2 > td:first-child a {
  color: #000000;
}

/* Guasti completati */
tr.guasto-stato-3 > td:first-child {
  background-color: #01a11c;
  border: 1px solid #07841c;
}

/* Guasti respinti */
tr.guasto-stato-4 > td:first-child {
  background-color: #212121;
  border-color: #121212;
}
/* #endregion */

/* #endregion */

/* #region Forms contratti + pacchetti */
.extra-soccorso > h4 + .form-row > .form-group {
  margin-bottom: 0;
}

.mdi.kmss.mdi-check-bold[data-kmss] {
  color: #00aa00;
}

.mdi.kmss.mdi-close-thick[data-kmss] {
  color: #aa0000;
}
/* #endregion */

/* #region Main alert window */

#main-alert-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  z-index: 100;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  display: none;
  /* Quadratic ease out */
  transition: opacity 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#main-alert-backdrop.main-alert-show {
  opacity: 1;
  display: flex;
}

#main-alert-backdrop h4 {
  display: flex;
  flex-direction: row;
}

#main-alert-backdrop h4 b {
  flex-grow: 1;
}

#main-alert-close,
.alert-close {
  background: none;
  border: none;
  font-weight: bold;
  font-size: 1.15em;
}

/* #endregion */

/* #region Sorting icons */
a.asc:after,
a.desc:after {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: "Glyphicons Halflings";
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  padding-left: 5px;
}

a.asc:after {
  content: "\e113";
}

a.desc:after {
  content: "\e114";
}

.sort-numerical a.asc:after {
  content: "\e153";
}

.sort-numerical a.desc:after {
  content: "\e154";
}

.sort-ordinal a.asc:after {
  content: "\e155";
}

.sort-ordinal a.desc:after {
  content: "\e156";
}

.grid-view th {
  white-space: nowrap;
}
/* #endregion */

/* #region Other table classes */

/* #region Widget disponibilità pacchetti */

table.transparent-striped > tbody > tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.2);
}

table.disp-pack {
  margin-left: 50px;
  margin-bottom: 4px;
}

table.disp-pack > thead,
table.disp-pack > tbody > tr > td:first-child {
  font-weight: bolder;
}

table.disp-pack tr > td {
  padding: 2px 12px;
}

/* #endregion */

/* #region Tabella riassuntiva disponibilità pacchetti */

div.disponibilita-pacchetti-index table tr td {
  transition: background 100ms;
  font-weight: bold;
}

div.disponibilita-pacchetti-index table tr td.rimanenze {
  background: #39ac3d;
}

div.disponibilita-pacchetti-index table tr:hover td.rimanenze {
  background: #339936;
}

div.disponibilita-pacchetti-index table tr td.inattiva {
  background: #c2eef4;
}

div.disponibilita-pacchetti-index table tr:hover td.inattiva {
  background: #ade3eb;
}

div.disponibilita-pacchetti-index table tr td.terminate {
  background: #ff3333;
}

div.disponibilita-pacchetti-index table tr:hover td.terminate {
  background: #d92626;
}

div.disponibilita-pacchetti-index table tr td.in_scadenza {
  background: #ffc928;
}

div.disponibilita-pacchetti-index table tr:hover td.in_scadenza {
  background: #f2b90d;
}

tr.importazione_row {
  font-style: italic;
}

/* #endregion */

/* #region Tabella riassuntiva incidenze dealer */
div.grid-view.incidenze table thead tr th {
  text-align: center;
}

div.grid-view.incidenze table tbody tr td:nth-child(1) {
  text-align: center;
}

div.grid-view.incidenze table tbody tr td {
  text-align: right;
}
/* #endregion */

/* #endregion */

/* #region Other utility classes */

/* #region Blue screen easter egg */
body.error-page {
  background: #3f689a;
  color: #ffffff;
}

body.error-page section.content {
  font-family: "VT323";
  font-size: 2em;
}

body.error-page section.content h1 {
  font-size: 2.3em;
}

body.error-page section.content p.error-text {
  font-size: 1.2em;
}
/* #endregion */

.no-select {
  user-select: none;
}

.datepicker table tr td.disabled {
  color: #dadada;
}

a.no-underline,
a.no-underline:hover {
  text-decoration: none;
}

.underline {
  text-decoration: underline !important;
}

span.slim {
  font-weight: 400;
}

.align-right {
  text-align: right;
}

div.flex {
  display: flex;
  flex-direction: row;
}

.inline-block {
  display: inline-block !important;
}

div.flex > div.flex-spacer {
  flex-grow: 1;
}

div.window-backdrop {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  z-index: 90;
  display: none;
  justify-content: center;
  align-items: center;
}

div.window-backdrop.alert-show {
  display: flex;
  opacity: 1;
  animation: popup-fadein 100ms ease-out;
}

@keyframes popup-fadein {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

div.window-popup {
  background: #ffffff;
  border-radius: 6px;
  width: 60%;
  min-width: 300px;
  max-width: 600px;
  box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.3);
}

div.window-popup h4 {
  display: flex;
  flex-direction: row;
  padding-bottom: 4px;
}

div.window-popup h4 b {
  flex-grow: 1;
}

div.window-popup div.button-container {
  text-align: right;
}

.form-control-sm {
  padding: 0rem 1rem;
  font-size: 1.2rem;
  height: 30px;
}

.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
  padding: 5px 5px;
}

.anchor {
  visibility: hidden;
  margin-top: -100px;
  position: relative;
}

/* #region REMOVE SECOND CALENDAR */

.daterangepicker .drp-calendar.left > .calendar-table {
  padding-right: 0 !important;
}

.daterangepicker .drp-calendar.right {
  margin-left: -40px !important;
}

.daterangepicker .drp-calendar.right tbody {
  display: none !important;
}

.daterangepicker .drp-calendar.right thead > tr:first-child > th:first-child {
  display: none !important;
}

.daterangepicker .drp-calendar.right thead > tr:first-child > th:last-child {
  padding: 1px 8px 1px 4px !important;
}

.daterangepicker .drp-calendar.right thead > tr:nth-child(2) {
  display: none !important;
}

.daterangepicker .drp-calendar.right th.month {
  display: none !important;
}

.daterangepicker .drp-calendar.right .calendar-table {
  background: transparent !important;
}

/* #endregion REMOVE SECOND CALENDAR */

/* #endregion */

/* #region Toast notification */
div.toast {
  position: fixed;
  z-index: 100;
  bottom: 30px;
  left: 30px;
  transform-origin: bottom center;
  display: none;
  background: #212121;
  color: #ffffff;
  padding: 10px 15px;
  width: 300px;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
}

div.toast.show {
  display: block;
  animation: showToast 100ms ease-out;
}

div.toast.hiding {
  display: block;
  animation: hideToast 100ms ease-out;
  transform: scale(0.85);
  opacity: 0;
}

@keyframes showToast {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes hideToast {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.85);
    opacity: 0;
  }
}
/* #endregion */

/* #region Mobile */

.mobile-only {
  display: none;
}

@media screen and (max-width: 849px) {
  .site-login .hide-mobile {
    display: none;
  }

  .site-login .mobile-only {
    display: block;
  }
  .site-login .login-mobile {
    margin-top: -30px;
    margin-bottom: 30px;
  }

  section.login-page-section {
    background: linear-gradient(to bottom, #668db7 0%, #fff 20%);
  }
}
/* #endregion */

/* #region Forms */
div.crud-form {
  display: flex;
  flex-direction: column;
}
div.crud-form h3 {
  padding: 20px 0 10px 0;
}

textarea {
  resize: vertical;
}

button#pdf-preview {
  margin-left: 6px;
}

.mdi {
  font-size: 1.5em;
}

.btn .mdi {
  font-size: 1em;
}

.input-group .mdi {
  font-size: 1.38em;
  line-height: 0.8;
  vertical-align: middle;
}

input.select2-search__field[aria-controls*="veicoli-marca_select"],
input.select2-search__field[aria-controls*="veicoli-modello_select"],
ul#select2-veicoli-marca_select-results > li,
ul#select2-veicoli-modello_select-results > li,
#select2-veicoli-marca_select-container,
#select2-veicoli-modello_select-container {
  text-transform: uppercase;
}

#select2-veicoli-marca_select-container > .select2-selection__placeholder,
#select2-veicoli-modello_select-container > .select2-selection__placeholder {
  text-transform: none;
}

@media (min-width: 850px) {
  div.gar-attive {
    max-width: 33.33%;
    flex-basis: 33.33%;
  }

  div.form-row {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    margin: 0 -10px;
    justify-content: space-between;
  }
  div.form-row.wrap {
    flex-wrap: wrap;
  }
  div.form-col {
    padding: 0 10px;
    -ms-flex-positive: 1;
    flex-grow: 1;
  }
  div.form-col.no-grow {
    flex-grow: 0;
  }
  div.form-col-shrink {
    padding: 0 10px;
    -ms-flex-positive: 0;
    flex-grow: 0;
    -ms-flex-negative: 1;
    flex-shrink: 1;
  }
  div.form-col.items-center {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  div.form-col.items-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
  .text-sm-center {
    text-align: center;
  }
  /* TODO clean up this mess */
  div.form-col.w120 {
    min-width: 120px;
    max-width: 120px;
  }
  div.form-col.w75 {
    max-width: 75%;
    flex-basis: 75%;
  }
  div.form-col.w66 {
    max-width: 66%;
    flex-basis: 66%;
  }
  div.form-col.w60 {
    max-width: 60%;
    flex-basis: 60%;
  }
  div.form-col.w50 {
    max-width: 50%;
    flex-basis: 50%;
  }
  div.form-col.w40 {
    max-width: 40%;
    flex-basis: 40%;
  }
  div.form-col.w37 {
    max-width: 37.5%;
    flex-basis: 37.5%;
  }
  div.form-col.w33 {
    max-width: 33.33%;
    flex-basis: 33.33%;
  }
  div.form-col.w30 {
    max-width: 30%;
    flex-basis: 30%;
  }
  div.form-col.w28 {
    max-width: 28%;
    flex-basis: 28%;
  }
  div.form-col.w25 {
    max-width: 25%;
    flex-basis: 25%;
  }
  div.form-col.w20 {
    max-width: 20%;
    flex-basis: 20%;
  }
  div.form-col.w16 {
    max-width: 16%;
    flex-basis: 16%;
  }
  div.crud-form > * {
    align-self: center;
    min-width: 730px;
    width: 61.8%;
  }
}

div.gar-attive {
  display: flex;
  flex-direction: row;
}

/* #endregion */

/* #region Checkbox groups */
.checkbox-list > * {
  display: block;
  line-height: 2.5em;
}

.checkbox-login label {
  padding-left: 0px;
}

.checkbox-login span.checkbox-label,
.checkbox-list span.checkbox-label {
  margin-left: 8px;
  font-weight: 700;
}

.checkbox-login {
  margin-top: 2px;
}

input[type="checkbox"] {
  display: none;
}

input[type="checkbox"] + span.checkbox-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid #aaaaaa;
  background-color: #dddddd;
  border-radius: 4px;
  padding: 4px 3px;
  vertical-align: text-bottom;
  transition: background-color 50ms;
  margin-top: 5px;
}

label.condensed-checkbox {
  margin-bottom: 2px;
}

label.condensed-checkbox input[type="checkbox"] + span.checkbox-icon {
  margin-top: 2px;
}

input[type="checkbox"]:hover + span.checkbox-icon {
  background-color: #cacaca;
}

input[type="checkbox"]:checked + span.checkbox-icon {
  background-color: #fb2a2a;
  border: 1px solid #c40505;
}

input[type="checkbox"]:checked:hover + span.checkbox-icon {
  background-color: #da1919;
}

input[type="checkbox"]:checked + span.checkbox-icon > span.checkmark {
  border-bottom: 3px solid #ffffff;
  border-left: 3px solid #ffffff;
  transform: rotate(-45deg);
  display: block;
  height: 7px;
  width: 12px;
  animation: checkmark-activation 250ms cubic-bezier(0.46, 0.03, 0.52, 0.96);
}

@keyframes checkmark-activation {
  0% {
    clip-path: polygon(0 0, 25% 0, 25% 0, 25% 0, 0 0);
  }
  45% {
    clip-path: polygon(0 0, 25% 0, 25% 50%, 25% 100%, 0 100%);
  }
  50% {
    clip-path: polygon(0 0, 25% 0, 25% 50%, 25% 100%, 0 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%);
  }
}
/* #endregion */

/* #region Smaller form controls */

/* .form-control {
  height: 28px;
  padding: 3px !important;
}

.select2-container--krajee .select2-selection--single {
  height: 28px;
}

.select2-container--krajee .select2-selection--single .select2-selection__arrow {
  height: 26px;
} */

/* #endregion */

/* #region Easter egg, have fun! */

.drunk {
  animation: drunk 30s infinite;
}

@keyframes drunk {
  0% {
    transform: none;
  }
  20% {
    transform: translate(-2px, 0px) rotate(-0.4deg);
  }
  40% {
    transform: scaleY(1.1) translate(2px, 4px);
  }
  60% {
    transform: scaleX(1.05) translateX(-2px) rotate(0.6deg);
  }
  80% {
    transform: translate(1px, -2px);
  }
  100% {
    transform: none;
  }
}
/* #endregion */

.footer {
  height: 60px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

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

.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: 15px;
  border: none;
}

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

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
  text-decoration: none;
}

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