/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@import url("chrome://global/skin/in-content/common.css");

body {
  display: flex;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 0 48px;
  align-items: center;
  justify-content: center;
}

ul, ol {
  margin: 0;
  padding: 0;
  -moz-margin-start: 1.5em;
}

ul > li, ol > li {
  margin-bottom: .5em;
}

ul {
  list-style: disc;
}

h1 {
  margin: 0 0 .3em 0 !important;
}

#errorPageContainer {
  background-position: 35px 15px;
  background-repeat: no-repeat;
  color: ButtonText;
  position: relative;
  min-width: 280px;
  width: 610px;
  max-width: 610px;
  margin: auto 0;
  padding: 1em 0 3em 0;
  -moz-padding-start: calc(35px + 160px + 35px);
}

#errorPageContainer:-moz-dir(rtl) {
  background-position: right 35px top 15px;
}

@media (max-width: 675px) {
  #errorPageContainer {
    -moz-margin-start: 0;
    -moz-padding-start: 0;
    background-image: none !important;
  }
}

#errorTitle {
  color: #babdb6;
  text-shadow: 0 1px 0 white;
  font-weight: bold;
}

#errorTitleText {
}

/*
#errorTitle[sslv3=true] {
  background-image: url("aboutNetError_alert.svg");
}
*/

#errorShortDesc > p {
  overflow: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  font-weight: bold;
  white-space: pre-wrap;
}

#errorLongDesc > p {
  margin-top: 1.2em;
  margin-bottom: 1.2em;
}

#errorTryAgain {
  margin-top: 2em;
  -moz-margin-start: 1.2em;
}

#errorContainer {
  display: none;
}

/* Pressing the retry button will cause the cursor to flicker from a pointer to
 * not-allowed. Override the disabled cursor behaviour since we will never show
 * the button disabled as the initial state. */
button:disabled {
  cursor: pointer;
}

div#certificateErrorReporting {
  display: none;
  float: right;
  /* Align with the "Try Again" button */
  margin-top: 24px;
  -moz-margin-end: 24px;
}

div#certificateErrorReporting a {
  text-decoration: none;
}

div#certificateErrorReporting a:hover {
  text-decoration: underline;
}

span.downArrow {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.6em;
  -moz-margin-start: 0.5em;
  transform: scaleY(0.7);
}

div#certificateErrorReportingPanel {
  /* Hidden until the link is clicked */
  display: none;
  background-color: white;
  border: 1px lightgray solid;
  /* Don't use top padding because the default p style has top padding, and it
   * makes the overall div look uneven */
  padding: 0 12px 12px 12px;
  box-shadow: 0 0 4px #ddd;
  font-size: 0.9em;
  position: absolute;
  width: 75%;
  margin-top: 10px;
}

div#certificateErrorReportingPanel:-moz-dir(ltr) {
  left: 34%;
}

div#certificateErrorReportingPanel:-moz-dir(rtl) {
  right: 0;
}

#errorStatePanel {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: space-between;
  align-items: flex-start;
}

span#hostname {
  font-weight: bold;
}

#automaticallyReportInFuture {
  cursor: pointer;
}

#reportSendingMessage {
  /* adjust the line-height to match the link */
  line-height: 22px;
}

#reportSentMessage {
  /* adjust the line-height to match the link */
  line-height: 22px;
}

/* ::::: File not found, <...> pages ::::: */

@-moz-document url-prefix("about:neterror?e=connectionFailure"),
               url-prefix("about:neterror?e=contentEncodingError"),
               url-prefix("about:neterror?e=corruptedContentError"),
               url-prefix("about:neterror?e=cspFrameAncestorBlocked"),
               url-prefix("about:neterror?e=deniedPortAccess"),
               url-prefix("about:neterror?e=dnsNotFound"),
               url-prefix("about:neterror?e=fileNotFound"),
               url-prefix("about:neterror?e=generic"),
               url-prefix("about:neterror?e=malformedURI"),
               url-prefix("about:neterror?e=netInterrupt"),
               url-prefix("about:neterror?e=netReset"),
               url-prefix("about:neterror?e=netTimeout"),
               url-prefix("about:neterror?e=notCached"),
               url-prefix("about:neterror?e=nssBadCert"),
               url-prefix("about:neterror?e=nssFailure2"),
               url-prefix("about:neterror?e=unknownProtocolFound"),
               url-prefix("about:neterror?e=proxyConnectFailure"),
               url-prefix("about:neterror?e=proxyResolveFailure"),
               url-prefix("about:neterror?e=redirectLoop"),
               url-prefix("about:neterror?e=remoteXUL"),
               url-prefix("about:neterror?e=unknownSocketType"),
               url-prefix("about:neterror?e=unsafeContentType") {

  #errorPageContainer {
    background-image: url(chrome://browser/skin/about-pages/file-not-found.svg);
  }

  #errorTitle {
    color: #3c3591;
    text-shadow: none;
  }

}

/* ::::: Offline Mode ::::: */

@-moz-document url-prefix("about:neterror?e=netOffline") {

  #errorPageContainer {
    background-image: url(chrome://browser/skin/about-pages/offline-mode.svg);
  }

  #errorTitle {
    color: #646f6c;
    text-shadow: none;
  }

}
