/**
 * FF Brave Pro — poster styles.
 * The .as3-* rules are ported verbatim from the quater Discuz theme's
 * ArticleShare widget; .ff-share-bar styles the inline button row appended
 * to article content.
 */

/* --- Inline share bar (appended after the_content) --- */
.ff-share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 28px 0 8px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.ff-share-bar .ff-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
}

.ff-share-bar .ff-btn-poster {
    background: #1e293b;
    color: #fff;
}

.ff-share-bar .ff-btn-poster:hover {
    background: #0f172a;
}

.ff-share-bar .ff-btn-weibo {
    background: #fff;
    color: #e6162d;
    border: 1px solid #ffcfd4;
}

.ff-share-bar .ff-btn-weibo:hover {
    background: #fff5f6;
}

.ff-share-bar .ff-btn-x {
    background: #000;
    color: #fff;
    padding: 10px 18px;
}

.ff-share-bar .ff-btn-x:hover {
    background: #222;
}

.ff-share-bar .ff-btn-share {
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.ff-share-bar .ff-btn-share:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* --- Poster bottom-sheet panel (ported from quater ArticleShare) --- */
.as3-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: background 0.3s ease;
}

.as3-panel {
    background: #fff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 420px;
    padding-bottom: 30px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    animation: as3up 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

@keyframes as3up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.as3-handle {
    width: 40px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    margin: 12px auto 16px;
}

.as3-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 15px;
}

.as3-tpls {
    display: flex;
    gap: 10px;
    padding: 0 20px 15px;
}

.as3-tpl {
    flex: 1;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.as3-tpl.on {
    border-color: #7c3aed;
    transform: scale(1.1);
}

.as3-pw {
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.as3-poster {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.as3-cover-box {
    width: 100%;
    padding: 20px 20px 0;
    box-sizing: border-box;
}

.as3-cover {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.as3-body {
    padding: 18px 20px 12px;
}

.as3-ttl {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
    color: #1e293b;
}

.as3-sep {
    height: 2px;
    width: 40px;
    margin: 12px 20px;
}

.as3-sum {
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.as3-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.as3-logo {
    height: 22px;
    margin-bottom: 4px;
}

.as3-ss {
    font-size: 11px;
    color: #94a3b8;
}

.as3-qr-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    border: 1px solid #e2e8f0;
}

.as3-qr-hint {
    font-size: 10px;
    color: #cbd5e1;
    margin-top: 4px;
    text-align: center;
}

.as3-acts {
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.as3-btn-main {
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.as3-btn-sub {
    background: #fff;
    color: #e6162d;
    border: 1px solid #ffcfd4;
    border-radius: 12px;
    padding: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.as3-share-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

/* --- Article share panel (bottom bar "Share" button) --- */
.as3-overlay-share {
    background: rgba(15, 23, 42, 0.5) !important;
}

.as3-share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 4px 20px 18px;
}

.as3-share-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 4px 8px;
    cursor: pointer;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.as3-share-item:active,
.as3-share-item:hover {
    background: #f1f5f9;
}

.as3-share-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.as3-share-icon svg {
    width: 24px;
    height: 24px;
}

.as3-qr-view {
    padding: 4px 20px 22px;
    text-align: center;
}

.as3-back-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    display: inline-block;
    margin-bottom: 8px;
}

.as3-qr-holder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    font-size: 13px;
    color: #94a3b8;
}

.as3-qr-large {
    width: 190px;
    height: 190px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-sizing: border-box;
}

.as3-qr-view .as3-qr-hint {
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
}

.as3-cprow {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 10px 15px;
    margin: 15px 20px 0;
}

.as3-cpurl {
    flex: 1;
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.as3-cpbtn {
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.as3-toast {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    z-index: 100001;
    font-size: 14px;
}
