/*
 * This file is part of Privacy Badger <https://privacybadger.org/>
 * Copyright (C) 2014 Electronic Frontier Foundation
 *
 * Privacy Badger is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * Privacy Badger is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Privacy Badger.  If not, see <http://www.gnu.org/licenses/>.
 */

/* popup only (not options page) */
body#main {
  box-sizing: border-box;

  background: #fefefe;
  color: #333;
  font-family: helvetica, arial, sans-serif;
  font-size: 12px;

  margin: 0;
  padding: 7px 12px;

  min-width: 430px; /* Chrome */
  max-width: 100%;  /* FF android */
  min-height: 300px;
}

@media screen and (min--moz-device-pixel-ratio:0) {
    /* popup only (not options page) */
    body#main {
        width: 430px;     /* FF desktop */
    }
}

/* Override min-width 430px, which is only necessary for Chrome and causes the popup to be larger than most phone screens */
/* Using a @media (max-width) query would affect Chrome Desktop as well. */
body#main.is-android {
    min-width: 200px;
}

/* popup only (not options page) */
body#main {
    display: flex;
    flex-direction: column;
}

@font-face {
    font-family: "Chunk-Five";
    src: url("./fonts/Chunk.ttf");
}

a, a:visited {
    color: #222;
}
a:hover {
    color: #f06a0a;
}

button {
    /* needed for Firefox */
    color: #333;
}

.clicker {
    border-top: 1px solid #aaaaaa;
    padding: 5px;
    height: 40px;
    overflow: hidden;
    line-height: normal;
}
.clicker:not(#not-yet-blocked-header):not(#non-trackers-header) {
    direction: ltr;
}
.origin{
  max-width: 210px;
  color: #555555;
  float: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-container {
    width: 115px;
    display: block;
    margin-left: 220px;
}
.switch-toggle {
    background-color: #515050;
    height: 16px;
}
.switch-toggle > label {
    cursor: pointer;
}
.options .switch-container {
    max-width: 114px;
}

.switch-candy:hover {
    background-color: #868686;
}
.block .switch-candy a {
    background-color: #c61223;
}
.cookieblock .switch-candy a {
    background-color: #ffcc00;
}
.allow .switch-candy a, .noaction .switch-candy a {
    background-color: #339900;
}

.dnt-compliant {
    float: left;
    display: inline;
    padding-right: 5px;
}

.honeybadgerPowered {
    display: none;
    margin-right: 10px;
    width: 20px;
    height: 20px;
    position: relative;
    left: 340px;
    bottom: 15px;
}
.userset .honeybadgerPowered {
    display: block;
    background: url('/icons/badger-pin.png') no-repeat;
}

a.removeOrigin {
    float: right;
    margin-right: 10px;
    width: 10px;
    text-decoration: none;
}
a.removeOrigin:hover {
    color: red !important;
}

#blockedResources .breakage-warning {
    color: red;
    display: none;
    font-size: 1.3em;
    margin: 0 2px 2px 0;
}
#blockedResources .show-breakage-warning .breakage-warning {
    display: inline-block;
}

#privacy-badger-header {
    display: flex;
    color: #505050;
    font-size: 16px;
    margin-bottom: 5px;
}

#badger-logo-div {
    width: 48px;
}

#badger-logo-div, #badger-title-div {
    padding-top: 4px;
}

#badger-title-div {
    flex: 1;
    margin: 2px 10px 0 10px;
    line-height: 0.9;
    @supports (-moz-appearance:none) { /* Firefox */
        line-height: 0.8;
    }
}
#badger-title-div h2 {
    color: #000;
    font-size: 24px;
    font-weight: normal;
    font-family: "Chunk-Five", serif;
    margin: 0;
}

#corner-buttons {
    margin-top: 7px;
}
#corner-buttons a {
    display: inline-block;
}
#share {
    margin-left: 10px;
    margin-right: 12px;
}
#options {
    margin-inline-end: 3px;
}

/* popup only (not options page) */
body#main #blockedResourcesContainer, #special-browser-page, #disabled-site-message, #first-run-page, #popup-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#special-browser-page, #disabled-site-message, #first-run-page {
    text-align: center;
}

button.cta-button, a.cta-button {
    background-color: #ff641c;
    border: 2px solid #ff641c;
    color: #fff;
    font-weight: bold;
    font-size: 17px;
    line-height: 1.5;
    padding: 1.2em 1em;
    transition: background-color 0.3s ease;
    width: 100%;
}
button.cta-button:hover, a.cta-button:hover {
    background-color: #f58728;
}
button.cta-button:focus-visible, a.cta-button:focus-visible {
    border: 2px solid #333;
    outline: none;
}

.clickerContainer {
    max-height: 290px;
    overflow-y: auto;
    background-color: #e8e9ea;
    position: relative;
    margin-top: 25px;
}
.keyContainer{
    direction: ltr;
    position: relative;
}
.key {
    position: relative;
    height: 7px;
    left: 215px;
    right: 0;
    z-index: 30;
    background: #fefefe;
    padding-top: 4px;
    width: 117px;
}
.key img {
    margin-left: 19px;
}

.flex-wrapper {
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
}

#instruction-outer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  background-color: #000;
  opacity: 0.1;
  width: 100%;
  height: 100%;
}
#instruction {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: #fff;
  color: #333;
  text-align: start;
  margin: 8px;
  padding: 15px;
  font-size: 15px;
  box-shadow:
  0 2.8px 2.2px rgba(0, 0, 0, 0.034),
  0 6.7px 5.3px rgba(0, 0, 0, 0.048),
  0 12.5px 10px rgba(0, 0, 0, 0.06),
  0 22.3px 17.9px rgba(0, 0, 0, 0.072),
  0 41.8px 33.4px rgba(0, 0, 0, 0.086),
  0 100px 80px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  width: calc(100% - 46px);
}
.instruction-logo {
    align-self: center;
    flex-shrink: 0;
    padding-inline-end: 15px;
}
#instruction .flex-wrapper > div {
    padding-inline-end: 5px;
}
#intro-reminder-btn, #error-message, #learning-prompt-btn {
    margin-top: 1em;
}
#error-message {
    text-align: center;
}
#fittslaw {
    float: right;
}
#pbInstructions, #special-browser-page, #disabled-site-message, .toggle-header-title, #first-run-page {
    font-size: 16px;
    margin: 0;
}
/* popup only (not options page) */
body#main #pbInstructions a, #firstparty-protections-container a, #donate a {
    text-decoration: underline;
    color: black;
    font-weight: bold;
}
/* popup only (not options page) */
body#main #pbInstructions a:hover, #firstparty-protections-container a:hover, #donate a:hover {
    color: #ec9329;
}
#instructions-firstparty-description, #youtube-message {
    background-color: #e8e9ea;
    color: #555;
    padding: 8px;
    font-size: 12px;
}

#youtube-message {
    font-size: 14px;
}

#report-youtube-message-container {
    font-size: 14px;
    padding-bottom: 10px;
}

#report-youtube-message a, #report-youtube-message {
    color: #F06A0A;
}

#report-youtube-message a:hover {
    color: #ec9329
}

#no-third-parties {
    display: block;
    font-size: 12px;
}

#siteControls, #report-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: center;
}
.pbButton {
    background-color: #fefefe;
    border: 2px solid;
    border-radius: 3px;
    cursor: pointer;
    /* systemfontstack.com */
    font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, liberation sans, Ubuntu, helvetica neue, helvetica, Cantarell, roboto, noto, arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    /* fix overly bold text on macOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin-top: 8px;
    padding: 10px 8px;
    text-align: center;
    width: 49%;
}
.pbButton:not(:disabled):active {
    transform: translateY(1px);
}
.pbButton:hover:enabled {
    border: 2px solid #F06A0A;
}
.pbButton:focus-visible {
    border: 2px solid #F06A0A;
    outline: none;
}
.pbButton:disabled {
    background-color: #ccc;
    color: #666;
    cursor: auto;
}
#deactivate_site_btn, #activate_site_btn, #error {
    font-size: 16px;
}

#not-yet-blocked-header, #non-trackers-header {
  text-align: center;
  color: #f9f9f9;
  background: #555;
  height: auto;
  font-size: 14px;
  font-weight: bold;
}
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  font-size: 0.8em;
  z-index: -1;
  opacity: 0;
  padding: 3%;
  box-sizing: border-box;
  color: #ccc;
  background: url("/skin/background.png");
  /* Delay visibility change to show opacity transition when overlay is closed */
  transition: visibility 0s 0.1s, opacity 0.1s ease;
  overflow-y: auto;
  visibility: hidden;
}
div.overlay.active {
  z-index: 31;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.1s ease;
}
div#popup-content.hidden {
    visibility: hidden;
}

#error-input {
    display: block;
    width: 98%;
}
.overlay-title {
  padding: 0;
  margin: 0 0 10px;
}
#report-label {
  display: block;
  margin: 1% 0;
  font-weight: bold;
}
#report-success, #report-fail {
    font-size: 12px;
    font-weight: bold;
    margin: 10px 0;
}
#report-success {
    color: green;
}
#report-fail {
    color: red;
}
#report-terms {
    margin: 10px 0 !important;
}
a.overlay-close {
  float: right;
  background: none;
  border: 0;
  font-size: 1.4em;
  color: #ccc;
  text-decoration: none;
  margin-inline-start: 10px;
}
a.overlay-close:before {
  content: '\2716';
  margin: 4px;
}
a.overlay-close:hover {
    color: #f06a0a;
}
#share-output {
  display: block;
  width: 98%;
  height: 60%;
}
#overlay p {
  font-size: 12px;
  margin: 0 0 10px;
}
#overlay label {
  font-size: 13px;
}

#version {
    color: #707070;
    font-size: 10px;
    position: absolute;
    bottom: 5px;
}
#donate {
    font-size: 14px;
    margin: 5px 0;
    padding: 10px;
    text-align: center;
}

.faded-bw-color-scheme {
    filter: grayscale(1) opacity(0.6);
}

.tooltipster-sidetip .tooltipster-box {
    color: #fcfcfc;
    font-size: 13px;
    background: #555;
    border: none;
    border-radius: 7px;
}
.tooltipster-sidetip .tooltipster-arrow-border {
    border: none;
}

.tooltipster-badger-breakage-note.tooltipster-sidetip .tooltipster-box {
    background-color: #F06A0A;
    padding: 10px 0;
}
.tooltipster-badger-breakage-note.tooltipster-sidetip .tooltipster-content {
    color: #fefefe;
    cursor: pointer;
    font-size: 15px;
}
.tooltipster-badger-breakage-note.tooltipster-sidetip .tooltipster-arrow-background {
    border-top-color: #F06A0A;
    cursor: pointer;
}

#firstparty-protections-container, #youtube-message-container {
    border-bottom: 1px solid #d3d3d3;
    margin: 10px 0;
    padding-bottom: 5px;
}
.basic-header {
    text-align: center;
    margin: 15px 0;
}
.toggle-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: border 0.25s ease-out;
    background-color: #fff;
    border: 2px solid #fff;
    border-radius: 3px;
    padding: 0;
    width: 100%;
}
.toggle-header:hover {
    border: 2px solid #f06a0a;
}
.toggle-header:hover .toggle-header-title {
    color: #000;
}
.toggle-header-title {
    flex: 1;
    transition: color 0.25s ease-out;
    margin: 10px 0;
}
.toggle-header::before {
    content: '';
    font-size: 18px;
    padding: 0 4px;
    width: 1.2em;
    visibility: hidden;
}
.toggle-header-icon {
    margin-inline-end: auto;
    padding: 0 4px;
}
.ui-icon.ui-icon-caret-d, .ui-icon.ui-icon-caret-u {
    font-size: 18px;
}
#cta-icon.ui-icon-star {
   margin-bottom: 2px;
   font-size: 18px;
   color: #F6C324 !important;
}

@media screen and (max-width: 400px){
    .origin {
        max-width: 150px;
    }

    .switch-container {
        width: 100px;
        display: block;
        margin-left: 150px;
    }

    .key {
        left: 150px;
    }
    .key img {
        margin-left: 12px;
    }

    .honeybadgerPowered {
        left: 255px;
    }

    #share {
        margin-left: 6px;
        margin-right: 8px;
    }
    #options {
        margin-right: 0px;
    }
}

/* Space out icons on narrow Android screens */
@media screen and (max-width: 500px){
    body#main.is-android #corner-buttons {
        display: flex;
        align-items: center;
        justify-content: space-around;
        flex: 1;
    }

    body#main.is-android #badger-title-div {
        flex: unset;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }

    a, a:visited {
        color: #ddd;
    }
    a:hover {
        color: #f06a0a;
    }
    a.cta-button:hover {
        color: #fff;
    }
    button.cta-button:focus-visible, a.cta-button:focus-visible {
        border: 2px solid #fff;
    }

    /* popup only (not options page) */
    body#main, #instruction, .key {
        background-color: #333;
        color: #ddd;
    }

    #instruction {
        box-shadow: none;
    }
    #instruction-outer {
        opacity: 0.6;
    }

    button,
    /* popup only (not options page) */
    body#main #pbInstructions a,
    #firstparty-protections-container a,
    #donate a,
    #pbInstructions,
    .toggle-header-title,
    #special-browser-page,
    #first-run-page,
    #disabled-site-message {
        color: #ddd;
    }

    .toggle-header {
        background-color: #333;
        border: 2px solid #333;
    }
    .toggle-header:hover .toggle-header-title {
        color: #fff;
    }

    #firstparty-protections-container {
        border-bottom: 1px solid #555;
    }

    /* TODO:
     *  - Add f06a0a color on hover
     */
    #fittslaw, #help, #options, #share {
        filter: invert(0.85);
    }

    #badger-title-div h2 {
        color: #f9f9f9;
    }

    textarea, #share-output {
        background-color: #333;
        border: solid 1px #555;
        color: #ddd;
    }

    #version {
        color: #bbb;
    }

    .clicker, .origin {
        color: #ddd;
    }
    .clicker {
        border-top: solid 1px #555;
    }

    .clickerContainer {
        background-color: #3a3a3a;
     }

    #instructions-firstparty-description, #youtube-message {
        background-color: #3a3a3a;
        color: #ddd;
    }

    .pbButton {
        background-color: #333;
        border: solid 2px #ddd;
    }

    .userset .honeybadgerPowered {
        filter: invert(100%);
    }
}
