/* 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. */
.folding > div > input:first-of-type, /* hide the checkbox */
.folding > div > 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 */
.folding div { /* 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;
}

.date_selection {
    columns: 20rem;
}

/* graph */
.graph,
.svggraph,
.graph li.stats {
  border-color:#A2C837 !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: #A2C837;
}

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;
}

div.development {
    text-align: center;
    color: red;
}

/* 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: #A2C837;
}

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 .masonry {
  display: flex;
  flex-flow: column wrap;
  align-content: space-between;
  /* Your container needs a fixed height, and it
    * needs to be taller than your tallest column. */
  height: 2400px;
}

body.dashboard div.status {
  width: 32%;
  margin-bottom: 2%;
  max-height: 800px;
  overflow: hidden;
  -webkit-transition: opacity .5s;
  transition: opacity .5s;
}

body.dashboard div.status:nth-child(3n+1) { order: 1; }
body.dashboard div.status:nth-child(3n+2) { order: 2; }
body.dashboard div.status:nth-child(3n)   { order: 3; }

body.dashboard .masonry::before,
body.dashboard .masonry::after {
  content: "";
  flex-basis: 100%;
  width: 0;
  order: 2;
}

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: #A2C837;
}
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);
  }
}

div.control-bar {
  display: flex;
}

div.control-bar > div {
  display: flex;
  padding: .2em;
  margin-left: 0.1em;
  margin-right: 0.1em;
}

div.control-bar > div:after {
  content: '';
  /* position: absolute; */
  border-left: 2px solid #888;
  margin-left: 0.7em;
}

div.control-bar > div:last-child:after {
  display: none;
}

div.control-bar > div label {
  margin-left: 0.3em;
  margin-right: 0.3em;
}

.success.fa{
  color: green;
}

.error.fa {
  color: red;
}

.info.fa {
  color: #347ab7;
}

.osd_states > span {
  white-space:nowrap;
  display:inline-block;
  margin-left:.5em;
}

/* messages block (-like) */

span.success,
span.info,
span.warning,
span.error{
  border-radius:.3em;
  padding-left:.2em;
  padding-right:.8em;
}


span.success {
  background-color: hsl(103, 44%, 89%);
}
span.info {
  background-color: hsl(200, 65%, 91%);
}
span.warning {
  background-color: hsl(50, 81%, 94%);
}
span.error {
  background-color: hsl(0, 43%, 91%);
}
span.success::before,
span.info::before,
span.warning::before,
span.error::before {
  display: inline-block;
  width: 1.25em;
  margin-right: .5em;
  vertical-align: middle;
  transform: scale(0.7);
}
span.success::before {
  content: url('data:image/svg+xml,<svg viewBox="0 0 1792 1792" fill="%2365b345" xmlns="http://www.w3.org/2000/svg"><path d="M1412 734q0-28-18-46l-91-90q-19-19-45-19t-45 19l-408 407-226-226q-19-19-45-19t-45 19l-91 90q-18 18-18 46 0 27 18 45l362 362q19 19 45 19 27 0 46-19l543-543q18-18 18-45zm252 162q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/></svg>');
}
span.info::before {
  content: url('data:image/svg+xml,<svg viewBox="0 0 1792 1792" fill="%23309dd3" xmlns="http://www.w3.org/2000/svg"><path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/></svg>');
}
span.warning::before {
  content: url('data:image/svg+xml,<svg viewBox="0 0 1792 1792" fill="%23e8c92a" xmlns="http://www.w3.org/2000/svg"><path d="M1024 1375v-190q0-14-9.5-23.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 23.5v190q0 14 9.5 23.5t22.5 9.5h192q13 0 22.5-9.5t9.5-23.5zm-2-374l18-459q0-12-10-19-13-11-24-11h-220q-11 0-24 11-10 7-10 21l17 457q0 10 10 16.5t24 6.5h185q14 0 23.5-6.5t10.5-16.5zm-14-934l768 1408q35 63-2 126-17 29-46.5 46t-63.5 17h-1536q-34 0-63.5-17t-46.5-46q-37-63-2-126l768-1408q17-31 47-49t65-18 65 18 47 49z"/></svg>');
}
span.error::before {
  content: url('data:image/svg+xml,<svg viewBox="0 0 1792 1792" fill="%23b74c4c" xmlns="http://www.w3.org/2000/svg"><path d="M1277 1122q0-26-19-45l-181-181 181-181q19-19 19-45 0-27-19-46l-90-90q-19-19-46-19-26 0-45 19l-181 181-181-181q-19-19-45-19-27 0-46 19l-90 90q-19 19-19 46 0 26 19 45l181 181-181 181q-19 19-19 45 0 27 19 46l90 90q19 19 46 19 26 0 45-19l181-181 181 181q19 19 45 19 27 0 46-19l90-90q19-19 19-46zm387-226q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/></svg>');
}

.copyvalue{
  position:absolute;
  top:-50em;
  left:-50em;
}
.copybutton{
  cursor:hand; cursor:pointer;
}
