/**
 * Sections
 */
body {
    background-color: #f0f0f0;
    color: #555;
    cursor: default;
    font-family: 'Noto Sans', Arial, sans-serif !important;
    font-size: 75%;
    margin: 0 auto;
    min-width: 348px;
    overflow-x: hidden;
    overflow-y: auto;
}

header {
    align-items: center;
    border-bottom: solid #d3d3d3 1px;
    display: flex;
    justify-content: space-between;
    padding: 8px 15px 8px 4px;
    position: relative;
}

#manipulateDOM-indicator {
    background: url('../../icons/help-dark.svg') no-repeat right center;
    background-size: 15px 15px;
    color: #555;
    padding-right: 20px;
    text-decoration: underline;
}

#manipulateDOM-indicator:hover {
    color: #777;
    cursor: pointer;
    text-decoration: none;
}

.panel {
    overflow: hidden;
}

.subpanel {
    max-height: 200px;
    overflow: auto;
    padding-top: 8px;
}

.panel-overflow {
    margin-left: 0;
    max-height: 300px;
    overflow: auto;
    padding-left: 0;
}

.subpanel:last-child {
    border-bottom: solid #d3d3d3 1px;
    padding-bottom: 4px;
}

.content {
    padding: 0 15px;
}

footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    padding: 8px 15px;
}

#testing-utility {
    flex-grow: 1;
}

#testing-utility-link {
    display: none;
    float: left;
}

/**
 * Fonts
 */
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 400;
    src: url('../../modules/noto-sans/noto-sans.woff2') format('woff2');
}

@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 600;
    src: url('../../modules/noto-sans/noto-sans-bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 400;
    src: url('../../modules/noto-sans/noto-sans-italic.woff2') format('woff2');
}

/**
 * Headings
 */
.heading {
    align-items: center;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    padding-left: 0;
}

/**
 * Lists
 */
.list {
    margin: 0;
    padding: 8px 0 0;
}

.list-item {
    background-color: #f7f7f7;
    border: 1px solid #e4e4e4;
    color: #737373;
    font-weight: 600;
    list-style: none;
    margin: 0;
    padding: 10px;
}

.sublist {
    align-items: center;
    background-color: #ececec;
    border: 1px solid #e0e0e0;
    box-shadow: inset 0 2px 10px #e2e2e2;
    list-style: none;
    padding: 0 0 0 8px;
}

.sublist:last-child {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}

.sublist-item {
    border-bottom: 1px solid #e0e0e0;
    color: #737373;
    font-weight: 600;
    padding: 10px;
}

.sublist-item:last-child {
    border-bottom: none;
}

#label-donate {
    margin: 0 5px 0 0;
}

#get-more-injections-btn, #label-donate {
    background-color: #f0f0f0;
    color: #555;
    cursor: pointer;
    font-weight: 600;
    margin: 0 5px;
}

#get-more-injections-btn:hover {
    color: #a3a3a3;
    text-decoration: underline;
}

/**
 * Icons
 */

.icon-logo {
    height: 26px;
    padding: 5px 6px 5px 8px;
    width: 26px;
}

/**
 * Buttons
 */
.button {
    background-color: #f5f5f5;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    color: #5f5f5f;
    cursor: pointer;
    float: right;
    font-size: 12px;
    margin-left: 10px;
    padding: 5px 10px;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

.button:hover {
    background-color: #fff;
}

.button:active {
    background-color: #dedede;
}

.button-svg {
    background-size: cover;
    height: 15px;
    width: 15px;
}

/**
 * Donate
 */
#donate-button {
    color: #5f5f5f;
    cursor: pointer;
    display: none;
    float: right;
    font-size: 12px;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

#donate-button:hover #donate-button-svg {
    transform: scale(1.3);
}

#donate-button:hover #label-donate {
    text-decoration: underline;
}

#donate-button-svg {
    background-image: url("../../icons/donate.svg");
}

/**
 * Buttons
 */
#options-button-svg {
    background-image: url("../../icons/settings-dark.svg");
}

#statistics-button-svg {
    background-image: url("../../icons/statistics-dark.svg");
}

#logging-button-svg {
    background-image: url("../../icons/logging-dark.svg");
}

#statistics-button, #logging-button {
    display: none;
}

#options-button:hover, #statistics-button:hover, #logging-button:hover {
    filter: contrast(0.5);
}

/**
 * Toggles
 */
#protection-toggle, #manipulateDOM-toggle {
    cursor: pointer;
    float: right;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

.switch {
    display: inline-block;
    height: 18px;
    position: relative;
    width: 40px;
}

.switch input {
    height: 0;
    opacity: 0;
    width: 0;
}

.slider, .slider-disabled {
    background-color: #b40000;
    border-radius: 34px;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    -webkit-transition: 0.1s;
    transition: 0.1s;
}

.slider::before, .slider-disabled::before {
    background-color: #f9f9fa;
    border-radius: 50%;
    bottom: 2px;
    content: "";
    height: 14px;
    left: 2px;
    position: absolute;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    width: 14px;
}

input:checked + .slider {
    background-color: #6bb798;
}

input:checked + .slider::before {
    -webkit-transform: translateX(22px);
    -ms-transform: translateX(22px);
    transform: translateX(22px);
}

.slider-disabled {
    background-color: lightgray;
    cursor: not-allowed;
}

.slider:hover {
    background-color: #7e0000;
}

input:checked + .slider:hover {
    background-color: #4b806a;
}

/**
 * Miscellaneous
 */

.badge {
    background-color: #6bb798;
    border-radius: 10px;
    color: #fff;
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    padding: 3px 15px;
}

.counter {
    font-size: 36px;
    font-weight: 600;
    margin-top: 4px;
    text-align: center;
}

.description {
    color: #777;
    font-style: italic;
    margin: 0 6px;
    text-align: center;
}

.hidden {
    display: none;
}

.label-version {
    color: #6aac91;
    font-size: 9px;
    margin: 0 0 5px 2px;
}

.label-domain {
    color: #555;
    display: flex;
    font-style: italic;
    overflow: hidden;
    white-space: nowrap;
}

.side-note {
    color: #a5a5a5;
    font-style: italic;
    font-weight: 400;
}

#popup-incomplete-translation {
    background-color: #ffa500;
    color: white;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    text-align: center;
    width: 100%;
}

/**
 * Compatibility
 */

@media screen and (-webkit-min-device-pixel-ratio: 0) {
    body {
        width: 348px;
    }
}

@media (prefers-color-scheme: dark) {
    /**
     * Sections
     */

    body {
        background-color: #404040;
        color: #bbb;
    }

    header {
        border-bottom-color: #292929;
    }

    #manipulateDOM-indicator {
        background: url('../../icons/help-light.svg') no-repeat right center;
        background-size: 15px 15px;
        color: #f2f2f2;
        font-weight: bold;
        padding-right: 20px;
        text-decoration: underline;
    }

    /**
     * Lists
     */

    .list-item {
        background-color: #484848;
        border-color: #292929;
        color: #f0f0f0;
    }

    .sublist {
        background-color: #323232;
        border-color: #292929;
        box-shadow: inset 0 2px 10px #292929;
    }

    .sublist:last-child {
        border-bottom-color: #292929;
    }

    .sublist-item {
        border-bottom-color: #2c2c2c;
        color: #f0f0f0;
    }

    .subpanel:last-child {
        border-bottom: solid #292929 1px;
    }

    /**
     * Buttons
     */

    .button {
        background-color: #3c3c3c;
        border-color: #323232;
        color: #bbb;
    }

    .button:hover {
        background-color: #434343;
    }

    .button:active {
        background-color: #393939;
    }

    #options-button-svg {
        background-image: url("../../icons/settings-light.svg");
    }

    #statistics-button-svg {
        background-image: url("../../icons/statistics-light.svg");
    }

    #logging-button-svg {
        background-image: url("../../icons/logging-light.svg");
    }

    input:checked + .slider {
        background-color: #6bb798;
    }

    .slider {
        background-color: #b54b4b;
    }

    .slider::before {
        background-color: #323232;
    }

    .slider-disabled {
        background-color: #777;
        cursor: not-allowed;
    }

    .slider-disabled::before {
        background-color: #323232;
    }

    #label-donate {
        background-color: #404040;
        color: #bbb;
        cursor: pointer;
        font-weight: 600;
    }

    /**
     * Miscellaneous
     */

    .badge {
        color: #2d5042;
    }

    .description {
        color: #dadada;
    }

    .label-domain {
        color: #aeaeae;
    }

    .panel:not(:last-child) {
        border-bottom-color: #292929;
    }

    .side-note {
        color: #888;
    }

    .panel-overflow {
        scrollbar-color: #747475 #484848;
    }
}