/*
PluName: 微博 MicroBlog
PluLink: https://www.webersongao.com/tag/microblog
Desc: 将您的WordPress网站用作微博；在小部件中显示微博或使用短代码显示微博。
Author: WebersonGao
AuthorLink: https://www.webersongao.com
Based on simple-microblogging plugin developed by Samuel Coskey, Victoria Gitman(http://boolesrings.org),Thanks to obaby(https://h4ck.org.cn/) Thanks to ChatGPT.
*/

/* 短代码样式 */
.microblog-shortcode {
    display: block;
}

.mb-shortcode-content {
    display: block;
}

.mb-shortcode-post {
    margin: 20px 10px;
}

.mb-shortcode-post-main {
    margin-top: 25px;
    /* margin-bottom: 8px;
    border-radius: 4px; */
}

.mb-shortcode-post hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mb-shortcode-post-bottom {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mb-shortcode-post-bottom-link {
    flex-shrink: 0;
}

.mb-shortcode-post-user-avatar {
    margin-right: 10px;
}

.mb-shortcode-post-user-avatar img {
    border-radius: 12.5px;
    width: 25px;
    height: 25px;
}

.mb-shortcode-post-user-name {
    color: #666;
    font-weight: bold;
}

.mb-shortcode-post-date {
    color: #6666669c;
    /* margin-right: 10px; */
    flex-shrink: 0;
    float: right;
}

.mb-shortcode-post-content {
    color: #666;
    font-size: 16px;
    font-weight: 400;
    margin-top: 10px;
    /* padding-left: 45px; */
}

.mb-shortcode-post-content p {
    text-indent: 0em;
}

.mb-shortcode-post-content a {
    color: #21759b;
}

.mb-shortcode-post-content-image-single {
    display: grid;
    grid-gap: 10px;
    margin: 10px auto;
    max-width: 300px;
    grid-auto-rows: minmax(auto, auto);
}

.mb-shortcode-post-content-image-double {
    display: grid;
    grid-gap: 20px;
    margin: 10px auto;
    max-width: calc(100% - 30px);
    /* 父容器宽度减去两个间距的值 */
    grid-template-columns: repeat(2, minmax(0, 300px));
    /* 两张图片宽度最大为 300px，但会根据父容器大小自适应 */
    grid-auto-rows: minmax(auto, auto);
    justify-content: center;
    /* 水平居中显示 */
}

.mb-shortcode-post-content-image-grid {
    display: grid;
    grid-gap: 10px;
    margin: 10px auto;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(100px, auto);
    /* 控制行高，这里设置为自动调整高度 */
}

.mb-shortcode-post-content-image-item {
    max-height: 500px;
    overflow: hidden;
}

.mb-shortcode-post-content-image-item img,
.mb-shortcode-post-content-image-item a img {
    max-width: 100%;
    /*height: auto;*/
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    /* 确保图片完全填充 */
    border-radius: 5px;
}

.mb-shortcode-post-head {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding-left: 45px; */
}

.mb-shortcode-post-head a {
    color: #666;
    font-size: 14px;

}

.mb-shortcode-post-head-title {
    max-width: calc(100% - 100px); /* 减去右边图标所占宽度 */
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mb-shortcode-pagelink {
    color: #666;
    text-align: center;
}

.mb-shortcode-pagelink a {
    color: #666;
    margin: 0 5px;
    display: inline-block;
    text-decoration: none;
}

.mb-shortcode-loadmore {
    text-align: right;
    margin-right: 10px;
    margin-bottom: 20px;
}

.mb-shortcode-loadmore a {
    color: #666;
}

/* 小部件样式 */
.microblog-widget-rss {
    float: right;
    margin-right: 5px;
}

.microblog-widget-head {
    display: block;
}

.microblog-widget-head-title {
    color: #666;
    margin-right: 5px;
    font-weight: bold;
    white-space: normal;
}

.microblog-widget-head-title a {
    color: #666;
}

.microblog-widget-content {
    margin-top: 5px;
}

.microblog-widget-content p {
    color: #666;
}

.microblog-widget-bottom {
    display: block;
}

.mb-shortcode-post-bottom a {
    color: #666;
    font-size: 14px;

}

.mb-shortcode-post-bottom-topics {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.microblog-widget-bottom-date {
    color: #6666669c;
    margin-left: 5px;
    float: left;
}

.microblog-widget-bottom-comment {
    margin-right: 5px;
    float: right;
}

.microblog-widget-bottom-comment a {
    color: #666;
}