/**
 * Updated: 2026-05-02
 * Author: ©彼岸临窗 onenote.io
 *
 * 注释含命名规范，开源不易，如需引用请注明来源:彼岸临窗 https://onenote.io。
 * 本主题已取得软件著作权（登记号：2025SR0334142）和外观设计专利（专利号：第7121519号），请严格遵循GPL-2.0协议使用本主题及源码。
 */
 
.col-tb-offset-2 {
    margin-left: 0;
    width: 100%;
}

/**设置开关按钮样式**/
#tab-content .oneblog-switch-original {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

#tab-content .oneblog-switch-label {
    display: inline-flex;
    align-items: center;
    line-height: 22px;
    margin-right: 10px;
    vertical-align: middle;
}

#tab-content .oneblog-switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    vertical-align: middle;
}

#tab-content .oneblog-switch {
    position: relative;
    width: 42px;
    height: 22px;
    border: 0;
    border-radius: 11px;
    background: #d7dbe2;
    cursor: pointer;
    transition: background .2s ease;
    padding: 0;
    flex: 0 0 auto;
}

#tab-content .oneblog-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    transition: transform .2s ease;
}

#tab-content .oneblog-switch.is-on {
    background: #2f80ed;
}

#tab-content .oneblog-switch.is-on::after {
    transform: translateX(20px);
}

/**修复1.3.0布局错位**/
.col-tb-8 {
    max-width: 100%;
}

#tab1 {
    min-height: 700px;
}

#tab-container {
    display: flex;
    margin-top: 20px;
}

#tab-nav {
    list-style: none;
    padding: 15px;
    width: 150px;
    margin: 0 20px 0 0;
    background: #fff;
    border-radius: 10px;
}

#tab-nav li {
    margin: 0;
}

#tab-nav li a {
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 10px 20px 30px 10px;
    margin-bottom: 10px;
    text-align: center;
    background-color: #f9f9f9;
    color: #333;
    transition: all 0.3s ease;
}

#tab-nav li a.active {
    background-color: #6d6b6b;
    color: #fff;
    border-radius: 10px 20px 30px 10px;
    text-align: center;
    box-shadow: 3px 3px 8px #b9bbc4, -5px -5px 8px #fff;
}

#tab-content {
    flex: 1;
    padding: 10px 36px 30px;
    background: #fff;
    border-radius: 10px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/**图标列表**/
.icon-list {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    gap: 12px;       /* 图标间距 */
    padding: 0;
}

.icon-item {
    flex: 0 0 120px; /* 每个图标最小宽度120px，可自适应 */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ffffff;
    background-color: #f7f7f7;
    text-align: center;
    margin-bottom: 12px;
}

.icon-item i {
    font-size: 24px; /* 图标大小 */
    margin-bottom: 8px; /* 图标与文字间距 */
}

.icon-item span {
    font-size: 14px; /* 文字大小 */
    color: #666; /* 文字颜色 */
}

/**底部提交按钮**/
.typecho-option-submit li{
    float: right;
}

.primary {
    background-color: #515151;
    border-radius: 5px;
    width: 150px;
    margin-top: 10px;
}

.primary:hover {
    background-color: #4079ff;
}

/**修复typecho1.3.0版本下的编辑文章时自定义字段的布局错位问题**/
.full-width-input {
    width: 100%;
    box-sizing: border-box; /* 确保填充和边框包含在宽度内 */
}

.typecho-post-area #custom-field .fields .field {
    display: block;
}

.typecho-post-area #custom-field .fields .field .field-value {
    margin-left: 0;
    display: block;
}

input.full-width-input + .description {
    margin-top: 6px;
}

/**编辑器美化**/
body {
    background: #ffffff;
}

#btn-save,#btn-preview {
    border-radius: 5px;
    width: 150px;
    margin-top: 10px;
}

/* 选择文章编辑器的输入框并设置默认样式 */
textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"] {
    font-size: 14px;
    margin-top: 5px;
    outline: none; /* 去掉默认的聚焦边框 */
}

/* 设置聚焦状态下的边框样式 */
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus {
    border: 1px solid #000000; 
}


/**主题设置备份与恢复**/
.backup-listen button {
    border: none;
    border-radius: 20px;
    background-color: #6d6b6b;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    padding: 5px 10px;
    letter-spacing: 1px;
    transition: 0.4s ease all;
}

.backup-listen button:hover {
    background-color: #393939;
}

.backupbtn {
    margin: 10px 0 0 30px;
}



/* 移动端适配，防止溢出 */
@media (max-width: 600px) {
    #tab-container {
        flex-direction: column;
        margin-top: 10px;
    }
    #tab-nav {
        width: 100%;
        margin: 0 0 10px 0;
        padding: 0;
        border-radius: 10px;
    }
    #tab-content {
        padding: 10px 10px 20px;
        border-radius: 10px;
    }
    .icon-list {
        gap: 8px;
    }
    .icon-item {
        flex: 0 0 calc(50% - 8px); /* 两个一行，减去间距 */
        max-width: calc(50% - 8px);
        box-sizing: border-box;
        padding: 6px;
        margin-bottom: 8px;
    }
    .tab-pane {
        min-height: 400px;
    }
}




/**字体预览**/
.oneblog-font-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.oneblog-font-ready .oneblog-font-card {
    display: block;
    box-sizing: border-box;
    min-height: 104px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.oneblog-font-ready .oneblog-font-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.oneblog-font-ready .oneblog-font-card::after {
    content: attr(data-preview);
    display: block;
    margin-top: 8px;
    color: #333;
    font-size: 24px;
    line-height: 1.6;
}

.oneblog-font-ready .oneblog-font-card.is-selected {
    border-color: #2f80ed;
    background: #f5f9ff;
    box-shadow: 0 0 0 2px rgba(47, 128, 237, .1);
}

@media (max-width: 900px) {
    .oneblog-font-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .oneblog-font-list {
        grid-template-columns: 1fr;
    }
}
.oneblog-font-ready input[name="FontFamily"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}
