/*******************
General/Other
*******************/

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: normal;
  text-align: center;
  overflow-x: hidden;
  cursor: default;
  margin: 0;
}

h1 {
  font-weight: normal;
  font-size: 36px;
}

small {
  font-style: italic;
}

a, a:visited {
  color: #4495D4;
  text-decoration: none;
}

a:visited {
  color: #3A7FB4;
}

a:hover, a:focus, a:active {
  text-decoration: underline;
}

.top-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  padding-top: 16px;
}

.cursor {
  position: absolute;
  top: -20vh;
  left: -10vw;
  width: 32px;
  height: 32px;
  display: none;
  z-index: 2;
}

.italics {
  font-style: italic;
}

.bold {
  font-weight: bold;
}



/*******************
Theme options
*******************/

.theme-settings {
  position: absolute;
  top: 36px;
  right: 20px;
  width: 60px;
  height: 20px;
}

.theme-icon {
  width: 18px;
  height: 18px;
  margin: 0 1px;
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
       -o-user-select: none;
          user-select: none;
}



/*******************
Header
*******************/

.main-header {
  margin-top: 25vh;
}

.ddg-logo-container {
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto 20px;
  overflow: hidden;
}

.unofficial-notice {
  font-size: 18px;
  display: block;
  margin-top: -20px;
  margin-bottom: 20px;
}



/*******************
Search/URL result Bar
*******************/

input {
  -webkit-appearance: none;
}

.search-container {
  position: absolute;
  left: 50%;
  -webkit-transform: translateX(-50%);
     -moz-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
       -o-transform: translateX(-50%);
          transform: translateX(-50%);
}

.search-form {
  width: 563px;
  height: 44px;
  border-radius: 2px;
  padding: 0 57px 0 12px;
}

.search-input {
  width: 562px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  border: 0 none;
  outline: 0 none;
  font-size: 16px;
  line-height: 44px;
}

.search-submit {
  position: relative;
  top: -42px;
  right: -309px;
  width: 27px;
  height: 40px;
  border-radius: 2px;
  border: 0 none;
  box-sizing: content-box;
  padding: 0 13px;
  font-size: 24px;
  cursor: pointer;
  -webkit-transition: all 0.0s;
     -moz-transition: all 0.0s;
      -ms-transition: all 0.0s;
       -o-transition: all 0.0s;
          transition: all 0.0s;
}

.url-result-container {
  margin-top: 60px;
  line-height: 42px;
}

.url-output-form {
  width: 634px;
  padding: 0;
}

.url-result-label-short {
  display: none;
}

.url-result {
  width: 40%;
  height: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
}

.small-screen-preview-link {
  display: none;
}



/*******************
About Page
*******************/

.about-header {
  background-color: #E37151;
  color: white;
  padding: 80px;
  margin: 0;
  word-wrap: break-word;
  -webkit-hyphens: auto;
     -moz-hyphens: auto;
          hyphens: auto;
}

.link-back, .link-back:visited {
  position: absolute;
  top: 20px;
  left: 20px;
  color: white;
}

main section {
  width: 40%;
  /*height: 275px;*/
  display: inline-block;
  margin: 0 2.5% 20px;
  vertical-align: top;
}

.about-footer {
  position: static;
}



/*******************
Footer
*******************/

footer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100vw;
  text-align: center;
}



/*******************
Light theme
*******************/

.light-theme {
  background-color: #F7F7F7;
  color: #4C4C4C;
}

.light-theme .top-border {
  border-top: 4px solid #DE5833;
}

.light-theme .ddg-link small, .light-theme .ddg-link:hover small {
  color: #4C4C4C;
}

.light-theme .search-form, .light-theme .url-result {
  background-color: white;
  border: 1px solid #CCCDC8;
}

.light-theme .search-form:active {
  border-color: rgba(204, 205, 200, 0.5);
}

.light-theme .search-input {
  background-color: white;
  color: #313739;
}

.light-theme .search-submit {
  background-color: white;
  color: #838383;
}

.light-theme .search-submit:hover, .light-theme .search-submit:focus, .light-theme .hovered {
  background-color: #63AD57;
  color: white;
}

.light-theme .search-submit:active, .light-theme .search-submit.active {
  background-color: #333;
  color: white;
}



/*******************
Dark theme
*******************/

.dark-theme {
  background-color: #333;
  color: #E6E6E6;
}

.dark-theme .top-border {
  border-top: 4px solid #242424;
}

.dark-theme .ddg-link small, .dark-theme .ddg-link:hover small {
  color: #E6E6E6;
}

.dark-theme .search-form, .dark-theme .url-result {
  background-color: #292929;
  border: 1px solid #242424;
}

.dark-theme .search-form:active {
  border-color: #7A7B78;
}

.dark-theme .search-input {
  background-color: #292929;
  color: #E6E6E6;
}

.dark-theme .search-submit {
  background-color: #292929;
  color: #E6E6E6;
}

.dark-theme .search-submit:hover, .dark-theme .search-submit:focus, .dark-theme .hovered {
  background-color: #1F1F1F;
  color: #E6E6E6;
}

.dark-theme .search-submit:active, .dark-theme .search-submit.active {
  background-color: #333;
  color: #E6E6E6;
}



/*******************
Media queries
*******************/

@media screen and (max-height: 500px) {
  footer {
    position: static;
    margin-top: 150px;
  }
  
  .about-footer {
    margin-top: 0;
  }
}

@media screen and (min-height: 800px) {
  .about-footer {
    position: absolute;
    bottom: 0;
  }
}

@media screen and (max-width: 650px) {
  .search-input, .search-container, .search-form {
    width: 240px;
    margin-left: -17px;
  }
  
  .search-submit {
    right: -149px;
  }
  
  .url-output {
    width: 286px;
  }
  
  .url-output-form {
    width: 311px;
  }
  
  .url-result-label {
    display: none;
  }
  
  .url-output {
    font-size: 14px;
  }
  
  .url-result {
    width: 42%;
  }
  
  .large-screen-preview-link {
    display: none;
  }
  
  .small-screen-preview-link {
    display: inline;
  }
  
  .no-js-url-output {
    font-size: 13px;
  }
  
  footer {
    width: 100%;
  }
}

@media screen and (max-width: 500px) {
  main section {
    display: block;
    width: 80%;
    height: auto;
    margin: 32px auto;
  }
}



/*******************
Text selection
*******************/

::-moz-selection {
  background-color: #4495D4;
  color: white;
}

::selection {
  background-color: #4495D4;
  color: white;
}
