/* Margin for boxes */
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
  padding-left: 5px;
  padding-right: 5px;
}

/* Font */
body {
  font-family: 'Inter', sans-serif;
}

/* Ensure consistent sizing and alignment for map and plot outputs */
.leaflet-container, .js-plotly-plot {
  height: 400px;
}

/* Leaflet container height on small screens */
@media (max-width: 920px) {
  .leaflet-container, .js-plotly-plot {
    height: 300px;
  }
  .row .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12,
  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* Button styling with hover effect */
.btn {
  border: 1px solid transparent;
  box-shadow: none;
  transition: all .3s ease;
}
.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 4px 0 rgba(0,0,0,.2);
}

.jumbotron {
  margin-bottom: 20px;
  padding: 20px 15px;
  background-color: #f7f7f7;
}

.btn-cprimary {
  background-color: #337ab7;
  border-color: #2e6da4;
}

.container, .container-fluid {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.table > tbody > tr > td {
  padding: 8px;
  border-top: none;
}

/* Logo format */
#logo {
  position: absolute;
  top: -10px;
  right: 0px;
  z-index: 1000;
}

/* Smallscreen header and logo format */
@media (max-width: 620px) {
  .jumbotron-heading {
    text-align: left !important;
    font-size: 32px !important;
  }
  .jumbotron-subtitle {
    text-align: left !important;
    font-size: 18px !important;
  }
  #logo {
    transform: scale(0.65);
    position: absolute;
    top: -20px;
    right: -12px;
    z-index: 1000;
  }
}

.jumbotron.text-center {
  padding-top: 20px;
  padding-bottom: 20px;
}

.jumbotron-heading {
  text-align: center;
}

/* Custom css colors */
.card-cold { background-color: #5db8d5; }
.card-warm { background-color: #FFA500; }
.card-neutral { background-color: #073763; }

/* Change tabPanel label color to black */
.nav-tabs > li > a {
  color: black !important;
}

/* Something with display flexes */
nav.nav-tabs {
  display: block;
}

@media (max-width: 620px) {
  .nav:not(.nav-hidden) {
    display: none !important;
  }
}

/* Font size of Valueboxes */
.small-box {
  font-size: 140%;
}

/* Button forwärts rückwärts styling */
.styled-button {
  background-color: grey;
  border: none;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 12px;
}

/* white text for tables */
.white-text {
  color: white;
  font-size: 110% !important;
}

.dataTables_wrapper .dataTable thead th,
.dataTables_wrapper .dataTable td {
  color: white !important;
}

#red-line {
  height: 4px;
  background-color: #e4023c;
  width: 100%;
}

.icon-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f8f9fa;
  padding: 5px 0;
  box-shadow: 0px -2px 4px rgba(0,0,0,0.2);
  text-align: center;
  z-index: 9999;
}

.icon-bar .action-button {
  display: inline-block;
  width: calc(16.66% - 10px);
  border: none;
  cursor: pointer;
  padding: 10px;
  background-color: transparent;
  text-align: center;
  vertical-align: top;
  box-sizing: border-box;
}

.icon-bar .action-button:hover {
  background-color: #ddd;
}

.icon-bar .action-button .icon-text {
  display: block;
  font-size: 8px;
  margin-top: 3px;
}

.value-box-text {
  font-size: 85% !important;
}
.value-box-subtitle {
  font-size: 75% !important;
}

/* Base styles Menu */
#iconMenu, #logo {
  display: block;
}

/* Hide #iconMenu by default */
#iconMenu {
  display: none !important;
}

/* Show IconMenu and change other things on small screens */
@media (max-width: 620px) {
  #iconMenu {
    display: block !important;
  }
  body {
    padding-bottom: 80px;
  }
  .hide-on-small {
    display: none;
  }
  .value-box-text {
    font-size: 60% !important;
  }
  .value-box-subtitle {
    font-size: 80% !important;
  }
  .card-cold .card-header, .card-cold .card-body {
    font-size: 75% !important;
  }
  .card-warm .card-header, .card-warm .card-body {
    font-size: 75% !important;
  }
}

/* Logo disappears on very small screens */
@media (max-width: 374px) {
  #logo {
    display: none !important;
  }
}

.box.box-navy {
  border-top-color: navy;
}

/* Change the main filled-in bar color */
.irs-bar {
  background: #d3d3d3 !important;
  border-top: 1px solid #d3d3d3 !important;
  border-bottom: 1px solid #d3d3d3 !important;
}

/* Edge of the bar (for single-handle sliders) */
.irs-bar-edge {
  background: #d3d3d3 !important;
  border: 1px solid #d3d3d3 !important;
}

/* The track line behind the bar */
.irs-line {
  background: #f5f5f5 !important;
  border: 1px solid #d3d3d3 !important;
}

/* The draggable slider handle */
.irs-slider {
  width: 20px !important;
  height: 20px !important;
  top: 22px !important;
  background: #ffffff !important;
  border: 1px solid #999999 !important;
}

/* The bubble that displays the current value for single sliders */
.irs-single {
  background: #d3d3d3 !important;
  border: 1px solid #999999 !important;
  color: black !important;
}

.ui-slider-range {
  background: #d3d3d3 !important;
}
.ui-slider-handle {
  border-color: #d3d3d3 !important;
  background: #d3d3d3 !important;
}

.small-box {
  border-radius: 15px !important;
  overflow: hidden;
}

.box {
  border-radius: 15px !important;
  overflow: hidden;
}

/* Ensure the header rounds on the top corners */
.box-header {
  border-top-left-radius: 15px !important;
  border-top-right-radius: 15px !important;
}

/* Ensure the footer rounds on the bottom corners */
.box-footer {
  border-bottom-left-radius: 15px !important;
  border-bottom-right-radius: 15px !important;
}

/* At screen widths below 920px (adjust the breakpoint if needed) */
@media (max-width: 920px) {
  /* Force the row to use flexbox */
  .row {
    display: flex;
    flex-direction: column;
  }
  /* Make the column with the current temperature come first */
  .current-col {
    -webkit-order: -1 !important;
    -ms-flex-order: -1 !important;
    order: -1 !important;
  }
}

/* Style for the cold locations box */
#coldBox .box {
  background-color: #283043 !important;
  color: white;
}
#coldBox .box-header {
  background-color: #283043 !important;
  color: white;
}

/* Style for the warm locations box */
#warmBox .box {
  background-color: #e9ac3a !important;
  color: white;
}
#warmBox .box-header {
  background-color: #e9ac3a !important;
  color: white;
}

/* Language switch button */
.lang-switch-btn {
  display: inline-block;
  padding: 8px 16px;
  margin-left: 10px;
  background-color: #e4023c;
  color: white !important;
  text-decoration: none !important;
  font-weight: bold;
  font-size: 14px;
  border-radius: 20px;
  transition: all 0.3s ease;
  vertical-align: middle;
}

.lang-switch-btn:hover {
  background-color: #c4022f;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Position language switch in icon bar on mobile */
@media (max-width: 620px) {
  .icon-bar .lang-switch-btn {
    position: absolute;
    top: -45px;
    right: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Position language switch near logo on desktop */
@media (min-width: 621px) {
  .lang-switch-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
  }
}
