/*
 * Copyright (c) 2018, The Tor Project, Inc.
 * See LICENSE for licensing information.
 *
 * vim: set sw=2 sts=2 ts=8 et syntax=css:
 */

* {
  padding: 0px;
  margin: 0px;
}

body {
  width: 100%;
  height: 100%;
  margin: 0px auto;
  padding: 0px 0px;
  font-size: 62.5%;
  font-family: "Liberation Sans", Arial, Helvetica, sans-serif;
  font-weight: normal;
  color: #4d4d4d;
  background-color: #FFFFFF;
  background-attachment: fixed;
  background-size: 100% 100%;
}

body {
  background-image: linear-gradient(to bottom, #ffffff, #ffffff 10%, #dddddd 50%, #dddddd);
}

body[toron] {
  background-image: linear-gradient(to bottom, #ffffff, #ffffff 10%, #d5ffd5 50%, #d5ffd5);
}

/* Hide the entire document by default to avoid showing the incorrect
 * Tor on / off status (that info must be retrieved from the chrome
 * process, which involves IPC when multiprocess mode is enabled). An
 * initialized attribute will be added as soon as the status is known.
 */
body:not([initialized]) {
  display: none;
}

.torcontent-container {
  margin: 40px 20px;
  display: flex;
  flex-direction: column;
}

#torstatus-version {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 30px;
  width: 200px;
  font-size: 1.4em;
  white-space: pre-wrap;
  text-align: right;
}

body[toron] #torstatus-image {
  background-image: url('chrome://torbutton/skin/tor-on.png');
}

#torstatus-image {
  display: none;
  position: absolute;
  left: 85px;
  height: 128px;
  width: 128px;
  background-image: url('chrome://torbutton/skin/tor-off.png');
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
}

.arrow {
  display: none;
  position: absolute;
  z-index: -1;
}

#toolbarIconArrowHead {
  top: 4px;
  width: 30px;
  height: 36px;
  background-image: url('chrome://torbutton/skin/onionArrow-short.png');
}

#toolbarIconArrowVertExtension, #toolbarIconArrowHorzExtension {
  width: 11px;
  height: 11px;
  background-image: url('chrome://torbutton/skin/onionArrow-extension.png');
}

#toolbarIconArrowBend {
  width: 22px;
  height: 22px;
  background-image: url('chrome://torbutton/skin/onionArrow-leftBend.png');
}

#toolbarIconArrowBend[pos="right"] {
  background-image: url('chrome://torbutton/skin/onionArrow-rightBend.png');
}

a {
  color: #008000;
  text-decoration: none;
}

a:hover {
  color: #00A000;
  text-decoration: underline;
}

#testTorSettings {
  font-size: 1.6em;
  text-decoration: underline;
  margin-bottom: 5px;
}

#torstatus {
  position: relative; /* needed for torstatus-image positioning */
  display: flex;
  justify-content: center;
  min-height: 148px;
}

.top {
  white-space: nowrap;
}

.torstatus-container {
  text-align: center;
}

body[toron][torNeedsUpdate] .hideIfTBBNeedsUpdate,
body:not([torNeedsUpdate]) .hideIfTorIsUpToDate {
  display: none;
}

body[toron] .hideIfTorOn,
body:not([toron]) .hideIfTorOff {
  display: none;
}

body[toron] .top h1 {
  color: #600060;
}

body:not([showmanual]) .showForManual {
  display: none;
}

div.hideIfTorIsUpToDate {
  display: flex;
  flex-direction: column;
}

div.hideIfTorIsUpToDate,
body .top div.hideIfTorIsUpToDate h1 {
  color: black;
  text-align: center;
}

/* Use inline-block for text-oriented elements whose widths need to measured. */
.torstatus-container *,
.top div.hideIfTorIsUpToDate h3 {
  display: inline-block;
  text-align: center;
}

.top div.hideIfTorOff h1 {
  margin-top: 20px;
}

.top h1 {
  font-size: 4.00em;
  font-weight: bold;
  margin-bottom: 5px;
}

.top h2 {
  font-size: 2.934em;
  margin-bottom: 20px;
  font-weight: normal;
}

.top h3 {
  font-size: 1.8em;
  font-weight: normal;
  color: #3B503C;
}

#middle {
  display: flex;
  flex-flow: row wrap;
  font-size: 1.6em;
  justify-content: space-evenly;
  margin-top: 40px;
}

.bubble {
  width: 242px;
  padding: 20px 30px;
  color: #3B503C;
  background-color: #FFFFFF;
  border: none;
  border-radius: 16px;
  margin-bottom: 40px;
  text-align: start;
  vertical-align: top;
}

#middle h1 {
  font-size: 1.2em;
  margin-bottom: 10px;
}

#middle ul {
  padding: 5px 0 0 22px;
}

#middle ul:dir(rtl) {
  padding: 5px 22px 0 0;
}

#middle li {
  padding-top: 2px;
}

#bottom {
  padding-bottom: 40px;
}

#bottom p {
  font-size: 1.6em;
  text-align: start;
  margin: auto;
}

#bottom a {
  color: #800080;
  text-decoration: underline;
}

#bottom a:hover {
  color: #A000A0;
  text-decoration: none;
}

#bottom h4 {
  margin-top: 50px;
  line-height: 1em;
  font-size: 1em;
  font-weight: normal;
  text-align: center;
}

#bottom p.lang {
  max-width: 620px;
  margin: 10px auto;
  font-size: 1em;
  font-weight: normal;
  text-align: center;
}

.searchbox form {
  width: 396px;
  margin: 35px auto 1px auto;
  text-align: left;
}

.searchbox h4 {
  padding-top: 5px;
  font-size: 12px;
  font-weight: normal;
  text-align: center;
}

#sbutton {
  display: block;
  float: right;
  width: 33px;
}

#sbutton input {
  height: 34px;
  width: 33px;
  border: 0;
  background: url('chrome://torbutton/skin/search.png') no-repeat top left;
  cursor: pointer;
}

/* #sxw is the container div for the search field and button */
#sxw {
  border: none;
}

/* #sx is the search input (text) field */
#sx {
  border-color: lightgray;
  border-style: solid;
  border-width: 1px 0px 1px 1px;
  width: 350px;
  min-height: 23px;
  padding: 4px 6px 5px 6px;
  margin: 0;
  outline: none;
  color: #222;
  font-size: 18px;
}

@media only screen and (min-width : 820px) {
.torcontent-container {
    margin: auto;
    margin-top: 40px;
    max-width: 920px;
    min-width: 920px;
  }

  #torstatus-image {
    display: block;
  }

  #bottom p {
    margin: 10px 125px 0px 125px;
  }
}

@media only screen and (max-width : 436px) {
  .searchbox form {
    width: auto;
  }

  #sx {
    width: calc(100% - 46px);
  }
}
