/*
 * WeeWX Bootstrap Skin - Modern visual layer
 * ------------------------------------------------------------
 * Compatibility-first CSS overlay for the existing Bootstrap 3 skin.
 * No WeeWX/Cheetah tags, links, JavaScript or template structure are
 * required to change for this design layer.
 */

:root {
  --wx-bg: #f4f7fa;
  --wx-surface: #ffffff;
  --wx-surface-soft: #f9fbfc;
  --wx-text: #203040;
  --wx-muted: #6f7f8d;
  --wx-heading: #183b56;
  --wx-border: #e1e8ee;
  --wx-primary: #1769aa;
  --wx-primary-dark: #0f4d80;
  --wx-header-mid: #145b93;
  --wx-accent: #72d6ff;
  --wx-radius: 14px;
  --wx-shadow: 0 8px 28px rgba(30, 56, 78, 0.08);
  --wx-shadow-small: 0 4px 16px rgba(30, 56, 78, 0.06);
}

html {
  background: var(--wx-bg);
}

body {
  background: var(--wx-bg);
  color: var(--wx-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  padding-bottom: 24px;
}

a {
  color: var(--wx-primary);
  transition: color 0.15s ease, background-color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
}

a:hover,
a:focus {
  color: var(--wx-primary-dark);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--wx-heading);
  font-family: Arial, Helvetica, sans-serif;
}

h3 {
  margin-top: 8px;
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 700;
}

h4 {
  font-size: 16px;
  font-weight: 700;
}

/* Navigation ------------------------------------------------- */
.navbar.navbar-inverse {
  min-height: 56px;
  margin-bottom: 26px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #0b3558 0%, #1769aa 100%);
  box-shadow: 0 6px 22px rgba(5, 38, 64, 0.18);
}


.navbar-logo {
  float: left;
  height: 56px;
  padding: 13px 14px 13px 0;
  line-height: 30px;
}

.navbar-logo img {
  display: block;
  width: auto;
  height: 30px;
  max-width: none;
}

.navbar-inverse .navbar-nav > li > a {
  padding-top: 18px;
  padding-bottom: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 -3px 0 var(--wx-accent);
}

.navbar-inverse .navbar-text {
  margin-top: 18px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.navbar-inverse .navbar-toggle {
  margin-top: 11px;
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}

.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
  background: rgba(255, 255, 255, 0.10);
}

.navbar-inverse .navbar-toggle .icon-bar {
  background-color: #ffffff;
}

/* About project logo ----------------------------------------- */
/* Main content ----------------------------------------------- */
.container > .row {
  margin-bottom: 2px;
}

.main {
  color: var(--wx-text);
}

.main p {
  margin-bottom: 11px;
}

.main hr,
.container > hr {
  border-top-color: var(--wx-border);
}

/* Last update ------------------------------------------------ */
.update-box {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--wx-border);
  border-radius: 10px;
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow-small);
  color: var(--wx-primary);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.update-box-label {
  font-weight: 700;
  color: var(--wx-primary);
}

.update-box-time {
  color: var(--wx-primary);
  font-weight: 700;
}

/* Gauge panel ------------------------------------------------ */
.container > .row > .col-md-4 > .row > .col-md-6 {
  padding-top: 10px;
  padding-bottom: 8px;
}

.container > .row > .col-md-4 > .row > .col-md-6 img {
  max-width: 100%;
  height: auto;
  padding: 8px;
  border: 1px solid #e8eef2;
  border-radius: 50%;
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow-small);
}

.container > .row > .col-md-4 > .row > .col-md-6 h5 {
  min-height: 30px;
  margin-top: 9px;
  margin-bottom: 6px;
  color: #506777;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* Current value boxes ---------------------------------------- */
.stats {
  margin-top: 8px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow);
}

.stats_header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--wx-border);
  background: var(--wx-surface-soft);
}

.stats_header h4 {
  margin: 0;
  color: #24465f;
  font-size: 15px;
  font-weight: 700;
}

.stats .table {
  margin-bottom: 0;
  background: var(--wx-surface);
}

.stats .table > tbody > tr > td {
  padding: 9px 14px;
  border-top: 1px solid #edf2f5;
  vertical-align: middle;
}

.stats .table > tbody > tr:first-child > td {
  border-top: 0;
}

.stats .table-hover > tbody > tr:hover {
  background: #f7fbfd;
}

.stats_label {
  width: 59%;
  color: #5f7180;
}

.stats_data {
  color: var(--wx-heading);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

/* Time period navigation ------------------------------------- */
.nav-pills {
  display: inline-block;
  padding: 5px;
  border: 1px solid var(--wx-border);
  border-radius: 12px;
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow-small);
}

.nav-pills > li > a {
  padding: 8px 15px;
  border-radius: 9px;
  color: #496171;
  font-weight: 600;
}

.nav-pills > li > a:hover,
.nav-pills > li > a:focus {
  background: #edf6fb;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  color: #ffffff;
  background: var(--wx-primary);
  box-shadow: 0 3px 10px rgba(23, 105, 170, 0.18);
}

/* WeeWX graph images ----------------------------------------- */
.main > .row > .col-md-6 {
  padding-bottom: 4px;
}

.main > .row > .col-md-6 > a {
  display: block;
  padding: 9px;
  overflow: hidden;
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow);
}

.main > .row > .col-md-6 > a:hover,
.main > .row > .col-md-6 > a:focus {
  border-color: #c9dbe7;
  box-shadow: 0 10px 30px rgba(30, 56, 78, 0.12);
}

.main > .row > .col-md-6 > a > img.img-responsive {
  width: 100%;
  border-radius: 9px;
}

/* Generic content pages -------------------------------------- */
.main > img,
.main > p > img,
.main > a > img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.main > img {
  box-shadow: var(--wx-shadow-small);
}

.main table:not(.table) {
  width: 100%;
  margin: 12px 0 22px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--wx-border);
  border-radius: 10px;
  background: var(--wx-surface);
}

.main table:not(.table) th,
.main table:not(.table) td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf2f5;
  vertical-align: top;
}

.main table:not(.table) tr:last-child th,
.main table:not(.table) tr:last-child td {
  border-bottom: 0;
}

.main table:not(.table) th {
  color: #38566b;
  background: #f7fafc;
  font-weight: 700;
}

.table {
  color: var(--wx-text);
  background: var(--wx-surface);
}

.table > thead > tr > th {
  border-bottom-color: var(--wx-border);
  color: #38566b;
  background: #f7fafc;
}

.table > tbody > tr > td,
.table > tbody > tr > th {
  border-top-color: #edf2f5;
}

/* Bootstrap components used by extensions ------------------- */
.panel,
.well,
.thumbnail {
  border-color: var(--wx-border);
  border-radius: var(--wx-radius);
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow-small);
}

.panel-default > .panel-heading {
  border-color: var(--wx-border);
  background: var(--wx-surface-soft);
  color: var(--wx-heading);
}

.btn-primary {
  border-color: var(--wx-primary);
  background: var(--wx-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  border-color: var(--wx-primary-dark);
  background: var(--wx-primary-dark);
}

/* Lightbox --------------------------------------------------- */
.modal-content {
  overflow: hidden;
  border: 0;
  border-radius: var(--wx-radius);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

/* Footer ----------------------------------------------------- */
footer {
  padding: 4px 2px 16px;
  color: #7b8b97;
  font-size: 12px;
}

footer p {
  margin-bottom: 0;
}

footer a {
  color: #526f84;
}

/* Responsive adjustments ------------------------------------ */
@media (max-width: 1199px) {
  .navbar-inverse .navbar-nav > li > a {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
  }
}

@media (max-width: 991px) {
  .navbar-inverse .navbar-text {
    float: none !important;
    margin-left: 15px;
  }

  .container > .row > .col-md-4 {
    margin-bottom: 16px;
  }

  .main {
    margin-top: 8px;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 13px;
  }

  .navbar.navbar-inverse {
    margin-bottom: 18px;
  }

  .navbar-inverse .navbar-collapse {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
  }

  .navbar-inverse .navbar-nav > li > a {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .navbar-inverse .navbar-nav > .active > a,
  .navbar-inverse .navbar-nav > .active > a:hover,
  .navbar-inverse .navbar-nav > .active > a:focus {
    box-shadow: inset 3px 0 0 var(--wx-accent);
  }

  .navbar-inverse .navbar-text {
    margin-top: 10px;
    margin-bottom: 12px;
  }

  .container > .row > .col-md-4 > .row > .col-md-6 {
    float: left;
    width: 50%;
  }

  .nav-pills > li > a {
    padding: 7px 11px;
    font-size: 12px;
  }

  .stats_data {
    white-space: normal;
  }

  .main > .row > .col-md-6 {
    margin-bottom: 14px;
  }
}

@media (max-width: 420px) {
  .container > .row > .col-md-4 > .row > .col-md-6 {
    padding-left: 6px;
    padding-right: 6px;
  }

  .stats .table > tbody > tr > td {
    padding: 8px 10px;
  }

  .nav-pills {
    display: block;
  }

  .nav-pills > li {
    width: 25%;
    text-align: center;
  }

  .nav-pills > li > a {
    padding-left: 4px;
    padding-right: 4px;
  }
}


/* Media / embeds on content pages --------------------------- */
.wx-media-block {
  margin-bottom: 18px;
}

.wx-media-card {
  display: block;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow);
}

.wx-media-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  border-radius: 10px;
}

.wx-media-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 600px;
  border: 0 !important;
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 767px) {
  .wx-media-frame {
    min-height: 420px;
  }
}


/* Webcam: preserve source aspect ratio and never crop -------- */
.wx-webcam-card {
  width: 100%;
  max-width: 100%;
}

.wx-webcam-image {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto;
  object-fit: contain;
}


/* V7: blue page headings and gauge labels ------------------- */
.main > h3,
.main > h4 {
  color: var(--wx-primary) !important;
}

.container > .row > .col-md-4 > .row > .col-md-6 h5 {
  color: var(--wx-primary) !important;
}


/* V8: blue summary heading ---------------------------------- */
.stats_header h4 {
  color: var(--wx-primary) !important;
}


/* V9: switch Bootstrap 3 navbar to hamburger below 1200px --- */
@media (max-width: 1199px) {
  .navbar-header {
    float: none;
  }

  .navbar-left,
  .navbar-right {
    float: none !important;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-collapse {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
  }

  .navbar-fixed-top {
    top: 0;
    border-width: 0 0 1px;
  }

  .navbar-collapse.collapse {
    display: none !important;
  }

  .navbar-nav {
    float: none !important;
    margin-top: 7.5px;
  }

  .navbar-nav > li {
    float: none;
  }

  .navbar-nav > li > a {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .navbar-text {
    float: none !important;
    margin-left: 15px;
  }

  .navbar-collapse.collapse.in {
    display: block !important;
  }

  .collapsing {
    overflow: hidden !important;
  }
}


/* V10: use the mid blue from the navbar gradient ------------- */
.main > h3,
.main > h4,
.stats_header h4,
.container > .row > .col-md-4 > .row > .col-md-6 h5 {
  color: var(--wx-header-mid) !important;
}


/* V11: media must never be cropped --------------------------- */
.wx-media-block,
.wx-media-card,
.wx-webcam-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible !important;
}

.wx-media-card > img,
.wx-media-image,
.wx-webcam-image {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain !important;
  object-position: center center;
  clip: auto !important;
}

.main .wx-media-block .row,
.main .wx-media-block,
.main .wx-media-card {
  overflow: visible !important;
}


/* V13: Impressum / Datenschutz ------------------------------ */
.legal-page {
  margin-bottom: 22px;
}

.legal-card {
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--wx-border);
  border-radius: var(--wx-radius);
  background: var(--wx-surface);
  box-shadow: var(--wx-shadow-small);
}

.legal-card h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--wx-header-mid) !important;
}

.legal-card address {
  margin-bottom: 0;
  line-height: 1.65;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-note {
  color: var(--wx-muted);
  font-size: 12px;
}

@media (max-width: 767px) {
  .legal-card {
    padding: 16px;
  }
}


/* V14: legal footer alignment and colour --------------------- */
footer {
  text-align: right;
}

footer p {
  text-align: right;
}

footer a,
footer a:visited {
  color: var(--wx-header-mid) !important;
}

footer a:hover,
footer a:focus {
  color: var(--wx-primary-dark) !important;
  text-decoration: none;
}


/* V15: inactive timespan tabs use title blue ---------------- */
.nav-pills > li > a {
  color: var(--wx-header-mid) !important;
}

.nav-pills > li > a:hover,
.nav-pills > li > a:focus {
  color: var(--wx-header-mid) !important;
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  color: #ffffff !important;
}
