.rayjoo-share-poster-widget {
    margin: 32px 0 0;
}

.rayjoo-share-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.rayjoo-share-poster-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(143, 185, 255, 0.45);
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.rayjoo-share-poster-button:hover,
.rayjoo-share-poster-button:focus-visible {
    background: #1d4ed8;
    border-color: rgba(179, 208, 255, 0.72);
    outline: none;
    transform: translateY(-1px);
}

.rayjoo-share-poster-button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.rayjoo-share-poster-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    font-size: 16px !important;
    line-height: 1;
}

.rayjoo-share-poster-button.is-loading .rayjoo-share-poster-button-icon {
    animation: rayjoo-share-spin 0.78s linear infinite;
}

.rayjoo-share-socials {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rayjoo-share-social-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d9deea;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #d9deea;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.rayjoo-share-social-button .iconfont {
    font-size: 18px !important;
    line-height: 1;
    color: currentColor;
}

.rayjoo-share-social-button .iconfont::before {
    color: #d9deea;
}

.rayjoo-share-social-button:hover,
.rayjoo-share-social-button:focus-visible,
.rayjoo-share-social-button.is-open {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(143, 185, 255, 0.62);
    color: #8fb9ff;
    outline: none;
    transform: translateY(-1px);
}

.rayjoo-share-social-wechat:hover,
.rayjoo-share-social-wechat:focus-visible,
.rayjoo-share-social-wechat.is-open {
    border-color: #22c55e;
    color: #22c55e;
}

.rayjoo-share-social-wechat:hover .iconfont::before,
.rayjoo-share-social-wechat:focus-visible .iconfont::before,
.rayjoo-share-social-wechat.is-open .iconfont::before {
    color: #22c55e;
}

.rayjoo-share-social-weibo:hover,
.rayjoo-share-social-weibo:focus-visible {
    border-color: #e05244;
    color: #e05244;
}

.rayjoo-share-social-weibo:hover .iconfont,
.rayjoo-share-social-weibo:focus-visible .iconfont,
.rayjoo-share-social-weibo:hover .iconfont::before,
.rayjoo-share-social-weibo:focus-visible .iconfont::before {
    color: #e05244;
}

.rayjoo-share-social-qq:hover,
.rayjoo-share-social-qq:focus-visible {
    border-color: #22a4ff;
    color: #22a4ff;
}

.rayjoo-share-social-qq:hover .iconfont,
.rayjoo-share-social-qq:focus-visible .iconfont,
.rayjoo-share-social-qq:hover .iconfont::before,
.rayjoo-share-social-qq:focus-visible .iconfont::before {
    color: #22a4ff;
}

.rayjoo-share-wechat-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    z-index: 4;
    display: none;
    width: 156px;
    padding: 10px 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
    transform: translateX(-50%);
}

.rayjoo-share-wechat-popover::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    transform: translateX(-50%) rotate(45deg);
}

.rayjoo-share-social-wechat:hover .rayjoo-share-wechat-popover,
.rayjoo-share-social-wechat:focus-visible .rayjoo-share-wechat-popover,
.rayjoo-share-social-wechat:focus-within .rayjoo-share-wechat-popover,
.rayjoo-share-social-wechat.is-open .rayjoo-share-wechat-popover {
    display: block;
}

.rayjoo-share-wechat-title {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.rayjoo-share-wechat-canvas {
    display: block;
    width: 132px;
    height: 132px;
    background: #ffffff;
}

.rayjoo-share-poster-error {
    margin-top: 10px;
    color: #fca5a5;
    font-size: 14px;
    line-height: 1.5;
}

.rayjoo-share-poster-modal[hidden] {
    display: none;
}

.rayjoo-share-poster-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 24px 64px;
}

.rayjoo-share-poster-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.rayjoo-share-poster-dialog {
    position: relative;
    z-index: 1;
    width: min(400px, calc(100vw - 48px));
    max-height: calc(100vh - 106px);
    overflow: visible;
    padding: 0 0 22px;
}

.rayjoo-share-poster-preview {
    display: flex;
    justify-content: center;
    max-height: calc(100vh - 128px);
}

.rayjoo-share-poster-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 128px);
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.rayjoo-share-poster-actions {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 158px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.18);
}

.rayjoo-share-poster-download,
.rayjoo-share-poster-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 62px;
    height: 40px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.rayjoo-share-poster-download {
    color: #1677d2;
}

.rayjoo-share-poster-close {
    color: #3f3f46;
}

.rayjoo-share-poster-download:hover,
.rayjoo-share-poster-download:focus-visible,
.rayjoo-share-poster-close:hover,
.rayjoo-share-poster-close:focus-visible {
    color: #1677d2;
    outline: none;
}

.rayjoo-share-poster-close:hover,
.rayjoo-share-poster-close:focus-visible {
    color: #111827;
}

.rayjoo-share-action-divider {
    width: 1px;
    height: 19px;
    margin: 0 4px;
    background: #e5e7eb;
}

.rayjoo-share-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    font-size: 16px !important;
    line-height: 1;
}

body.rayjoo-share-poster-open {
    overflow: hidden;
}

@keyframes rayjoo-share-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .rayjoo-share-poster-modal {
        padding: 24px 14px 54px;
    }

    .rayjoo-share-poster-dialog {
        width: calc(100vw - 28px);
        max-height: calc(100vh - 78px);
        padding-bottom: 22px;
    }

    .rayjoo-share-poster-preview {
        max-height: calc(100vh - 100px);
    }

    .rayjoo-share-poster-canvas {
        max-height: calc(100vh - 100px);
    }

    .rayjoo-share-poster-button {
        width: 100%;
    }

    .rayjoo-share-toolbar {
        align-items: stretch;
        justify-content: flex-end;
    }

    .rayjoo-share-socials {
        width: 100%;
        justify-content: flex-start;
    }
}
