.share-popup {
    position: absolute;
    z-index: 99999;
    width: 292px;
    max-width: calc(100vw - 20px);
    color: #15171a;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .13);
    overflow: hidden;
    transform-origin: top left;
    animation: sharePopupIn .14s ease-out;
    will-change: left, top, transform, opacity;
}

.share-popup.d-none {
    display: none !important;
}

.share-popup.is-position-top {
    transform-origin: bottom left;
}

.share-popup.is-position-right {
    transform-origin: left center;
}

.share-popup.is-position-left {
    transform-origin: right center;
}

@keyframes sharePopupIn {
    from {
        opacity: 0;
        transform: translateY(-3px) scale(.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.share-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 10px 6px;
}

.share-popup-heading {
    min-width: 0;
}

.share-popup-title {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.share-popup-selected-count {
    display: block;
    margin-top: 1px;
    color: #7a828d;
}

.share-popup-close {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    border: 0;
    border-radius: 50%;
    color: #64748b;
    background: rgba(15, 23, 42, .055);
    line-height: 1;
    cursor: pointer;
    transition: background .14s ease, color .14s ease, transform .14s ease;
}

.share-popup-close:hover {
    color: #15171a;
    background: rgba(15, 23, 42, .09);
    transform: rotate(5deg);
}

.share-popup-body {
    position: relative;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 10px 10px;
}

.share-popup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 9px;
}

.share-popup.is-match-share .share-popup-actions {
    grid-template-columns: 1fr;
}

.share-popup.is-match-share .btn-copy-link {
    display: none !important;
}

.share-popup.is-match-share .btn-native-share {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.share-popup-action {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 0;
    border-radius: 13px;
    text-align: left;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}

.share-popup-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.share-popup-action:active {
    transform: translateY(0) scale(.99);
}

.share-popup-action-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.share-popup-action-text {
    min-width: 0;
}

.share-popup-action strong,
.share-popup-action small {
    color: inherit;
    display: block;
    line-height: 1.12;
}

.share-popup-action small {
    margin-top: 2px;
    opacity: .72;
}

.share-popup-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 9px;
    padding: 1px 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.share-popup-tabs::-webkit-scrollbar {
    display: none;
}

.share-popup-tab {
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 0 8px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 999px;
    color: #667085;
    background: rgba(15, 23, 42, .025);
    cursor: pointer;
    white-space: nowrap;
    transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.share-popup-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, .14);
    background: rgba(15, 23, 42, .045);
}

.share-popup-tab.is-active {
    border-color: currentColor;
    box-shadow: 0 7px 15px rgba(15, 23, 42, .07);
}

.share-popup-tab em {
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    font-style: normal;
    color: inherit;
    background: rgba(255, 255, 255, .62);
}

.share-popup-search-wrap {
    height: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    padding: 0 10px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background: rgba(15, 23, 42, .025);
}

.share-popup-search-wrap i {
    color: #94a3b8;
}

.share-popup-search {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #15171a;
}

.share-popup-search::placeholder {
    color: #9ca3af;
}

.share-popup-list {
    width: 100%;
    margin-bottom: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.share-popup-list::-webkit-scrollbar {
    height: 4px;
}

.share-popup-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(15, 23, 42, .14);
}

.share-popup-track {
    display: flex;
    align-items: stretch;
    gap: 7px;
    min-width: min-content;
    padding: 1px 2px 6px;
}

.share-popup-chat-item {
    position: relative;
    width: 78px;
    min-width: 78px;
    flex: 0 0 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 9px 7px 8px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 13px;
    color: #252a31;
    background: #fff;
    cursor: pointer;
    user-select: none;
    scroll-snap-align: start;
    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.share-popup-chat-item:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, .15);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
}

.share-popup-chat-item.is-selected {
    border-color: currentColor;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.share-popup-chat-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transform: scale(.86);
    transition: opacity .14s ease, transform .14s ease;
}

.share-popup-chat-item.is-selected .share-popup-chat-check {
    opacity: 1;
    transform: scale(1);
}

.share-popup-chat-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, .045);
}

.share-popup-chat-title {
    display: block;
    width: 100%;
    min-width: 0;
    font-weight: 650;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-popup-chat-type {
    display: block;
    width: 100%;
    min-width: 0;
    color: #8b95a1;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-popup-chat-id {
    display: none !important;
}

.share-popup-empty {
    min-height: 82px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 1px dashed rgba(15, 23, 42, .12);
    border-radius: 13px;
    color: #7a828d;
    background: rgba(15, 23, 42, .02);
    text-align: center;
}

.share-popup-footer {
    display: flex;
    gap: 7px;
}

.share-popup-footer-btn {
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .14s ease, opacity .14s ease, filter .14s ease;
}

.share-popup-footer-btn:active {
    transform: scale(.99);
}

.share-popup-footer-btn-light {
    flex: 0 0 78px;
    color: #64748b;
    background: rgba(15, 23, 42, .06);
}

.share-popup-footer-btn-send {
    flex: 1;
}

.share-popup-footer-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.share-popup-spinner {
    width: 14px;
    height: 14px;
    display: inline-block;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: sharePopupSpin .7s linear infinite;
}

@keyframes sharePopupSpin {
    to {
        transform: rotate(360deg);
    }
}

.share-popup-toast {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: none;
    padding: 8px 9px;
    border-radius: 11px;
    color: #fff;
    background: rgba(17, 24, 39, .94);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
    font-weight: 650;
    text-align: center;
}

.share-popup-toast.is-error {
    background: rgba(220, 38, 38, .95);
}

/* Dark Mode */
body.dark-mode .share-popup {
    color: #f8fafc;
    background: #121721;
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
}

body.dark-mode .share-popup-selected-count,
body.dark-mode .share-popup-search-wrap i,
body.dark-mode .share-popup-chat-type,
body.dark-mode .share-popup-empty {
    color: #a8b3c2;
}

body.dark-mode .share-popup-close,
body.dark-mode .share-popup-footer-btn-light {
    color: #cbd5e1;
    background: rgba(255, 255, 255, .08);
}

body.dark-mode .share-popup-search-wrap,
body.dark-mode .share-popup-tab,
body.dark-mode .share-popup-chat-item,
body.dark-mode .share-popup-empty {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
}

body.dark-mode .share-popup-tab em {
    background: rgba(255, 255, 255, .08);
}

body.dark-mode .share-popup-tab:hover {
    background: rgba(255, 255, 255, .065);
}

body.dark-mode .share-popup-search {
    color: #f8fafc;
}

body.dark-mode .share-popup-search::placeholder {
    color: #7b8796;
}
