/*
Theme Name: Moments Theme
Theme URI: https://wong.st/
Author: Benyoung Wong
Author URI: https://benyoungwong.com/
Description: Moments WordPress theme.
Version: 0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Moments

可选插件：
1. Advanced Custom Fields；用于更方便地管理 moments_location 等自定义字段。
2. Smush；上传图片后如果插件存在，主题会尝试触发压缩。

*/
* {
    margin:0;
    padding:0;
}
body {
    background: #F8F5F5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
}

.mblog-wrapper {
    margin: 0 auto;
    width: 562px;
    background: #FFFFFF;
}
.mblog-cover {
    height: 400px;
    font-size: 0;
    line-height: 0;
    position: relative;
}
.mblog-cover:after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, rgba(24, 24, 24, 0.8), transparent);
    z-index: 1;
    pointer-events: none;
}
.mblog-author {
    position: absolute;
    right: 20px;
    bottom: -40px;
    width: 540px;
    height: 88px;
    z-index: 2;
}
.mblog-author-name {        
    text-align: right;
    font-size: 16px;
    font-weight: bold; 
    color: #FFFFFF;      
    padding-right: 70px;
    height: 60px;
    line-height: 60px;
}
.mblog-author-avatar {
    display: block;
    width: 60px;
    height: 60px;
    overflow: hidden;
    background: yellow;
    border-radius: 5px;
    position: absolute;
    right: 0;
    top: 0;
}
.mblog-author-avatar img {
    width: 60px;
    height: 60px;
}
.mblog-author-whatsup {
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 12px;
    color: #BEBEBE;
    text-align: right;
    line-height: 100%;
}

.mblog-list {
    padding: 35px 25px;
}
.mblog-list-single {
    padding: 35px 25px 5px;
}

.mblog-panel {
    margin: 25px 0 0;
    padding-left: 50px;
    border-bottom: 1px solid #F2F2F2;
}
.mblog-list-single .mblog-panel {
    border:none;
}
.mblog-panel-author {
    margin-bottom: 10px;
    position: relative;
}
.mblog-panel-author-name {
    font-size: 14px;
    line-height: 100%;
    font-weight: bold;
    color: #5B6B92;
}
.mblog-panel-author-avatar {
    display: block;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 5px;
    position: absolute;
    left: -50px;
    top: 0;
}
.mblog-panel-author-avatar img {
    width: 36px;
    height: 36px;
}

.mblog-panel-content p {
    font-size: 16px;
    line-height: 180%;
    color: #000000;
    margin-bottom: 10px;
}
.mblog-panel-content a {
    color: #5B6B92;
    text-decoration: none;
}
.mblog-panel-content a:hover {
    color: #5B6B92;
    text-decoration: underline;
}
.mblog-panel-content figure {
    display: none !important;
}
.mblog-panel-content-single-img {
    font-size: 0;
    line-height: 0;
    overflow: hidden;
    margin-bottom: 0;
}
.mblog-panel-content-single-img a {
    display: block;
    max-width: 309px;
    min-height: 60px;
    background:url(images/icon_loading.gif) no-repeat center center;
}
.mblog-panel-content-single-img img {
    max-width: 309px;
    overflow: hidden;
}
.mblog-panel-content-multiple-img {
    font-size: 0;
    line-height: 0;
    list-style: none;
    display: grid;
    grid-gap: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}
.mblog-panel-content-multiple-img li {
    width: 152px;
    height: 152px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #FFF;
}
.mblog-panel-content-multiple-img li a {
    width: 152px;
    height: 152px;
    overflow: hidden;
    cursor: pointer;
    display: block;
    background:url(images/icon_loading.gif) no-repeat center center;
}
.mblog-panel-content-multiple-img img {
    object-fit: cover;
    width:100%;
    height: 100%;
}
.mblog-panel-content-four-img {
    width: 309px;
    grid-template-columns: repeat(2, 1fr);
}
.mblog-panel-content-more-img {
    width: 466px;
    grid-template-columns: repeat(3, 1fr);
}

.mblog-panel-info {
    margin-bottom: 25px;
}
.mblog-panel-info-content {
    margin: 10px 0 18px;
    position: relative;
}
.mblog-panel-detail {
    font-size: 12px;
    line-height: 100%;
}
.mblog-panel-detail time {
    color: #B2B2B2;
    margin-right: 10px;
}
.mblog-panel-detail time a {
    color: #B2B2B2;
    text-decoration: none;
}
.mblog-panel-location {
    color: #5B6B92;
}
.mblog-panel-location a,
.mblog-panel-location a:hover {
    color: #5B6B92;
    text-decoration: none;
}

.mblog-panel-button {
    display: block;
    width: 32px;
    height: 20px;
    overflow: hidden;
    background: #F7F7F7;
    border: 0;
    border-radius: 5px;
    appearance: none;
    font-size: 0;
    line-height: 0;
    position: absolute;
    right: 0;
    top: -6px;
    cursor: pointer;
}
.mblog-panel-button::before,
.mblog-panel-button::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    font-size: 0;
    line-height: 0;
    position: absolute;
    top: 8px;
    border-radius: 45px;
    background: #5B6B92;
}
.mblog-panel-button::before {
    left: 10px;
}
.mblog-panel-button::after {
    right: 10px;
}
.mblog-panel-option {
    position: absolute;
    right: 40px;
    top: -20px;
    padding: 0 24px;
    height: 50px;
    border-radius: 5px;
    background: #4C4C4C;
    font-size: 16px;
    line-height: 50px;
    color: #FFFFFF;
    text-align: center;
    opacity: 0;
    transform: translateX(1%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none; /* 防止透明时被点击 */
    z-index: 10;
    /* display: none; */
}
.mblog-panel-option-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto; /* 显示时可以被点击 */
}
.mblog-panel-option-like,
.mblog-panel-option-line,
.mblog-panel-option-comment {
    display: inline-block;
    position: relative;
}
.mblog-panel-option-like,
.mblog-panel-option-comment {
    cursor: pointer;
    padding-left: 28px;
    border: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    /* overflow: hidden; */
}
.mblog-panel-option-comment {
    margin-left: 51px;
}
.mblog-panel-option-like::before,
.mblog-panel-option-comment::before {
    content: '';
    display: block;
    width: 23px;
    height: 20px;
    font-size: 0;
    line-height: 0;
    position: absolute;
    left: 0;
    top: 17px;
    overflow: hidden;
}
.mblog-panel-option-like::before {
    background: url(images/icon_like_default.png) no-repeat left -3px;
    background-size: 120% 120%;
}
.mblog-panel-option-liked::before {
    background: url(images/icon_like_active.png) no-repeat left -1px;
    background-size: 110% 110%;
}
.mblog-panel-option-comment::before {
    background: url(images/icon_comment_default.png) no-repeat left -3px;
    background-size: 120% 120%;
}
.mblog-panel-option-comment:after {
    content: '';
    display: block;
    position: absolute;
    top: 10px;
    left: -26px;
    height: 30px;
    font-size: 0;
    line-height: 0;
    border-left: 1px #353535 solid;
}
/* .mblog-panel-option-line {
    margin: 0 25px;
    color: #353535;
    height: 30px;
    font-size: 0;
    line-height: 0;
    border-left: 1px #353535 solid;
    top: 10px;
} */

.mblog-panel-swap {
    background: #F7F7F7;
    padding: 5px 15px 12px;
}
.mblog-panel-swap p {
    font-size: 14px;
    line-height: 180%;
} 
.mblog-panel-swap p strong {
    margin-right:2px;
}
.mblog-panel-swap-like,
.mblog-panel-swap-comment {
    color: #5B6B92;
    padding-top: 10px;
}
.mblog-panel-swap-like p::before {
    content: '';
    /* padding-left: 25px; */
    margin-right: 5px;
    display: inline-block;
    width: 18px;
    height: 18px;
    font-size: 0;
    line-height: 0;
    background: url(images/icon_like_focus.png) no-repeat left -2px;
    background-size: cover;
    vertical-align: middle;
}
.mblog-panel-swap-comment {
    color: #000000;
    padding-top: 5px;
}
.mblog-panel-swap-comment:empty {
    display: none;
}
.mblog-panel-swap-comment p {
    transition: all 0.4s ease;
} 
.mblog-panel-swap-comment-name {
    color: #5B6B92;
    font-weight: bold;
}

.mblog-panel-comment-post {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mblog-panel-comment-post-active {
    overflow: visible;
    max-height: 500px; /* 要足够高显示整个表单 */
}

.mblog-panel-comment-post-visible {
    opacity: 1;
    transform: translateY(0);
}  
.mblog-panel-comment-post fieldset {
    border: 0;
    width: 436px;
    margin-top: 15px;
}
.mblog-panel-commmnet-post-legend {
    display: none;
}
.mblog-panel-comment-post-textarea,
.mblog-panel-comment-post-input,
.mblog-panel-comment-post-textarea::placeholder,
.mblog-panel-comment-post-input::placeholder {
    border: 1px #FFFFFF solid;
    background: #FFFFFF;
    font-size: 14px;
    line-height: 160%;
    color: #B2B2B2;
    resize: none;
    margin-bottom: 15px;
    display: block;
    padding: 5px;
}
.mblog-panel-comment-post-textarea,
.mblog-panel-comment-post-input {
    color: #000000;
}
.mblog-panel-comment-post-textarea:focus,
.mblog-panel-comment-post-input:focus {
    border: 1px #58BE6B solid;
    outline: none;
    color: #000000;
    padding: 5px;
}
.mblog-panel-comment-post-textarea {
    width: 422px;
    height: 76px;
    
}
.mblog-panel-comment-post-input {
    width: 422px;
    height: 20px;
}
.mblog-panel-comment-post-button-main,
.mblog-panel-comment-post-button-other {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    margin: 0 15px 5px 0;
    border: 0;
    cursor: pointer;
 }

.mblog-panel-comment-post-button-main {
    background: #58BE6B;
    color: #FFFFFF;
 }
.mblog-panel-comment-post-button-other {
    background: #E1E1E1;
    color: #000000;
}
.mblog-panel-comment-post-notice {
    padding: 8px 10px;
    line-height: 160%;
    background: #FEFBEB;
    color: #000000;
    border: 1px #FDF1C1 solid;
    border-radius: 5px;
    margin-bottom: 15px;
    min-height: 20px;
    display: none;
    transition: all 0.3s ease;
}
.mblog-panel-swap-comment p {
    transition: all 0.4s ease;
  }

.mblog-panel-end {
    margin: 30px 0 0;
    text-align: center;
    font-size: 12px;
    color: #B2B2B2;
}

  @media (max-width: 600px) {
    /* 设定 HTML 和 BODY 撑满屏幕 */
    html, body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        overflow-x:hidden;
    }

    /* 主容器宽度响应式 */
    .mblog-wrapper {
        width: 100%;
        margin: 0;
        overflow-x: hidden;
    }

    /* 图片适配宽度 */
    /* .mblog-panel-content-single-img img,
    .mblog-panel-content-multiple-img img {
        max-width: 100%;
        height: auto;
    } */

    /* 评论框宽度适配 */
    .mblog-panel-comment-post fieldset {
        width: 100%;
        box-sizing: border-box;
    }

    .mblog-panel-comment-post-textarea,
    .mblog-panel-comment-post-input {
        width: 100%;
        box-sizing: border-box;
    }

    /* 多图容器宽度与布局适配 */
    .mblog-panel-content-single-img img {
        max-width: 200px;
    }
    .mblog-panel-content-four-img {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }

    .mblog-panel-content-more-img {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }

    .mblog-panel-content-multiple-img li {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    /* 作者信息块宽度适配 */
    /* .mblog-author {
        width: 100%;
    } */

    /* 评论按钮宽度适配 */
    .mblog-panel-comment-post-button-main,
    .mblog-panel-comment-post-button-other {
        width: 100%;
        margin: 0 0 10px 0;
        box-sizing: border-box;
    }
}
