/* This is the Underdark customers portal theme. Its structure is based on
SMACSS. See https://smacss.com for more info. */

/* table */
table .fa:only-child {
  display: block;
  width: 1rem;
  margin: 0 auto;
}

/* table */
tbody tr.overdue td {
  color: hsl(0, 43%, 51%);
  background-color: hsl(0, 43%, 92%);
}
tbody tr.overdue:nth-child(odd) td {
  background-color: hsl(0, 43%, 90%);
}

/* folding table */
tr.folding>td>input:first-of-type, /* hide the checkbox */
tr.folding>td>input:first-of-type:not(:checked) + * { /* hide the first not checkbox in the folding row when the checkbox is not checked. */
  display:none;
}
tr.folding td { /* remove any padding from the table cells so that we in fact fold neatly */
  padding:0;
  margin:0;
}
tr.folding>td>*:not(:first-child) { /* add padding to the content element again */
  margin:.5em 1em .5em 4em;
}

/* graph */
.graph,
.svggraph,
.graph li.stats {
  border-color:#3b67a0 !important;
}
.graph li.stats:nth-child(odd) {
  background-color: #e8e8e8;
}
.income {
  background-color: #FFA700;
}
svg .income,
svg .total,
svg .actions {
  opacity: .6;
}
.total, .actions {
  background-color: #3b67a0;
}

table a.button,
form[action*="delete"] [type="submit"],
form[action*="disable"] [type="submit"],
form[action*="cancel"] [type="submit"] {
  background-color: #888;
}
table a.button:hover,
table a.button:focus,
form[action*="delete"] [type="submit"]:hover,
form[action*="delete"] [type="submit"]:focus,
form[action*="disable"] [type="submit"]:hover,
form[action*="disable"] [type="submit"]:focus,
form[action*="cancel"] [type="submit"]:hover,
form[action*="cancel"] [type="submit"]:focus {
  background-color: #999;
}

.toggle-link {
  font-size: .875em;
  float: right;
}

/* products table */
table.products > tfoot {
  -webkit-transition: height .5s;
  transition: height .5s;
}
table.products > tfoot th {
  text-align: right;
}

table.products tr > th,
table.products tr > td {
  overflow: hidden;
  -webkit-transition: padding .5s;
  transition: padding .5s;
}
table.products tr.is-closed > th,
table.products tr.is-closed > td {
  padding-top: 0;
  padding-bottom: 0;
}

table.products div {
  -webkit-transition: max-height .5s;
  transition: max-height .5s;
}
table.products > tbody div {
  max-height: 2.375rem;
}
table.products > tfoot div {
  max-height: 1.5rem;
}
table.products tr.is-closed div {
  max-height: 0;
}
/* products table in form */
form table.products .number {
  width: 7.25rem;
}
form table.products .number input[type="number"] {
  width: 6rem;
  padding-right: .5em;
}
form table.products .number input[name$="_prices"] {
  margin-left: .25rem;
}
form table.products .number input[name$="_vat"] {
  margin-right: .25rem;
}

/* status toggle */
.statustoggle > form {
  display: inline-block;
  padding: 0;
  border: 0;
  background-color: transparent;
}
.statustoggle input[type="submit"],
.statustoggle > span {
  min-width: 6rem;
}
.statustoggle input[type="submit"] {
  margin: 0;
  border-radius: 0;
}
.statustoggle > span {
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
  display: inline-block;
  line-height: normal;
  padding: .5em 1em;
  background-color: #444;
  vertical-align: middle;
  box-sizing: border-box;
}
.statustoggle > form:first-child > input[type="submit"],
.statustoggle > span:first-child {
  border-radius: .125em 0 0 .125em;
}
.statustoggle > form:last-child > input[type="submit"],
.statustoggle > span:last-child {
  border-radius: 0 .125em .125em 0;
}

/* pages */
body.dashboard {
  font-size: 1.75rem;
}
body.dashboard > header > div > nav,
body.dashboard > main > div > section > header > h1,
body.dashboard > footer {
  display: none;
}
body.dashboard > header > div,
body.dashboard > main > div > section {
  max-width: none;
}
body.dashboard > main > div > section > header {
  margin-bottom: 0; /* reset */
}
body.dashboard h2{
  margin-bottom: -.9em;
}
body.dashboard .success > h2 > a {
  color: #3b67a0;
}

body.dashboard .warning > h2 > a {
  color: #f48c00;
}

body.dashboard .info > h2 > a {
  color: #347ab7;
}

body.dashboard .error > h2 > a,
body.dashboard .error > .generalerror,
body.dashboard .notok > h2 > a,
body.dashboard .notok > .notok {
  color: #f00;
}
body.dashboard .errors a {
  text-decoration: underline;
}

body.dashboard a.warning,
body.dashboard span.warning {
  color: #f48c00;
}

body.dashboard a.info,
body.dashboard span.info {
  color: #347ab7;
}

body.dashboard a.error,
body.dashboard span.error {
  color: #f00;
}

body.dashboard div.status {
  position: relative;
  -webkit-transition: opacity .5s;
  transition: opacity .5s;
}
body.dashboard div.status.loading {
  opacity: .5;
}
body.dashboard div.status:not(.success) > .success,
body.dashboard div.status:not(.error):not(.warning):not(.info) > .error,
body.dashboard div.status:not(.notok) > .notok,
body.dashboard div.status:not(.timeout) > .notok > .timeout {
  display: none;
}
body.dashboard div.status:not(.success):not(.error):not(.notok):not(.warning):not(.info)::after {
  content: '';
  display: block;
  height: 1.5em;
  background: url('/images/throbber.svg') center / contain no-repeat;
}

body.dashboard div.status.resolved::after {
  content: 'Resolved';
  font-family: 'Impact', sans-serif;
  font-size: .5em;
  color: #f00;
  text-transform: uppercase;
  position: absolute;
  right: 0;
  top: 2em;
  padding: 0 .25em;
  border: .1875em solid;
  border-radius: .25em;
  animation: breathe 1s alternate infinite;
}

@media (min-width: 40rem) {
  body.dashboard time.localtime {
    font-size: 2.5rem;
    color: #ddd;
    position: absolute;
    top: 2.125rem;
    right: 5%;
    z-index: 1;
  }
}

/* tabs */
main section > header:only-child{
  margin-bottom:0;
}
main > div:nth-of-type(2n) section.tabs {
  border: 0;
  background-color: transparent;
}
main > div:nth-of-type(2n) section.tabs > label.is-active{
  color: #3b67a0;
}
main > div:nth-of-type(2n) section.tabs {
  color: #444;
}

/* dns records table */

table.dnsrecords input,
table.dnsrecords select,
table.dnsrecords textarea {
  font-family: monospace, monospace;
}
/* remove tab container visually */
table.dnsrecords tr:not(.a) div.tabs {
  border: 0;
  background-color: transparent;
}
table.dnsrecords tr:not(.a) div.tabs > div {
  padding: 0;
}

table.dnsrecords tr:not(.a) div.tabs > label,
table.dnsrecords tr:not(.a) div.tabs > div.vm,
table.dnsrecords tr.wildcard div.tabs ol.steps li:not(:first-child){
  display: none;
}
table.dnsrecords input[id^="priority"]:disabled,
table.dnsrecords input[id^="port"]:disabled {
  display: none;
}

/* dns records table in form */
form table.dnsrecords .number {
  width: 6rem;
}

/* steps */
ol.steps {
  margin-top: .375rem;
}
ol.steps:last-child {
  margin-bottom: -.125rem;
}

ol.steps label {
  /* quick 'n' dirty */
  display: block !important;
}

/* old */
.col-1-2,
.col-1-3,
.col-2-3 {
  width: 100%;
}

@media (min-width: 40rem) {
  .grid::after {
    /* clearfix */
    content: '';
    display: table;
    clear: left;
  }
  .col-1-2,
  .col-1-3,
  .col-2-3 {
    float: left;
    margin-right: 6%;
  }
  .col-1-2:last-child,
  .col-1-3:last-child,
  .col-2-3:last-child {
    margin-right: 0;
  }
  .col-1-2 {
    width: 47%;
  }
  .col-1-3 {
    width: 29.3333%;
  }
  .col-2-3 {
    width: 65.3333%;
  }
}

/* code input */
input[id$="apikey"],
input#ip,
input#ipaddress,
input#newips {
  font-family: monospace, monospace;
}

/* misc */
#map {
  height: 20rem;
}
.datacenters #map{
  height:40rem;
}
.mapboxgl-marker {
  width: 30px;
  height: 70px;
  margin-left: -15px;
  margin-top: -35px;
  background-image: url('/images/pin.png');
}
.mapboxgl-popup {
    max-width: 200px;
    width:200px;
}
button.mapboxgl-popup-close-button{
  min-width:1em;
}

/* animation */
@keyframes breathe {
  from {
    transform: rotate(20deg);
  }
  to {
    transform: rotate(20deg) scale(1.5);
  }
}
