/**
 * Analytics
 *
 * SPDX-FileCopyrightText: 2019-2022 Marcel Scherello
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

.app-files .shareTabView {
    min-height: 100px;
}

#shareSearchResult {
    border: 1px solid var(--color-border-dark);
}

.shareSearchResultItem:hover {
    background-color: var(--color-background-hover);
}

.share-autocomplete-item {
    display: flex;
}

.share-autocomplete-item .merged {
    margin-left: 32px;
}

.share-autocomplete-item .autocomplete-item-text {
    margin-left: 10px;
    margin-right: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 32px;
    vertical-align: middle;
    flex-grow: 1;
}

.share-autocomplete-item .autocomplete-item-text .ui-state-highlight {
    border: none;
    margin: 0;
}


.share-autocomplete-item .with-description .autocomplete-item-text {
    line-height: 100%;
}

.share-autocomplete-item .autocomplete-item-details {
    display: block;
    line-height: 130%;
    font-size: 90%;
    opacity: 0.7;
}

.share-autocomplete-item .icon {
    opacity: .7;
    margin-right: 7px;
}

.share-autocomplete-item .icon.search-globally {
    width: 32px;
    height: 32px;
    margin-right: 0;
}

.shareTabView .oneline {
    white-space: nowrap;
    position: relative;
}

.shareTabView .shareWithLoading {
    padding-left: 10px;
    right: 35px;
    top: 3px;
}

.shareTabView .shareWithConfirm {
    position: absolute;
    right: 2px;
    top: 6px;
    padding: 14px;
    opacity: 0.5;
}

.shareTabView .shareWithField:focus ~ .shareWithConfirm {
    opacity: 1;
}

.shareTabView .linkMore {
    position: absolute;
    right: -7px;
    top: -4px;
    padding: 14px;
}

/* Border above last entry '+ Add another share' to separate it from current link settings */
.new-share {
    border-top: 1px solid var(--color-border);
}

.shareTabView .linkPass .icon-loading-small {
    margin-right: 0;
}

.shareTabView .icon {
    background-size: 16px 16px;
}

.shareTabView .shareWithList .icon-loading-small:not(.hidden) + span,
.shareTabView .linkShareView .icon-loading-small:not(.hidden) + input + label:before {
    /* Hide if loader is visible */
    display: none !important;
}

.shareTabView input [type='checkbox'] {
    margin: 0 3px 0 8px;
    vertical-align: middle;
}

.shareTabView input [type='text'] .shareWithField,
.shareTabView input [type='text'] .emailField {
    width: 100%;
    box-sizing: border-box;
    padding-right: 32px;
    text-overflow: ellipsis;
}

.shareTabView input [type='text'].linkText,
.shareTabView input [type='password'].linkPassText,
.shareTabView input [type='password'].passwordField {
    width: 180px !important;
}

.shareTabView form {
    font-size: 100%;
    margin-left: 0;
    margin-right: 0;
}

.shareTabView .share-note {
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    margin-left: 37px;
}

.shareWithList {
    list-style-type: none;
    display: flex;
    flex-direction: column;
}

.shareWithList > li {
    height: 44px;
    white-space: normal;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.shareWithList > li .avatar {
    width: 32px;
    height: 32px;
    background-color: var(--color-primary);
}

.shareWithList .unshare img {
    vertical-align: text-bottom;
    /* properly align icons */
}

.shareWithList .sharingOptionsGroup {
    margin-left: auto;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.shareWithList .sharingOptionsGroup > .icon:not(.hidden),
.shareWithList .sharingOptionsGroup .share-menu > .icon:not(.hidden) {
    padding: 14px;
    height: 44px;
    width: 44px;
    opacity: .5;
    display: block;
    cursor: pointer;
}

.shareWithList .sharingOptionsGroup > .icon:not(.hidden):hover,
.shareWithList .sharingOptionsGroup > .icon:not(.hidden):focus,
.shareWithList .sharingOptionsGroup > .icon:not(.hidden):active {
    opacity: .7;;
}

.shareWithList > .share-menu {
    position: relative;
    display: block;
}

.shareWithList .username {
    padding: 0 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ui-autocomplete {
    /* limit dropdown height to 6 1/2 entries */
    max-height: calc(36px * 6.5);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1550 !important;
}

.notCreatable {
    padding-left: 12px;
    padding-top: 12px;
    color: var(--color-text-maxcontrast);
}

.contactsmenu-popover {
    left: -6px;
    right: auto;
    padding: 3px 6px;
    top: 100%;
    margin-top: 0;
}

.contactsmenu-popover li.hidden {
    display: none !important;
}

.contactsmenu-popover li.hidden:after {
    left: 8px;
    right: auto;
}

.reshare,
#link label,
#expiration label {
    display: inline-flex;
    align-items: center;
}

#expiration label .avatar {
    margin-right: 5px;
}

.resharerInfoView.subView {
    position: relative;
}