/* ============================================================
   投稿表单样式 — 子比主题（Zibll）适配版
   主题色: #f04494 | 圆角: 8px | 字体跟随子比
   ============================================================ */

/* ----- 基础布局（由子比容器承载，不加背景） ----- */
.ms-submit-page {
    /* 所有背景/间距由子比 article 容器提供 */
}

/* ----- 页面标题 ----- */
.ms-submit-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.ms-submit-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.ms-submit-header p {
    color: #999;
    font-size: 14px;
}

/* ----- 双栏布局 ----- */
.ms-submit-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.ms-submit-main {
    flex: 1;
    min-width: 0;
}

.ms-submit-sidebar {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}

/* ----- 表单区块 ----- */
.ms-form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f5f5f5;
}

.ms-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ms-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 14px;
}

.ms-field {
    margin-bottom: 16px;
}

.ms-field:last-child {
    margin-bottom: 0;
}

.ms-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4e5358;
    margin-bottom: 5px;
}

.ms-required {
    color: #f04494;
}

.ms-hint {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

/* ----- 输入控件（匹配子比风格） ----- */
.ms-input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #4e5358;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.ms-input:focus {
    outline: none;
    border-color: #f04494;
    box-shadow: 0 0 0 3px rgba(240, 68, 148, 0.1);
}

select.ms-input {
    cursor: pointer;
    appearance: auto;
}

.ms-textarea {
    resize: vertical;
    min-height: 110px;
}

.ms-row {
    display: flex;
    gap: 14px;
}

.ms-col {
    flex: 1;
}

/* ----- 单选按钮组（匹配子比风格） ----- */
.ms-radio-group {
    display: flex;
    gap: 10px;
}

.ms-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    background: #fff;
}

.ms-radio:hover {
    border-color: #f04494;
}

.ms-radio input[type="radio"] {
    display: none;
}

.ms-radio.active {
    border-color: #f04494;
    background: #fef5f8;
}

.ms-radio-mark {
    font-size: 18px;
}

/* ----- 标签输入（匹配子比风格） ----- */
.ms-tag-input {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 5px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    background: #fff;
    min-height: 40px;
    cursor: text;
    transition: border-color 0.2s;
}

.ms-tag-input:focus-within {
    border-color: #f04494;
    box-shadow: 0 0 0 3px rgba(240, 68, 148, 0.1);
}

.ms-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ms-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: #fce4ec;
    color: #f04494;
    border-radius: 20px;
    font-size: 12px;
}

.ms-tag-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #f04494;
    margin-left: 2px;
    opacity: 0.7;
}

.ms-tag-remove:hover {
    opacity: 1;
}

.ms-tag-text {
    border: none;
    outline: none;
    flex: 1;
    min-width: 100px;
    font-size: 14px;
    background: transparent;
    padding: 3px;
    font-family: inherit;
}

/* ----- 标题预览 ----- */
.ms-preview-section {
    background: #fef5f8;
    border: 1px dashed #f8bbd0;
    border-radius: 8px;
    padding: 16px 18px !important;
}

.ms-title-preview {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.5;
    min-height: 24px;
    word-break: break-all;
}

.ms-preview-placeholder {
    color: #bbb;
    font-weight: 400;
    font-style: italic;
}

/* ----- 按钮（匹配子比 but 风格） ----- */
.ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 22px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.ms-btn-primary {
    background: #f04494;
    color: #fff;
}

.ms-btn-primary:hover {
    background: #e03380;
    box-shadow: 0 2px 8px rgba(240, 68, 148, 0.3);
    color: #fff;
}

.ms-btn-lg {
    padding: 12px 36px;
    font-size: 15px;
    border-radius: 8px;
}

.ms-submit-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 4px !important;
}

.ms-submit-hint {
    font-size: 13px;
    color: #aaa;
}

/* ----- 侧边栏卡片（匹配子比 theme-box 风格） ----- */
.ms-sidebar-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 0 10px rgba(116, 116, 116, 0.08);
}

.ms-sidebar-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px;
}

/* ----- 上传区域（匹配子比风格） ----- */
.ms-upload-zone {
    border: 1.5px dashed #ddd;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-upload-zone:hover {
    border-color: #f04494;
    background: #fef5f8;
}

.ms-upload-sm {
    padding: 12px 10px;
    min-height: 36px;
}

.ms-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #aaa;
    font-size: 13px;
}

.ms-upload-icon {
    font-size: 30px;
}

.ms-upload-hint {
    font-size: 11px;
    color: #ccc;
}

.ms-upload-preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 6px;
}

.ms-upload-done {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #10b981;
}

.ms-file-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-remove-file {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #f04494;
}

.ms-upload-item {
    margin-bottom: 12px;
}

.ms-upload-item label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4e5358;
    margin-bottom: 5px;
}

/* ----- 须知卡片 ----- */
.ms-tips-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ms-tips-card li {
    padding: 5px 0;
    font-size: 13px;
    color: #888;
    border-bottom: 1px solid #f8f8f8;
}

.ms-tips-card li:last-child {
    border-bottom: none;
}

.ms-tips-card li::before {
    content: '✓ ';
    color: #10b981;
    font-weight: 700;
}

/* ----- Toast（匹配子比通知风格） ----- */
.ms-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 12px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    display: none;
    animation: ms-slide-in 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ms-toast.success { background: #10b981; }
.ms-toast.error   { background: #ef4444; }
.ms-toast.info    { background: #f04494; }

@keyframes ms-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ----- Loading（匹配子比蒙层风格） ----- */
.ms-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    font-size: 15px;
}

.ms-loading-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ms-spin 0.8s linear infinite;
}

@keyframes ms-spin {
    to { transform: rotate(360deg); }
}

/* ----- 侧边栏提交按钮（子比主题风格） ----- */
.ms-submit-sidebar-actions {
    text-align: center;
    padding: 20px 18px !important;
}

.ms-submit-ready-text {
    font-size: 14px;
    color: #999;
    margin-bottom: 14px;
}

.ms-submit-btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.ms-submit-btn-group .but {
    flex: 1;
    padding: 10px 16px !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

/* ----- 响应式 ----- */
@media (max-width: 900px) {
    .ms-submit-layout {
        flex-direction: column;
    }
    .ms-submit-sidebar {
        width: 100%;
        position: static;
    }
    .ms-row {
        flex-direction: column;
        gap: 0;
    }
}

