/**
 * 留言板样式文件
 * 功能：实现紧凑美观的卡片式布局，主题色 #f7b645
 * 布局要求：宽度不大于700px，高度不大于500px
 */

/* 容器样式 */
.message-board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 卡片样式 */
.message-board-card {
    background: #fff;
    border-radius: 12px;
    border: 2px solid #f7b645;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 25px 30px;
    max-width: 700px;
    width: 100%;
    max-height: 500px;
    box-sizing: border-box;
}

/* 标题样式 */
.mb-title {
    color: #f7b645;
    font-size: 24px;
    margin: 0 0 20px 0;
    text-align: center;
    font-weight: 600;
}

/* 表单样式 */
.mb-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 表单组样式 */
.mb-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 标签样式 */
.mb-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

/* 输入框包装器 */
.mb-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 输入框样式 */
.mb-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
    min-width: 0;
}

.mb-input:focus {
    outline: none;
    border-color: #f7b645;
    box-shadow: 0 0 0 2px rgba(247, 182, 69, 0.1);
}

.mb-input.error {
    border-color: #ff4444;
}

/* 文本域样式 */
.mb-textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 40px;
    max-height: 80px;
    font-family: inherit;
    transition: all 0.3s;
    box-sizing: border-box;
    min-width: 0;
}

.mb-textarea:focus {
    outline: none;
    border-color: #f7b645;
    box-shadow: 0 0 0 2px rgba(247, 182, 69, 0.1);
}

.mb-textarea.error {
    border-color: #ff4444;
}

/* 单选按钮组样式 */
.mb-radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.mb-radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.mb-radio-label input[type="radio"] {
    cursor: pointer;
    accent-color: #f7b645;
}

.mb-radio-label span {
    user-select: none;
}

/* 错误提示样式 */
.mb-error {
    color: #ff4444;
    font-size: 12px;
    display: none;
    white-space: nowrap;
    min-width: 100px;
    width: 100px;
    flex-shrink: 0;
}

.mb-error.show {
    display: inline-block;
}

/* 提交按钮包装器 */
.mb-submit-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

/* 提交按钮样式 */
.mb-submit-btn {
    background-color: #f7b645;
    color: #fff;
    border: none;
    padding: 10px 40px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1; /* 文本上下居中 */
    height: auto; /* 文本上下居中 */
}

.mb-submit-btn:hover:not(:disabled) {
    background-color: #e5a534;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 182, 69, 0.3);
}

.mb-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 成功消息样式 */
.mb-success-message {
    text-align: center;
    padding: 12px;
    background-color: #f0f9ff;
    border: 1px solid #f7b645;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    margin-top: 10px;
}

.mb-success-message span {
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-board-card {
        padding: 20px;
        max-height: none;
    }

    .mb-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .mb-radio-group {
        gap: 15px;
    }

    .mb-error {
        min-width: 80px;
        width: 80px;
    }
}
