/**
 * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    min-width: 230px;
    font-family: "Open Sans", 'Frutiger', 'Calibri', 'Myriad Pro', 'Myriad', sans-serif;
    font-weight: 500;
}

#container {
    min-height: 100%;
    position: relative;
}

#body {
    padding: 10px;
    padding-bottom: 100px;
    overflow: hidden;
    line-height: 1.7;
    font-size: 16px;
}

#body section {
    margin-top: 30px;
    margin-bottom: 30px;
}

#body section h1:first-child,
#body section h2:first-child,
#body section h3:first-child,
#body section h4:first-child,
#body section h5:first-child,
#body section h6:first-child {
    margin-top: 0;
}

#body h1:first-of-type {
    display: inline;
}

#body .header-wrap {
    margin-top: 0;
    margin-bottom: 30px;
}

.header-wrap .tag:first-of-type {
    margin-left: 30px;
}

.header-wrap h1 {
    font-weight: bold;
}

.tag {
    display: inline-block;
    position: relative;
    top: -5px;
    color: #777;
    padding: 2px 8px;
    border: 1px solid #aaa;
    border-radius: 3px;
}

.tag-danger {
    color: var(--color-error);
    border: 1px solid var(--color-error-hover);
}

#footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--color-background-light);
}

#footer .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

#footer .nav-link a {
    color: #007bbd;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner {
    position: relative;
    display: flex;
    align-items: center;
    max-height: 60px;
    padding: 10px 0;
    background-color: var(--bg-color);
}

.banner .container {
    position: relative;
    height: 100%;
}

.banner .left-navbar-wrapper {
    display: flex;
}

.banner .navbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 500px) {
    .banner .navbar-wrapper, .banner .left-navbar-wrapper {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .banner .user-nav {
        margin: 0 auto;
    }
}

.banner .user-nav .nav-link {
    border-radius: var(--border-radius-pill);
}

.banner .user-nav .nav-link:hover {
    position: relative;
}

.banner .user-nav .nav-link:hover a:before {
    position: absolute;
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-pill);
    border: 2px solid #fff;
}

.banner .nav-link a:hover {
    background-color: transparent;
}

.banner .navbar-nav .dropdown-menu {
    border-top-left-radius: var(--border-radius-large);
    border-top-right-radius: var(--border-radius-large);
}

.banner .navbar-nav .dropdown-toggle {
    color: #fff;
    background-color: transparent;
}

.banner .navbar-nav .dropdown a:hover, .banner .navbar-nav .dropdown.open {
    background-color: transparent;
}

.banner .dropdown-toggle.open a:hover,
.banner .nav .open > a:focus {
    background-color: transparent;
}

.banner .dropdown-menu {
    border-radius: var(--border-radius-large);
}

.banner .dropdown-menu .nav-link:hover {
    background-color: var(--color-background-light);
}

.banner .user-nav {
    display: flex;
    width: fit-content;
}

.banner .user-nav .nav-link a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner .developer-nav a.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner .developer-nav .dropdown-toggle > span.icon {
    margin-right: 5px;
    font-size: 20px;
}

.banner .developer-nav .dropdown:hover:before, .banner .developer-nav .dropdown.open > a:before {
    position: absolute;
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-pill);
    border: 2px solid #fff;
}

.banner .developer-nav .dropdown.open > .dropdown-menu {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    border: none;
}

.banner .developer-nav .dropdown.open > .dropdown-toggle > .icon {
    transform: rotateX(180deg);
}

.banner .developer-nav .dropdown.open > .dropdown-menu:before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.banner .developer-nav .dropdown-menu .divider {
    width: 70%;
    margin: 9px auto;
}

.banner .developer-nav .nav-link a {
    display: flex;
    align-items: center;
}

@media (max-width: 1199px) {
    .banner {
        max-height: 100%;
    }

    .banner .developer-nav {
        margin: 0;
    }

    .banner .left-navbar-wrapper {
        justify-content: space-between;
    }

    .search-form {
        margin-bottom: 10px;
    }
}

@media (max-width: 766px) {
    .banner {
        max-height: 100%;
    }

    .navbar-wrapper {
        flex-direction: column;
    }

    .banner .developer-nav .dropdown.open .dropdown-menu {
        /*max-width: 80%;*/
        transform: none;
        box-shadow: 0px 8px 30px 0px rgba(0, 116, 178, 0.08);
        background-color: #fff;
        margin: 9px auto;
    }

    .banner .developer-nav .dropdown:hover:before, .banner .developer-nav .dropdown.open > a:before {
        display: none;
    }

    .banner .developer-nav .dropdown.open > .dropdown-menu:before {
        top: 40px;
    }
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    margin: 5px 20px 5px 0;
}

.brand .logo {
    height: 40px;
}

.brand .site-title {
    display: inline-block;
    position: relative;
    margin-left: 20px;
    width: auto;
    font-size: 22px;
    line-height: 26px;
    color: white;
    font-weight: 700;
    font-family: "Open Sans", 'Frutiger', 'Calibri', 'Myriad Pro', 'Myriad', sans-serif;
}

.search-form {
    display: inline-block;
    /*position: relative;*/
    /*top: 3px;*/
    width: fit-content;
}

.search-form .search-input-group {
    position: relative;
}

.search-form .search-input-group .icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.search-box {
    display: block;
    width: 100%;
    border: 0;
}

.form-control.search-box {
    border-radius: var(--border-radius-large);
    padding-left: 34px;
}
.search-form span.form-control-feedback {
    left: 0;
}

.search-button {
    display: none;
}

@media screen and (max-width: 768px) {

    .banner {
        height: auto;
    }

    .banner .container {
        height: auto;
    }

    .brand {
        display: block;
        position: relative;
        top: 0;
        transform: none;
        margin: 10px auto;
        width: 100%;
    }

    .brand .logo {
        display: block;
        position: relative;
        margin: 0 auto;
        margin-bottom: 0;
    }

    .brand .site-title {
        display: block;
        position: relative;
        margin: 0 auto;
        line-height: 40px;
        color: white;
        text-align: center;
    }

    .search-form {
        display: block;
        position: relative;
        top: 0;
        right: 0;
        transform: none;
        margin: 10px auto;
    }
}

#sidebar.nav {
    margin-bottom: 30px;
    position: sticky;
}

.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    margin-right: 10px;
}

#sidebar li a {
    display: flex;
    align-items: center;
}

#sidebar li a:focus {
    border-radius: var(--border-radius-pill);
}

.podcast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--border-radius-large);
    background-color: var(--color-background-light);
    margin: 20px 0;
}

.podcast-details {
    width: 100%;
    padding: 20px;
    min-width: 50%;
    max-height: 232px;
}

.podcast-details h3 {
    font-weight: bold;
    margin: 0 0 10px 0;
}

.podcast-details p {
    font-size: 15px;
    line-height: 1.35;
}

.podcast-image img {
    border-top-right-radius: var(--border-radius-large);
    border-bottom-right-radius: var(--border-radius-large);
    width: 100%;
}


@media (max-width: 900px) {
    .podcast {
        flex-direction: column;
    }

    .podcast-details {
        margin-bottom: 20px;
    }

    .podcast-image img {
        border-top-right-radius: 0;
        border-bottom-right-radius: var(--border-radius-large);
        border-bottom-left-radius: var(--border-radius-large);
    }
}

.nav-heading {
    font-size: 12pt;
}

.nav-link > a {
    color: #fff;
    font-size: 12pt;
}

.nav-link > a:hover {
    text-decoration: underline;
}

.nav-link > a:focus {
    background-color: transparent !important;
}

.central-form {
    max-width: 450px;
    margin: auto;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-big);
    box-shadow: 0px 8px 30px 0px rgba(0, 116, 178, 0.08);
    margin-top: 50px;
}

.central-form h4 {
    font-weight: bold;
}

.central-form label {
    color: #6e6e6e;
}

@media (max-width: 900px) {
    .central-form {
        margin-bottom: 120px;
    }
}

.central-form .actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

form .text-danger {
    padding: 15px;
}

.socialaccount-providers {
    text-align: center;
    margin: 0;
    padding: 15px;
}

.socialaccount-providers li {
    list-style-type: none;
    display: inline-block;
}

.socialaccount-providers li a,
.btn-secondary {
    border-radius: 0;
    padding: 6px 12px;
    color: #fff !important;
    text-decoration: none !important;
    background-color: #1EC900;
    border-color: #4cae4c;
    margin-top: 5px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    text-decoration: none;
}

.search-results-title {
    margin-top: 0;
    margin-bottom: 30px;
}

.app-list-container .app-list-screenshot {
    text-align: center;
    height: 200px;
}

.app-list-screenshot.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-list-container h3 {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.3em;
    font-weight: 700;
}

.app-list-container img {
    max-width: 100%;
    max-height: 100%;
}

.app-list-container .default-screenshot {
    width: 100%;
    padding: 30px;
}

.app-list-container p {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.app-list-container .well {
    border: none;
    box-shadow: none;
}

.sorting {
    margin: 0 15px 15px 15px;
}

.sorting .glyphicon {
    margin-left: -2px;
    margin-right: 3px;
    position: relative;
    top: 2px;
}

.sorting li a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sorting li:not(.active) a:hover {
    background-color: var(--color-background-light) !important;
    color: var(--link-color) !important;
}

#filter-form {
    display: block;
    font-weight: 300;
}

#filter-form input {
    margin: 0;
    margin-left: 10px;
    cursor: pointer;
    position: relative;
    top: 2px;
}

#filter-form label {
    display: inline-block;
    font-weight: 300;
    cursor: pointer;
    padding: 7px 0;
    margin: 0;
    margin-right: 10px;
}

#filter-form label:last-of-type {
    margin-right: 0;
}

/* Checkbox */

#filter-form .checkbox-group, .checkbox-group {
    display: inline-block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    color: #007bbd;
    font-weight: 400;
}

#filter-form .checkbox-group:focus, .checkbox-group:focus {
    background-color: #eee;
}

#filter-form .checkbox-group input, .checkbox-group input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

#filter-form .checkbox-group .checkmark, .checkbox-group .checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 8px;
    height: 16px;
    width: 16px;
    background-color: #fff;
    border: 2px solid #007bbd;
    border-radius: var(--border-radius);
}

#filter-form .checkbox-group:hover input ~ .checkmark, .checkbox-group:hover input ~ .checkmark {
    background-color: var(--color-background-light);
}
#filter-form .checkbox-group input:checked ~ .checkmark, .checkbox-group input:checked ~ .checkmark {
    background-color: #007bbd;
}

#filter-form .checkbox-group .checkmark:after, .checkbox-group .checkmark:after {
    content: '';
    position: absolute;
    display: none;
}

#filter-form .checkbox-group input:checked ~ .checkmark:after, .checkbox-group input:checked ~ .checkmark:after {
    display: block;
}

#filter-form .checkbox-group .checkmark:after, .checkbox-group .checkmark:after {
    left: 4px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* --------- */

.app-meta {
    background-color: var(--color-background-light);
    border-radius: var(--border-radius-big);
    margin-bottom: 40px;
    float: right;
    padding: 0 30px;
    margin-left: 15px;
    line-height: 1.5em;
}

.app-meta a.btn {
    white-space: normal;
}

.app-meta .icon {
    min-width: 20px;
}

@media (max-width: 500px) {
    .app-meta {
        max-width: 100%;
    }
}

.app-meta h5 {
    font-weight: 700;
    color: #000;
    font-size: 16px;
}

.app-score-image {
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .app-list-container:last-child {
        margin-bottom: 60px;
    }
}

@media (max-width: 500px){
    .app-meta {
        margin-left: 0;
        float: none;
    }

    .app-meta section:first-child {
        margin-left: 0;
        float: none;
    }

    .app-meta section:first-child {
        padding-top: 20px;
    }

    .app-meta section:last-child {
        padding-bottom: 15px;
    }
}

.app-meta h6 {
    font-weight: bold;
    margin-bottom: 3px;
}


.markdown img {
    max-width: 100%;
}

.app-meta p,
.app-meta ul.authors {
    padding-bottom: 15px;
}

.app-meta ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.app-meta ul.list-inline li {
    display: inline;
    padding-left: 0;
}

.app-meta ul.list-inline li:after {
    content: ", ";
}

.app-meta ul.list-inline li:last-of-type:after {
    content: "";
}

.app-meta ul.authors,
.app-meta .resources ul {
    padding-left: 20px;
}

.app-meta ul.authors li:before,
.app-meta .resources ul li:before {
    width: 5px;
    height: 5px;
    border-radius: 100%;
    background-color: #007bbd;
    content: "";
    float: left;
    margin-left: -15px;
    color: var(--bg-color);
    position: relative;
    top: 9px;
}

.loading {
    background-image: url('../img/loading.gif');
    background-position: center;
    background-repeat: no-repeat;
    min-height: 300px;
}

.app-download {
    padding-bottom: 50px;
    padding-top: 50px;
    clear: right;
}

.app-download .unstable {
    color: #e0543d !important;
}

.app-download table thead th {
    border-bottom: none;
}

.app-download table thead th, .app-download table tbody td {
    text-align: center;
}

.app-download table td.nightly-channel-column {
    color: var(--color-error-hover);
}

.accordion-item.unstable .accordion-title {
    background-color: #ffe8e4 !important;
    border-color: #ffe8e4 !important;
}

.accordion-item.unstable .accordion-content {
    border-color: #ffe8e4 !important;
}

.accordion-item.unstable .accordion-content:before {
    display: inline-block;
    content: 'Unstable';
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #e0543d;
    font-weight: normal;
}

.accordion-item.unstable .accordion-content .release-download {
    background-color: #e0543d;
}

.accordion-item.unstable .accordion-content .release-download:after {
    content: '(Unstable)';
}

.center {
    text-align: center;
}

#app-upload-form {
    margin-bottom: 30px;
}

#app-upload-form button, #app-register-form button, #integration-register-form button {
    width: 100%;
}

#app-upload-form .alert {
    margin: 0;
}

#app-upload-form #detail-msg .text-danger {
    padding: 0 !important;
}

.app-form {
    max-width: 600px;
    margin: auto;
    padding: 15px;
}

.ajax-loader-gif {
    position: relative;
    top: -1px;
}

address {
    margin-top: 15px;
}

#api-token-regen-form {
    margin-top: 60px;
    max-width: 330px;
}

.password_change .form-control-feedback {
    top: 33px !important;
}

.app-comments ul {
    padding: 10px;
    margin-bottom: 25px;
}

.app-comments li {
    display: inline-block;
    padding: 5px;
}

.section-heading {
    padding-bottom: 10px;
    font-weight: 700;
}

.interact-section h5,
.donate-section h5,
.support-section h5 {
    margin-bottom: 20px;
}

.interact-section a, .interact-section button,
.donate-section a, .donate-section button,
.support-section a, .support-section button {
    margin-bottom: 10px;
}

.app-rating-list {
    margin-bottom: 50px;
}

.app-rating-language {
    display: flex;
    margin-top: 20px;
    margin-bottom: 20px;
}

.app-rating-language label {
    flex: 100%;
}

.app-ratings {
    width: 100%;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--border-radius-large);
    margin: 25px auto;
    padding: 10px 0;
}

.app-ratings form {
    padding: 10px;
}

#id_rating {
    padding: 0;
}

#id_rating li {
    display: inline-block;
    padding: 15px;
}

#id_rating li:first-child {
    padding-left: 0;
}

.rating-comment {
    margin: 15px 0;
    background-color: var(--color-background-light);
    border-radius: var(--border-radius-large);
}

.rating-comment .author {
    font-weight: bold;
}

.rating-comment header {
    padding: 10px 25px;
    font-size: 15pt;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rating-comment .comment-actions {
    display: flex;
    align-items: center;
    padding: 25px;
}

.rating-comment .comment-actions button {
    margin-right: 10px;
}

.rating-comment .comment-actions button:last-child {
    margin-right: 0;
}

@media (max-width: 500px) {
    .rating-comment header {
        display: flex;
        flex-direction: column;
    }

    .rating-comment .comment-actions {
        flex-direction: column;
    }

    .rating-comment .comment-actions button {
        margin-bottom: 10px;
    }

    .rating-comment .comment-actions button:last-child {
        margin-bottom: 0;
    }
}

.rating-comment .comment {
    padding: 25px;
}

.rating-comment .date {
    float: right;
}

.rating-comment .rating img {
    margin: 0;
}

.rating {
    display: none;
}

.good .rating-good {
    display: block;
}

.ok .rating-ok {
    display: block;
}

.bad .rating-bad {
    display: block;
}

.required-field {
    color: var(--color-error-hover);
    padding: 0 5px;
    font-size: 12px;
}

.very-negative-rating,
.negative-rating,
.neutral-rating,
.positive-rating,
.very-positive-rating {
    border-radius: 5px;
    vertical-align: center;
    line-height: 30px;
    height: 30px;
    display: inline-block;
    padding: 0 10px
}

.very-negative-rating {
    background-color: #7b0a00;
    color: #fff;
}
.negative-rating {
    background-color: #ff8f00;
}
.neutral-rating {
    background-color: #ffe400;
}
.positive-rating {
    background-color: #67c608;
}
.very-positive-rating {
    background-color: #1a952b;
    color: #fff;
}

form .form-group input[type=checkbox] {
    position: relative;
    top: 2px;
    margin-right: 5px;
}

.certificate {
    font-family: monospace;
}

#app-generate-form select[multiple] {
    height: 200px;
}

.btn-loading {
    background-image: url('../img/loading.gif');
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px;
}

.global-success-msg,
.global-error-msg {
    margin: 15px 0 !important;
}

.auth-form {
    padding-top: 10px;
}

.btn-light, .btn-light:hover {
    color: #1887c3;
}

.account-content {
    margin-bottom: 60px;
}

.transfer-apps th:not(:first-child),
.transfer-apps td:not(:first-child) {
    text-align: center;
}

.transfer-apps form {
    display: flex;
    justify-content: center;
}
