/* ip6.ch layout - recreates the jQuery UI "ui-lightness" look on top of Bootstrap 5 */

@font-face {
  font-family: MatthiasCramerHandwriting;
  src: url('/static/fonts/MatthiasCramerHandwriting.ttf') format("truetype");
}

:root {
  --ui-orange: #f6a828;
  --ui-orange-border: #e78f08;
  --ui-blue: #1c94c4;
  --ui-hover-text: #c77405;
  --ui-active-text: #eb8f00;
  --bs-body-font-family: 'Roboto', helvetica, verdana, sans-serif;
  --bs-body-font-size: 13px;
  --bs-link-color-rgb: 28, 148, 196;
  --bs-link-hover-color-rgb: 199, 116, 5;
}

body {
  font-family: 'Roboto', helvetica, verdana, sans-serif;
  font-size: 13px;
  background: #fff;
  color: #333;
  padding-bottom: 1em;
}

h1 {
  font: bold 30px "MatthiasCramerHandwriting", serif;
  text-shadow: 3px 3px 7px #333;
  margin: 0.6em 0 0.5em;
  padding-right: 90px; /* keep clear of the beta ribbon */
  word-break: break-word;
}

.beta {
  background-color: #e6d72b;
  font-size: 40px;
  font-weight: bold;
  width: 200px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  transform: rotate(45deg);
  opacity: 0.85;
  position: fixed;
  right: -50px;
  top: 32px;
  z-index: 5000;
  pointer-events: none;
}

.beta span {
  position: relative;
  top: -3px;
}

/* ---------- Tabs (ui-tabs) ---------- */

.ui-tabs {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #eee url('/static/img/ui/ui-bg_highlight-soft_100_eeeeee_1x100.png') 50% top repeat-x;
  padding: 0.2em;
}

.ui-tabs-nav {
  border: 1px solid var(--ui-orange-border);
  border-radius: 4px;
  background: var(--ui-orange) url('/static/img/ui/ui-bg_gloss-wave_35_f6a828_500x100.png') 50% 50% repeat-x;
  padding: 0.2em 0.2em 0;
  gap: 0.2em;
  flex-wrap: wrap;
}

.ui-tabs-nav .nav-link {
  font-weight: bold;
  font-size: 1em;
  color: var(--ui-blue);
  border: 1px solid #ccc;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #f6f6f6 url('/static/img/ui/ui-bg_glass_100_f6f6f6_1x400.png') 50% 50% repeat-x;
  padding: 0.5em 1em;
  margin-bottom: -1px;
  white-space: nowrap;
}

.ui-tabs-nav .nav-link:hover,
.ui-tabs-nav .nav-link:focus-visible {
  color: var(--ui-hover-text);
  border-color: #fbcb09;
  background: #fdf5ce url('/static/img/ui/ui-bg_glass_100_fdf5ce_1x400.png') 50% 50% repeat-x;
}

.ui-tabs-nav .nav-link.active {
  color: var(--ui-active-text);
  border-color: #fbd850;
  background: #fff url('/static/img/ui/ui-bg_glass_65_ffffff_1x400.png') 50% 50% repeat-x;
  padding-bottom: calc(0.5em + 1px);
}

.ui-tabs-content {
  padding: 1em 1.4em;
}

/* Phones: one scrollable row of tabs instead of a tall stack */
@media (max-width: 767.98px) {
  .ui-tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .ui-tabs-content {
    padding: 0.8em 0.5em;
  }
  h1 {
    font-size: 24px;
  }
  .beta {
    font-size: 26px;
    width: 160px;
    height: 28px;
    line-height: 28px;
    right: -48px;
    top: 18px;
  }
}

/* ---------- Buttons (ui-button) ---------- */

.ui-button {
  font-weight: bold;
  color: var(--ui-blue);
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f6f6f6 url('/static/img/ui/ui-bg_glass_100_f6f6f6_1x400.png') 50% 50% repeat-x;
  padding: 0.3em 1em;
  line-height: 1.5;
  white-space: nowrap;
}

.ui-button:hover:not(:disabled),
.ui-button:focus-visible {
  color: var(--ui-hover-text);
  border-color: #fbcb09;
  background: #fdf5ce url('/static/img/ui/ui-bg_glass_100_fdf5ce_1x400.png') 50% 50% repeat-x;
}

.ui-button:active:not(:disabled) {
  color: var(--ui-active-text);
  border-color: #fbd850;
  background: #fff url('/static/img/ui/ui-bg_glass_65_ffffff_1x400.png') 50% 50% repeat-x;
}

.ui-button:disabled {
  opacity: 0.35;
}

.bottom {
  clear: both;
  margin: 1em 0 0 0.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

/* ---------- Result boxes ---------- */

.fancybox {
  margin: 0.5em;
}

.fancybox > div {
  border: 1px solid #000;
  border-radius: 5px;
  padding: 1em 5px 5px;
  color: var(--ui-blue);
  background-color: #f7f7f7;
  min-height: 2.5em;
  overflow-wrap: anywhere;
}

.boxheader {
  position: relative;
  top: 0.7em;
  left: 10px;
  border: 1px solid #000;
  border-radius: 5px;
  background-color: #fff;
  padding: 0 4px;
}

.mono,
.fancybox pre {
  font-family: Consolas, 'Lucida Console', 'DejaVu Sans Mono', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}

.fancybox dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 0.8em;
  margin: 0;
}

.fancybox dt {
  font-weight: normal;
}

.fancybox dd {
  margin: 0;
  overflow-wrap: anywhere;
}

pre.indent {
  margin: 0.3em 0 0.6em 2em;
}

@media (max-width: 575.98px) {
  pre.indent {
    margin-left: 0.5em;
  }
  .fancybox {
    margin: 0.5em 0;
  }
}

.command {
  margin-bottom: 0.5em;
}

.form-control-sm, .form-select-sm {
  font-size: 13px;
}

/* iOS zooms into inputs with a font size below 16px */
@media (max-width: 767.98px) {
  .form-control-sm, .form-select-sm {
    font-size: 16px;
  }
}

/* jQuery UI error state */
.ui-state-error {
  border: 1px solid #cd0a0a;
  border-radius: 4px;
  background: #b81900 url('/static/img/ui/ui-bg_diagonals-thick_18_b81900_40x40.png') 50% 50% repeat;
  color: #fff;
  padding: 0.3em 0.5em;
}

.ui-state-highlight {
  border: 1px solid #fed22f;
  border-radius: 4px;
  background: #ffe45c url('/static/img/ui/ui-bg_highlight-soft_75_ffe45c_1x100.png') 50% top repeat-x;
  color: #363636;
  padding: 0.3em 0.5em;
}

.modal-header.ui-dialog-titlebar {
  border: 1px solid var(--ui-orange-border);
  background: var(--ui-orange) url('/static/img/ui/ui-bg_gloss-wave_35_f6a828_500x100.png') 50% 50% repeat-x;
  color: #fff;
  font-weight: bold;
}

/* ---------- Traceroute ---------- */

#troutput {
  margin: 1em 0;
}

#troutput table {
  font-size: 12px;
  margin-bottom: 0;
  --bs-table-bg: transparent;
}

#troutput th, #troutput td {
  padding: 0.15em 0.5em 0.15em 0;
  white-space: nowrap;
  vertical-align: middle;
}

#troutput td.host {
  white-space: normal;
  min-width: 10em;
}

@media (max-width: 575.98px) {
  #troutput .timegraph {
    display: none;
  }
}

@media (max-width: 767.98px) {
  #troutput .geocode {
    display: none;
  }
}

.timegraph {
  width: 100px;
  min-width: 100px;
}

.tg {
  position: relative;
  width: 100px;
  height: 12px;
}

.tg .max, .tg .min, .tg .avg {
  position: absolute;
  top: 0;
  left: 0;
  height: 12px;
}

.tg .max {
  background-color: red;
}

.tg .min {
  background-color: #00c000;
}

.tg .avg {
  width: 2px;
  background-color: blue;
}

#trmap {
  margin-top: 1em;
  width: 100%;
  height: 400px;
  min-height: 300px;
}

.plugins img {
  max-width: 45%;
  height: auto;
}

/* ---------- Ad-Block detection ---------- */

.notblocked {
  display: inline;
}

.blocked {
  display: none;
}

.adblock .notblocked {
  display: none;
}

.adblock .blocked {
  display: inline;
}
