/* 表单基础样式 */
.form-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    padding: 0;
}

/* 表单组 - 横向排列 */
.form-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

/* 标签样式 */
.form-label {
    flex: 0 0 120px; /* 固定标签宽度 */
    text-align: left;
    color: #333;
}

/* 输入域样式 */
.form-input {
    flex: 1;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 30px;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
    outline: none;
}

/* 必填项标识 */
.form-label.required::before {
    content: "*";
    color: #cc0000;
    margin-right: 0.3rem;
}

/* 错误提示 */
.error-message {
    position: absolute;
    bottom: -1.2rem;
    left: 140px; /* 对齐输入框 */
    color: #cc0000;
    font-size: 0.85rem;
}

/* 响应式处理 */
@media (max-width: 600px) {
    .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .form-label {
        text-align: left;
        flex: none;
        width: 100%;
    }

    .error-message {
        position: static;
        margin-top: 0.3rem;
    }
}

/* 按钮容器 */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-left: 140px; /* 对齐输入框 */
}

@media (max-width: 600px) {
    .button-group {
        padding-left: 0;
        justify-content: flex-start;
    }
}

/* 按钮样式 */
.form-button {
    padding: 0.35rem 0.75rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.form-button:hover {
    background: #0052a3;
}

/* 特殊元素处理 */
.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* 下拉菜单样式 */
.form-select {
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath fill='%23666' d='M7 10l5 5 5-5z'/%3e%3c/svg%3e")
    no-repeat right 0.8rem center/12px;
    -webkit-appearance: none;
}
